public static final class ModifyInstanceDeploymentRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
ModifyInstanceDeploymentRequest.Builder |
affinity(String affinity)
Specifies whether to associate the instance with a dedicated host.
|
ModifyInstanceDeploymentRequest |
build() |
ModifyInstanceDeploymentRequest.Builder |
dedicatedHostClusterId(String dedicatedHostClusterId)
The ID of the dedicated host cluster.
|
ModifyInstanceDeploymentRequest.Builder |
dedicatedHostId(String dedicatedHostId)
The ID of the destination dedicated host.
|
ModifyInstanceDeploymentRequest.Builder |
deploymentSetGroupNo(Integer deploymentSetGroupNo)
The number of the deployment set group in which to deploy the instance in the destination deployment set.
|
ModifyInstanceDeploymentRequest.Builder |
deploymentSetId(String deploymentSetId)
The ID of the destination deployment set.
|
ModifyInstanceDeploymentRequest.Builder |
force(Boolean force)
Specifies whether to forcefully change the host of the instance when the deployment set of the instance is changed.
|
ModifyInstanceDeploymentRequest.Builder |
instanceId(String instanceId)
The ID of the instance.
|
ModifyInstanceDeploymentRequest.Builder |
instanceType(String instanceType)
The instance type to which the instance is changed.
|
ModifyInstanceDeploymentRequest.Builder |
migrationType(String migrationType)
Specifies whether to stop the instance before it is migrated to the destination dedicated host.
|
ModifyInstanceDeploymentRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
ModifyInstanceDeploymentRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
ModifyInstanceDeploymentRequest.Builder |
regionId(String regionId)
The region ID of the instance.
|
ModifyInstanceDeploymentRequest.Builder |
removeFromDeploymentSet(Boolean removeFromDeploymentSet)
Specifies whether to remove the specified instance from the specified deployment set.
|
ModifyInstanceDeploymentRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
ModifyInstanceDeploymentRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
ModifyInstanceDeploymentRequest.Builder |
sourceRegionId(String sourceRegionId)
SourceRegionId.
|
ModifyInstanceDeploymentRequest.Builder |
tenancy(String tenancy)
Specifies whether to deploy the instance on a dedicated host.
|
public ModifyInstanceDeploymentRequest.Builder sourceRegionId(String sourceRegionId)
public ModifyInstanceDeploymentRequest.Builder affinity(String affinity)
* host: associates the instance with a dedicated host. When you start a stopped instance in economical mode, the instance remains on its original dedicated host. * default: does not associate the instance with a dedicated host. When you start a stopped instance in economical mode, the instance can be automatically deployed to another dedicated host in the automatic deployment resource pool if the resources of the original dedicated host are insufficient. If you want to migrate the instance from a shared host to a dedicated host, use the default value. Default value: default.
public ModifyInstanceDeploymentRequest.Builder dedicatedHostClusterId(String dedicatedHostClusterId)
public ModifyInstanceDeploymentRequest.Builder dedicatedHostId(String dedicatedHostId)
When you migrate an instance from a shared host to a dedicated host or between dedicated hosts, take note of the following items: * To migrate the instance to a specific dedicated host, specify this parameter. * To migrate the instance to a system-selected dedicated host, leave this parameter empty and set `Tenancy` to host. For information about the automatic deployment feature, see [Functions and features](~~118938~~).
public ModifyInstanceDeploymentRequest.Builder deploymentSetGroupNo(Integer deploymentSetGroupNo)
> If you call this operation to deploy an instance to a deployment set that uses the high availability group strategy (`AvailablilityGroup`) and leave this parameter empty, the system evenly distributes instances among the deployment set groups in the deployment set. If you call this operation to change the deployment set of an instance and specify the current deployment set of the instance as the destination deployment set, the system evenly distributes instances again among the deployment set groups in the deployment set.
public ModifyInstanceDeploymentRequest.Builder deploymentSetId(String deploymentSetId)
This parameter is required when you add an instance to a deployment set or change the deployment set of an instance. > You cannot change the deployment set when you modify dedicated host configurations, including the `Tenancy`, `Affinity`, and `DedicatedHostId` parameters.
public ModifyInstanceDeploymentRequest.Builder force(Boolean force)
* true: forcefully changes the host of the instance when the deployment set of the instance is changed. Hosts can be forcefully changed only for instances in the Running (Running) or Stopped (Stopped) state. The instances that are in the Stopped (Stopped) state do not include pay-as-you-go instances that are stopped in economical mode. ** **Note** If the specified instance has local disks attached, the local disks are forcefully changed when the host of the instance is forcefully changed. This may cause data loss in the local disks. Proceed with caution. * false: does not forcefully change the host of the instance when the deployment set of the instance is changed. You can add the instance to a deployment set only when the instance remains on the current host. When the Force parameter is set to false, the deployment set may fail to be changed. Default value: false.
public ModifyInstanceDeploymentRequest.Builder instanceId(String instanceId)
public ModifyInstanceDeploymentRequest.Builder instanceType(String instanceType)
You can change the instance type of an instance when you migrate the instance to a dedicated host. The new instance type must match the type of the specified dedicated host. For more information, see [Dedicated host types](~~68564~~). * If you specify this parameter, you must also specify `DedicatedHostId`. * You cannot change the instance type of an instance if you use the automatic deployment feature to migrate the instance.
public ModifyInstanceDeploymentRequest.Builder migrationType(String migrationType)
* reboot: stops the instance before it is migrated. * live: migrates the instance without stopping it. If you set MigrationType to live, you must specify DedicatedHostId. In this case, you cannot change the instance type of the instance when the instance is migrated. Default value: reboot.
public ModifyInstanceDeploymentRequest.Builder ownerAccount(String ownerAccount)
public ModifyInstanceDeploymentRequest.Builder ownerId(Long ownerId)
public ModifyInstanceDeploymentRequest.Builder regionId(String regionId)
public ModifyInstanceDeploymentRequest.Builder removeFromDeploymentSet(Boolean removeFromDeploymentSet)
* true * false Default value: false. > If you set this parameter to true, you must specify InstanceId and DeploymentSetId and make sure that the specified instance belongs to the specified deployment set.
public ModifyInstanceDeploymentRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public ModifyInstanceDeploymentRequest.Builder resourceOwnerId(Long resourceOwnerId)
public ModifyInstanceDeploymentRequest.Builder tenancy(String tenancy)
public ModifyInstanceDeploymentRequest build()
Copyright © 2024. All rights reserved.