public static final class StopInstancesRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
StopInstancesRequest.Builder |
batchOptimization(String batchOptimization)
The batch operation mode.
|
StopInstancesRequest |
build() |
StopInstancesRequest.Builder |
dryRun(Boolean dryRun)
Specifies whether to perform only a dry run, without performing the actual request.
|
StopInstancesRequest.Builder |
forceStop(Boolean forceStop)
Specifies whether to forcefully stop instances.
|
StopInstancesRequest.Builder |
instanceId(List<String> instanceId)
The IDs of instances.
|
StopInstancesRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
StopInstancesRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
StopInstancesRequest.Builder |
regionId(String regionId)
The region ID of the instance.
|
StopInstancesRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
StopInstancesRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
StopInstancesRequest.Builder |
sourceRegionId(String sourceRegionId)
SourceRegionId.
|
StopInstancesRequest.Builder |
stoppedMode(String stoppedMode)
The stop mode of the pay-as-you-go instance.
|
public StopInstancesRequest.Builder sourceRegionId(String sourceRegionId)
public StopInstancesRequest.Builder batchOptimization(String batchOptimization)
* AllTogether: In this mode, if all instances are stopped, a success message is returned. If an instance fails the verification, all instances fail to stop and an error message is returned. * SuccessFirst: In this mode, each instance is separately stopped. The response contains the operation results for each instance. Default value: AllTogether.
public StopInstancesRequest.Builder dryRun(Boolean dryRun)
* true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and instance status. If the request fails the dry run, an error message is returned. If the request passes the dry run, `DRYRUN.SUCCESS` is returned. > If you set `BatchOptimization` to `SuccessFirst` and `DryRun` to true, only `DRYRUN.SUCCESS` is returned, regardless of whether the request passes the dry run. * false: performs a dry run and performs the actual request. If the request passes the dry run, instances are stopped. Default value: false.
public StopInstancesRequest.Builder forceStop(Boolean forceStop)
* true. This operation is equivalent to the typical power-off operation. Cache data that is not written to storage devices on instances is lost. * false. Default value: false.
public StopInstancesRequest.Builder instanceId(List<String> instanceId)
public StopInstancesRequest.Builder ownerAccount(String ownerAccount)
public StopInstancesRequest.Builder ownerId(Long ownerId)
public StopInstancesRequest.Builder regionId(String regionId)
public StopInstancesRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public StopInstancesRequest.Builder resourceOwnerId(Long resourceOwnerId)
public StopInstancesRequest.Builder stoppedMode(String stoppedMode)
* StopCharging: economical mode. For information about how `StopCharging` takes effect, see the "Prerequisites" section in [Economical mode](~~63353~~). * KeepCharging: standard mode. After the instance is stopped in standard mode, you continue to be charged for it. Default value: If the prerequisites required for enabling economical mode are met and you have enabled the mode in the ECS console, the default value is [StopCharging](~~63353#default~~). For more information, see the "Enable economical mode" section in `Economical mode`. Otherwise, the default value is `KeepCharging`.
public StopInstancesRequest build()
Copyright © 2024. All rights reserved.