public static final class ModifyScalingGroupRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ModifyScalingGroupRequest.Builder |
activeScalingConfigurationId(String activeScalingConfigurationId)
The ID of the active scaling configuration in the scaling group.
|
ModifyScalingGroupRequest.Builder |
allocationStrategy(String allocationStrategy)
The allocation policy.
|
ModifyScalingGroupRequest.Builder |
azBalance(Boolean azBalance)
Specifies whether to evenly distribute instances in the scaling group across zones.
|
ModifyScalingGroupRequest |
build() |
ModifyScalingGroupRequest.Builder |
compensateWithOnDemand(Boolean compensateWithOnDemand)
Specifies whether to automatically create pay-as-you-go instances to meet the requirements on the number of ECS instances in the scaling group when the number of preemptible instances cannot be reached due to reasons such as cost-related issues and insufficient resources.
|
ModifyScalingGroupRequest.Builder |
customPolicyARN(String customPolicyARN)
The ARN of the custom scaling policy (Function).
|
ModifyScalingGroupRequest.Builder |
defaultCooldown(Integer defaultCooldown)
The cooldown period of the scaling group.
|
ModifyScalingGroupRequest.Builder |
desiredCapacity(Integer desiredCapacity)
The expected number of ECS instances or elastic container instances in the scaling group.
|
ModifyScalingGroupRequest.Builder |
disableDesiredCapacity(Boolean disableDesiredCapacity)
DisableDesiredCapacity.
|
ModifyScalingGroupRequest.Builder |
groupDeletionProtection(Boolean groupDeletionProtection)
Specifies whether to enable deletion protection for the scaling group.
|
ModifyScalingGroupRequest.Builder |
healthCheckType(String healthCheckType)
The health check mode of the scaling group.
|
ModifyScalingGroupRequest.Builder |
healthCheckTypes(List<String> healthCheckTypes)
The health check modes of the scaling group.
|
ModifyScalingGroupRequest.Builder |
launchTemplateId(String launchTemplateId)
The ID of the launch template that is used by Auto Scaling to create instances.
|
ModifyScalingGroupRequest.Builder |
launchTemplateOverrides(List<ModifyScalingGroupRequest.LaunchTemplateOverrides> launchTemplateOverrides)
Details of the instance types that are specified in the extended configurations of the launch template.
|
ModifyScalingGroupRequest.Builder |
launchTemplateVersion(String launchTemplateVersion)
The version number of the launch template.
|
ModifyScalingGroupRequest.Builder |
maxInstanceLifetime(Integer maxInstanceLifetime)
The maximum life span of the instance in the scaling group.
|
ModifyScalingGroupRequest.Builder |
maxSize(Integer maxSize)
The maximum number of ECS instances or elastic container instances that can be contained in the scaling group.
|
ModifyScalingGroupRequest.Builder |
minSize(Integer minSize)
The minimum number of ECS instances or elastic container instances that must be contained in the scaling group.
|
ModifyScalingGroupRequest.Builder |
multiAZPolicy(String multiAZPolicy)
The scaling policy for the multi-zone scaling group that contains ECS instances.
|
ModifyScalingGroupRequest.Builder |
onDemandBaseCapacity(Integer onDemandBaseCapacity)
The minimum number of pay-as-you-go instances that must be included in the scaling group.
|
ModifyScalingGroupRequest.Builder |
onDemandPercentageAboveBaseCapacity(Integer onDemandPercentageAboveBaseCapacity)
The expected percentage of pay-as-you-go instances in the excess instances when the minimum number of pay-as-you-go instances reaches the requirement.
|
ModifyScalingGroupRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
ModifyScalingGroupRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
ModifyScalingGroupRequest.Builder |
removalPolicies(List<String> removalPolicies)
The policy that is used to remove ECS instances from the scaling group.
|
ModifyScalingGroupRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
ModifyScalingGroupRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
ModifyScalingGroupRequest.Builder |
scalingGroupId(String scalingGroupId)
The ID of the scaling group that you want to modify.
|
ModifyScalingGroupRequest.Builder |
scalingGroupName(String scalingGroupName)
The name of the scaling group.
|
ModifyScalingGroupRequest.Builder |
scalingPolicy(String scalingPolicy)
The reclaim mode of the scaling group.
|
ModifyScalingGroupRequest.Builder |
spotAllocationStrategy(String spotAllocationStrategy)
The allocation policy of preemptible instances.
|
ModifyScalingGroupRequest.Builder |
spotInstancePools(Integer spotInstancePools)
The number of instance types that you specify.
|
ModifyScalingGroupRequest.Builder |
spotInstanceRemedy(Boolean spotInstanceRemedy)
Specifies whether to supplement preemptible instances.
|
ModifyScalingGroupRequest.Builder |
vSwitchIds(List<String> vSwitchIds)
The IDs of vSwitches.
|
public ModifyScalingGroupRequest.Builder activeScalingConfigurationId(String activeScalingConfigurationId)
public ModifyScalingGroupRequest.Builder allocationStrategy(String allocationStrategy)
* priority: Auto Scaling selects instance types based on the specified order to create the required number of instances. * lowestPrice: Auto Scaling selects instance types that have the lowest unit price of vCPUs to create the required number of instances. Default value: priority.
public ModifyScalingGroupRequest.Builder azBalance(Boolean azBalance)
* true * false Default value: false.
public ModifyScalingGroupRequest.Builder compensateWithOnDemand(Boolean compensateWithOnDemand)
* true * false
public ModifyScalingGroupRequest.Builder customPolicyARN(String customPolicyARN)
public ModifyScalingGroupRequest.Builder defaultCooldown(Integer defaultCooldown)
During the cooldown period, Auto Scaling does not execute scaling activities that are triggered by CloudMonitor event-triggered tasks.
public ModifyScalingGroupRequest.Builder desiredCapacity(Integer desiredCapacity)
> If you re-enable the Expected Number of Instances feature, you must specify a value for `DesiredCapacity` again.
public ModifyScalingGroupRequest.Builder disableDesiredCapacity(Boolean disableDesiredCapacity)
public ModifyScalingGroupRequest.Builder groupDeletionProtection(Boolean groupDeletionProtection)
* true: enables deletion protection for the scaling group. This way, the scaling group cannot be deleted. * false: disables deletion protection for the scaling group.
public ModifyScalingGroupRequest.Builder healthCheckType(String healthCheckType)
* NONE: Auto Scaling does not perform health checks. * ECS: Auto Scaling checks the health status of ECS instances in the scaling group. * ECI: Auto Scaling checks the health status of elastic container instances in the scaling group. * LOAD_BALANCER: Auto Scaling checks the health status of instances in the scaling group based on the health check results of load balancers. The health check results of Classic Load Balancer (CLB) instances are not supported as the health check basis for instances in the scaling group. > HealthCheckType has the same effect as `HealthCheckTypes`. You can select one of them to specify based on your business requirements. If you specify `HealthCheckTypes`, `HealthCheckType` is ignored. HealthCheckType is optional.
public ModifyScalingGroupRequest.Builder healthCheckTypes(List<String> healthCheckTypes)
* NONE: Auto Scaling does not perform health checks. * ECS: Auto Scaling checks the health status of ECS instances in the scaling group. * ECI: Auto Scaling checks the health status of elastic container instances in the scaling group. * LOAD_BALANCER: Auto Scaling checks the health status of instances in the scaling group based on the health check results of load balancers. The health check results of CLB instances are not supported as the health check basis for instances in the scaling group.
public ModifyScalingGroupRequest.Builder launchTemplateId(String launchTemplateId)
public ModifyScalingGroupRequest.Builder launchTemplateOverrides(List<ModifyScalingGroupRequest.LaunchTemplateOverrides> launchTemplateOverrides)
public ModifyScalingGroupRequest.Builder launchTemplateVersion(String launchTemplateVersion)
* A fixed template version number. * Default: The default template version is always used. * Latest: The latest template version is always used.
public ModifyScalingGroupRequest.Builder maxInstanceLifetime(Integer maxInstanceLifetime)
Valid values: 86400 to Integer.maxValue. ``You can also set this parameter to 0. A value of 0 indicates that the instance has an unlimited life span in the scaling group. Default value: null. > You cannot specify this parameter for scaling groups that manage elastic container instances or scaling groups whose ScalingPolicy is set to recycle.
public ModifyScalingGroupRequest.Builder maxSize(Integer maxSize)
The value range of MaxSize is directly correlated with the degree of dependency your business has on Auto Scaling. You can go to [Quota Center](https://quotas.console.aliyun.com/products/ess/quotas) to check **the maximum number of instances that a single scaling group can contain.** For example, if a scaling group can contain up to **2,000** instances, the value range of MaxSize is 0 to 2000.
public ModifyScalingGroupRequest.Builder minSize(Integer minSize)
> The value of MinSize must be less than or equal to the value of MaxSize.
public ModifyScalingGroupRequest.Builder multiAZPolicy(String multiAZPolicy)
* PRIORITY: ECS instances are scaled based on the vSwitch priority. The first vSwitch specified by using the VSwitchIds parameter has the highest priority. Auto Scaling preferentially scales instances in the zone where the vSwitch that has the highest priority resides. If the scaling fails, Auto Scaling scales instances in the zone where the vSwitch that has the next highest priority resides. * COST_OPTIMIZED: During a scale-out activity, Auto Scaling preferentially creates ECS instances of the instance type that has the lowest unit price of vCPU. During a scale-in activity, Auto Scaling preferentially removes ECS instances of the instance types that have the highest unit price of vCPU. Auto Scaling preferentially creates preemptible instances when preemptible instance types are specified in the scaling configuration. You can use the `CompensateWithOnDemand` parameter to specify whether to automatically create pay-as-you-go instances when Auto Scaling fails to create preemptible instances. > The `COST_OPTIMIZED` setting takes effect only when multiple instance types are specified or at least one instance type is specified for preemptible instances. * BALANCE: ECS instances are evenly distributed across zones that are specified in the scaling group. If ECS instances are unevenly distributed among zones due to insufficient resources, you can call the RebalanceInstance operation to evenly distribute the instances among the zones. * COMPOSABLE: You can flexibly combine the preceding policies based on your business requirements.
public ModifyScalingGroupRequest.Builder onDemandBaseCapacity(Integer onDemandBaseCapacity)
If you set the `MultiAZPolicy` parameter to `COMPOSABLE` Policy, the default value is 0.
public ModifyScalingGroupRequest.Builder onDemandPercentageAboveBaseCapacity(Integer onDemandPercentageAboveBaseCapacity)
If you set the `MultiAZPolicy` parameter to `COMPOSABLE` Policy, the default value is 100.
public ModifyScalingGroupRequest.Builder ownerAccount(String ownerAccount)
public ModifyScalingGroupRequest.Builder ownerId(Long ownerId)
public ModifyScalingGroupRequest.Builder removalPolicies(List<String> removalPolicies)
* OldestInstance: removes ECS instances that are added at the earliest point in time to the scaling group. * NewestInstance: removes ECS instances that are most recently added to the scaling group. * OldestScalingConfiguration: removes ECS instances that are created based on the earliest scaling configuration.
public ModifyScalingGroupRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public ModifyScalingGroupRequest.Builder resourceOwnerId(Long resourceOwnerId)
public ModifyScalingGroupRequest.Builder scalingGroupId(String scalingGroupId)
public ModifyScalingGroupRequest.Builder scalingGroupName(String scalingGroupName)
public ModifyScalingGroupRequest.Builder scalingPolicy(String scalingPolicy)
* recycle: economical mode * release: release mode * forcerelease: forced release mode ** **Note** If you set the value to `forcerelease`, Auto Scaling forcibly releases instances that are in the `Running` state during scale-ins. Forced release is equivalent to power outage. If an instance is forcibly released, ephemeral data on the instance will be cleared and cannot be recovered. Exercise caution when you select this option. * forcerecycle: forced recycle mode ** **Note** If you set the value to `forcerecycle`, Auto Scaling forcibly shuts down instances that are in the `Running` state during scale-ins. Forced shutdown is equivalent to power outage. If an instance is forcibly shut down, ephemeral data on the instance will be cleared and cannot be recovered. Exercise caution when you select this option. ScalingPolicy specifies only the reclaim mode of the scaling group. RemovePolicy of the RemoveInstances operation specifies the manner how instances are removed from the scaling group. For more information, see [RemoveInstances](~~25955~~).
public ModifyScalingGroupRequest.Builder spotAllocationStrategy(String spotAllocationStrategy)
* priority: Auto Scaling selects instance types based on the specified order to create the required number of preemptible instances. * lowestPrice: Auto Scaling selects instance types that have the lowest unit price of vCPUs to create the required number of preemptible instances. Default value: priority.
public ModifyScalingGroupRequest.Builder spotInstancePools(Integer spotInstancePools)
If you set the `MultiAZPolicy` parameter to `COMPOSABLE` Policy, the default value is 2.
public ModifyScalingGroupRequest.Builder spotInstanceRemedy(Boolean spotInstanceRemedy)
public ModifyScalingGroupRequest.Builder vSwitchIds(List<String> vSwitchIds)
This parameter takes effect only when the network type of the scaling group is virtual private cloud (VPC). The specified vSwitches and the scaling group must reside in the same VPC. The vSwitches can reside in different zones. The vSwitches are sorted in ascending order. The first vSwitch specified by using the VSwitchIds parameter has the highest priority. If Auto Scaling fails to create ECS instances in the zone where the vSwitch that has the highest priority resides, Auto Scaling creates ECS instances in the zone where the vSwitch that has the next highest priority resides.
public ModifyScalingGroupRequest build()
Copyright © 2024. All rights reserved.