
com.tencentcloudapi.as.v20180419.models.ModifyAutoScalingGroupRequest Maven / Gradle / Ivy
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.as.v20180419.models;
import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ModifyAutoScalingGroupRequest extends AbstractModel {
/**
* Auto scaling group ID
*/
@SerializedName("AutoScalingGroupId")
@Expose
private String AutoScalingGroupId;
/**
* Auto scaling group name, which can only contain letters, numbers, underscores, hyphens ("-"), and decimal points with a maximum length of 55 bytes and must be unique under your account.
*/
@SerializedName("AutoScalingGroupName")
@Expose
private String AutoScalingGroupName;
/**
* Default cooldown period in seconds. Default value: 300
*/
@SerializedName("DefaultCooldown")
@Expose
private Long DefaultCooldown;
/**
* Desired number of instances. The number should be no larger than the maximum and no smaller than minimum number of instances
*/
@SerializedName("DesiredCapacity")
@Expose
private Long DesiredCapacity;
/**
* Launch configuration ID
*/
@SerializedName("LaunchConfigurationId")
@Expose
private String LaunchConfigurationId;
/**
* Maximum number of instances. Value range: 0-2,000.
*/
@SerializedName("MaxSize")
@Expose
private Long MaxSize;
/**
* Minimum number of instances. Value range: 0-2,000.
*/
@SerializedName("MinSize")
@Expose
private Long MinSize;
/**
* Project ID
*/
@SerializedName("ProjectId")
@Expose
private Long ProjectId;
/**
* List of subnet IDs
*/
@SerializedName("SubnetIds")
@Expose
private String [] SubnetIds;
/**
* Termination policy, whose maximum length is currently 1. Valid values include OLDEST_INSTANCE and NEWEST_INSTANCE.
OLDEST_INSTANCE: Terminate the oldest instance in the scaling group first.
NEWEST_INSTANCE: Terminate the newest instance in the scaling group first.
*/
@SerializedName("TerminationPolicies")
@Expose
private String [] TerminationPolicies;
/**
* VPC ID. This field is left empty for basic networks. You need to specify SubnetIds when modifying the network of the auto scaling group to a VPC with a specified VPC ID. Specify Zones when modifying the network to a basic network.
*/
@SerializedName("VpcId")
@Expose
private String VpcId;
/**
* List of availability zones
*/
@SerializedName("Zones")
@Expose
private String [] Zones;
/**
* Retry policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. A partially successful scaling activity is considered a failed activity.
IMMEDIATE_RETRY: Immediately retry, and quickly retry in a short period. There will be no retry anymore after a certain number of consecutive failures (5).
INCREMENTAL_INTERVALS: Retry with incremental intervals. As the number of consecutive failures increases, the retry intervals gradually become longer, ranging from seconds to one day.
NO_RETRY: There will be no retry until another user call or alarm information is received.
*/
@SerializedName("RetryPolicy")
@Expose
private String RetryPolicy;
/**
* AZ verification policy, whose valid values include ALL and ANY, with the default value being ANY. This policy comes into effect when actual changes are made to resource-related fields in the scaling group (such as launch configuration, AZ, or subnet).
ALL: Verification passes if all AZs or subnets are available; otherwise, a verification error will be reported.
ANY: Verification passes if any AZ or subnet is available; otherwise, a verification error will be reported.
Common reasons for unavailable AZs or subnets include the CVM InstanceType in the AZ being sold out, the CBS cloud disk in the AZ being sold out, insufficient quota in the AZ, and insufficient IP addresses in the subnet.
If there is no AZ or subnet in Zones/SubnetIds, a verification error will be reported regardless of the values of ZonesCheckPolicy.
*/
@SerializedName("ZonesCheckPolicy")
@Expose
private String ZonesCheckPolicy;
/**
* Service settings such as unhealthy instance replacement.
*/
@SerializedName("ServiceSettings")
@Expose
private ServiceSettings ServiceSettings;
/**
* The number of IPv6 addresses that an instance has. Valid values: 0 and 1.
*/
@SerializedName("Ipv6AddressCount")
@Expose
private Long Ipv6AddressCount;
/**
* Multi-AZ/multi-subnet policy, whose valid values include PRIORITY and EQUALITY, with the default value being PRIORITY.
PRIORITY: Instances are attempted to be created taking the order of the AZ/subnet list as the priority. If the highest-priority AZ/subnet can create instances successfully, instances can always be created in that AZ/subnet.
EQUALITY: The instances added through scale-out will be distributed across multiple AZs/subnets to ensure a relatively balanced number of instances in each AZ/subnet after scaling out.
Points to consider regarding this policy:
When the scaling group is based on a classic network, this policy applies to the multi-AZ; when the scaling group is based on a VPC network, this policy applies to the multi-subnet, in this case, the AZs are no longer considered. For example, if there are four subnets labeled A, B, C, and D, where A, B, and C are in AZ 1 and D is in AZ 2, the subnets A, B, C, and D are considered for sorting without regard to AZs 1 and 2.
This policy applies to the multi-AZ/multi-subnet and not to the InstanceTypes parameter of the launch configuration, which is selected according to the priority policy.
When instances are created according to the PRIORITY policy, ensure the policy for multiple models first, followed by the policy for the multi-AZ/subnet. For example, with models A and B and subnets 1, 2, and 3, attempts will be made in the order of A1, A2, A3, B1, B2, and B3. If A1 is sold out, A2 will be attempted (instead of B1).
*/
@SerializedName("MultiZoneSubnetPolicy")
@Expose
private String MultiZoneSubnetPolicy;
/**
* Scaling group instance health check type, whose valid values include:
CVM: Determines whether an instance is unhealthy based on its network status. An unhealthy network status is indicated by an event where instances become unreachable via PING. Detailed criteria of judgment can be found in [Instance Health Check](https://intl.cloud.tencent.com/document/product/377/8553?from_cn_redirect=1).
CLB: Determines whether an instance is unhealthy based on the health check status of CLB. For principles behind CLB health checks, see [Health Check](https://intl.cloud.tencent.com/document/product/214/6097?from_cn_redirect=1).
*/
@SerializedName("HealthCheckType")
@Expose
private String HealthCheckType;
/**
* Grace period of the CLB health check
*/
@SerializedName("LoadBalancerHealthCheckGracePeriod")
@Expose
private Long LoadBalancerHealthCheckGracePeriod;
/**
* Instance assignment policy, whose valid values include LAUNCH_CONFIGURATION and SPOT_MIXED.
LAUNCH_CONFIGURATION: Represent the traditional mode of assigning instances according to the launch configuration.
SPOT_MIXED: Represent the spot mixed mode. Currently, this mode is supported only when the launch configuration is set to the pay-as-you-go billing mode. In the mixed mode, the scaling group will scale out pay-as-you-go models or spot models based on the predefined settings. When the mixed mode is used, the billing type of the associated launch configuration cannot be modified.
*/
@SerializedName("InstanceAllocationPolicy")
@Expose
private String InstanceAllocationPolicy;
/**
* Specifies how to assign pay-as-you-go instances and spot instances.
This parameter is valid only when `InstanceAllocationPolicy` is set to `SPOT_MIXED`.
*/
@SerializedName("SpotMixedAllocationPolicy")
@Expose
private SpotMixedAllocationPolicy SpotMixedAllocationPolicy;
/**
* Capacity rebalancing feature, which is applicable only to spot instances within the scaling group. Valid values:
TRUE: Enable this feature. When spot instances in the scaling group are about to be automatically recycled by the spot instance service, AS proactively initiates the termination process of the spot instances. If there is a configured scale-in hook, it will be triggered before termination. After the termination process starts, AS asynchronously initiates the scale-out to reach the expected number of instances.
FALSE: Disable this feature. AS waits for the spot instance to be terminated before scaling out to reach the number of instances expected by the scaling group.
*/
@SerializedName("CapacityRebalance")
@Expose
private Boolean CapacityRebalance;
/**
* Instance name sequencing settings. When enabled, an incremental numeric sequence will be appended to the names of instances automatically created within the scaling group.
*/
@SerializedName("InstanceNameIndexSettings")
@Expose
private InstanceNameIndexSettings InstanceNameIndexSettings;
/**
* Get Auto scaling group ID
* @return AutoScalingGroupId Auto scaling group ID
*/
public String getAutoScalingGroupId() {
return this.AutoScalingGroupId;
}
/**
* Set Auto scaling group ID
* @param AutoScalingGroupId Auto scaling group ID
*/
public void setAutoScalingGroupId(String AutoScalingGroupId) {
this.AutoScalingGroupId = AutoScalingGroupId;
}
/**
* Get Auto scaling group name, which can only contain letters, numbers, underscores, hyphens ("-"), and decimal points with a maximum length of 55 bytes and must be unique under your account.
* @return AutoScalingGroupName Auto scaling group name, which can only contain letters, numbers, underscores, hyphens ("-"), and decimal points with a maximum length of 55 bytes and must be unique under your account.
*/
public String getAutoScalingGroupName() {
return this.AutoScalingGroupName;
}
/**
* Set Auto scaling group name, which can only contain letters, numbers, underscores, hyphens ("-"), and decimal points with a maximum length of 55 bytes and must be unique under your account.
* @param AutoScalingGroupName Auto scaling group name, which can only contain letters, numbers, underscores, hyphens ("-"), and decimal points with a maximum length of 55 bytes and must be unique under your account.
*/
public void setAutoScalingGroupName(String AutoScalingGroupName) {
this.AutoScalingGroupName = AutoScalingGroupName;
}
/**
* Get Default cooldown period in seconds. Default value: 300
* @return DefaultCooldown Default cooldown period in seconds. Default value: 300
*/
public Long getDefaultCooldown() {
return this.DefaultCooldown;
}
/**
* Set Default cooldown period in seconds. Default value: 300
* @param DefaultCooldown Default cooldown period in seconds. Default value: 300
*/
public void setDefaultCooldown(Long DefaultCooldown) {
this.DefaultCooldown = DefaultCooldown;
}
/**
* Get Desired number of instances. The number should be no larger than the maximum and no smaller than minimum number of instances
* @return DesiredCapacity Desired number of instances. The number should be no larger than the maximum and no smaller than minimum number of instances
*/
public Long getDesiredCapacity() {
return this.DesiredCapacity;
}
/**
* Set Desired number of instances. The number should be no larger than the maximum and no smaller than minimum number of instances
* @param DesiredCapacity Desired number of instances. The number should be no larger than the maximum and no smaller than minimum number of instances
*/
public void setDesiredCapacity(Long DesiredCapacity) {
this.DesiredCapacity = DesiredCapacity;
}
/**
* Get Launch configuration ID
* @return LaunchConfigurationId Launch configuration ID
*/
public String getLaunchConfigurationId() {
return this.LaunchConfigurationId;
}
/**
* Set Launch configuration ID
* @param LaunchConfigurationId Launch configuration ID
*/
public void setLaunchConfigurationId(String LaunchConfigurationId) {
this.LaunchConfigurationId = LaunchConfigurationId;
}
/**
* Get Maximum number of instances. Value range: 0-2,000.
* @return MaxSize Maximum number of instances. Value range: 0-2,000.
*/
public Long getMaxSize() {
return this.MaxSize;
}
/**
* Set Maximum number of instances. Value range: 0-2,000.
* @param MaxSize Maximum number of instances. Value range: 0-2,000.
*/
public void setMaxSize(Long MaxSize) {
this.MaxSize = MaxSize;
}
/**
* Get Minimum number of instances. Value range: 0-2,000.
* @return MinSize Minimum number of instances. Value range: 0-2,000.
*/
public Long getMinSize() {
return this.MinSize;
}
/**
* Set Minimum number of instances. Value range: 0-2,000.
* @param MinSize Minimum number of instances. Value range: 0-2,000.
*/
public void setMinSize(Long MinSize) {
this.MinSize = MinSize;
}
/**
* Get Project ID
* @return ProjectId Project ID
*/
public Long getProjectId() {
return this.ProjectId;
}
/**
* Set Project ID
* @param ProjectId Project ID
*/
public void setProjectId(Long ProjectId) {
this.ProjectId = ProjectId;
}
/**
* Get List of subnet IDs
* @return SubnetIds List of subnet IDs
*/
public String [] getSubnetIds() {
return this.SubnetIds;
}
/**
* Set List of subnet IDs
* @param SubnetIds List of subnet IDs
*/
public void setSubnetIds(String [] SubnetIds) {
this.SubnetIds = SubnetIds;
}
/**
* Get Termination policy, whose maximum length is currently 1. Valid values include OLDEST_INSTANCE and NEWEST_INSTANCE.
OLDEST_INSTANCE: Terminate the oldest instance in the scaling group first.
NEWEST_INSTANCE: Terminate the newest instance in the scaling group first.
* @return TerminationPolicies Termination policy, whose maximum length is currently 1. Valid values include OLDEST_INSTANCE and NEWEST_INSTANCE.
OLDEST_INSTANCE: Terminate the oldest instance in the scaling group first.
NEWEST_INSTANCE: Terminate the newest instance in the scaling group first.
*/
public String [] getTerminationPolicies() {
return this.TerminationPolicies;
}
/**
* Set Termination policy, whose maximum length is currently 1. Valid values include OLDEST_INSTANCE and NEWEST_INSTANCE.
OLDEST_INSTANCE: Terminate the oldest instance in the scaling group first.
NEWEST_INSTANCE: Terminate the newest instance in the scaling group first.
* @param TerminationPolicies Termination policy, whose maximum length is currently 1. Valid values include OLDEST_INSTANCE and NEWEST_INSTANCE.
OLDEST_INSTANCE: Terminate the oldest instance in the scaling group first.
NEWEST_INSTANCE: Terminate the newest instance in the scaling group first.
*/
public void setTerminationPolicies(String [] TerminationPolicies) {
this.TerminationPolicies = TerminationPolicies;
}
/**
* Get VPC ID. This field is left empty for basic networks. You need to specify SubnetIds when modifying the network of the auto scaling group to a VPC with a specified VPC ID. Specify Zones when modifying the network to a basic network.
* @return VpcId VPC ID. This field is left empty for basic networks. You need to specify SubnetIds when modifying the network of the auto scaling group to a VPC with a specified VPC ID. Specify Zones when modifying the network to a basic network.
*/
public String getVpcId() {
return this.VpcId;
}
/**
* Set VPC ID. This field is left empty for basic networks. You need to specify SubnetIds when modifying the network of the auto scaling group to a VPC with a specified VPC ID. Specify Zones when modifying the network to a basic network.
* @param VpcId VPC ID. This field is left empty for basic networks. You need to specify SubnetIds when modifying the network of the auto scaling group to a VPC with a specified VPC ID. Specify Zones when modifying the network to a basic network.
*/
public void setVpcId(String VpcId) {
this.VpcId = VpcId;
}
/**
* Get List of availability zones
* @return Zones List of availability zones
*/
public String [] getZones() {
return this.Zones;
}
/**
* Set List of availability zones
* @param Zones List of availability zones
*/
public void setZones(String [] Zones) {
this.Zones = Zones;
}
/**
* Get Retry policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. A partially successful scaling activity is considered a failed activity.
IMMEDIATE_RETRY: Immediately retry, and quickly retry in a short period. There will be no retry anymore after a certain number of consecutive failures (5).
INCREMENTAL_INTERVALS: Retry with incremental intervals. As the number of consecutive failures increases, the retry intervals gradually become longer, ranging from seconds to one day.
NO_RETRY: There will be no retry until another user call or alarm information is received.
* @return RetryPolicy Retry policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. A partially successful scaling activity is considered a failed activity.
IMMEDIATE_RETRY: Immediately retry, and quickly retry in a short period. There will be no retry anymore after a certain number of consecutive failures (5).
INCREMENTAL_INTERVALS: Retry with incremental intervals. As the number of consecutive failures increases, the retry intervals gradually become longer, ranging from seconds to one day.
NO_RETRY: There will be no retry until another user call or alarm information is received.
*/
public String getRetryPolicy() {
return this.RetryPolicy;
}
/**
* Set Retry policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. A partially successful scaling activity is considered a failed activity.
IMMEDIATE_RETRY: Immediately retry, and quickly retry in a short period. There will be no retry anymore after a certain number of consecutive failures (5).
INCREMENTAL_INTERVALS: Retry with incremental intervals. As the number of consecutive failures increases, the retry intervals gradually become longer, ranging from seconds to one day.
NO_RETRY: There will be no retry until another user call or alarm information is received.
* @param RetryPolicy Retry policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. A partially successful scaling activity is considered a failed activity.
IMMEDIATE_RETRY: Immediately retry, and quickly retry in a short period. There will be no retry anymore after a certain number of consecutive failures (5).
INCREMENTAL_INTERVALS: Retry with incremental intervals. As the number of consecutive failures increases, the retry intervals gradually become longer, ranging from seconds to one day.
NO_RETRY: There will be no retry until another user call or alarm information is received.
*/
public void setRetryPolicy(String RetryPolicy) {
this.RetryPolicy = RetryPolicy;
}
/**
* Get AZ verification policy, whose valid values include ALL and ANY, with the default value being ANY. This policy comes into effect when actual changes are made to resource-related fields in the scaling group (such as launch configuration, AZ, or subnet).
ALL: Verification passes if all AZs or subnets are available; otherwise, a verification error will be reported.
ANY: Verification passes if any AZ or subnet is available; otherwise, a verification error will be reported.
Common reasons for unavailable AZs or subnets include the CVM InstanceType in the AZ being sold out, the CBS cloud disk in the AZ being sold out, insufficient quota in the AZ, and insufficient IP addresses in the subnet.
If there is no AZ or subnet in Zones/SubnetIds, a verification error will be reported regardless of the values of ZonesCheckPolicy.
* @return ZonesCheckPolicy AZ verification policy, whose valid values include ALL and ANY, with the default value being ANY. This policy comes into effect when actual changes are made to resource-related fields in the scaling group (such as launch configuration, AZ, or subnet).
ALL: Verification passes if all AZs or subnets are available; otherwise, a verification error will be reported.
ANY: Verification passes if any AZ or subnet is available; otherwise, a verification error will be reported.
Common reasons for unavailable AZs or subnets include the CVM InstanceType in the AZ being sold out, the CBS cloud disk in the AZ being sold out, insufficient quota in the AZ, and insufficient IP addresses in the subnet.
If there is no AZ or subnet in Zones/SubnetIds, a verification error will be reported regardless of the values of ZonesCheckPolicy.
*/
public String getZonesCheckPolicy() {
return this.ZonesCheckPolicy;
}
/**
* Set AZ verification policy, whose valid values include ALL and ANY, with the default value being ANY. This policy comes into effect when actual changes are made to resource-related fields in the scaling group (such as launch configuration, AZ, or subnet).
ALL: Verification passes if all AZs or subnets are available; otherwise, a verification error will be reported.
ANY: Verification passes if any AZ or subnet is available; otherwise, a verification error will be reported.
Common reasons for unavailable AZs or subnets include the CVM InstanceType in the AZ being sold out, the CBS cloud disk in the AZ being sold out, insufficient quota in the AZ, and insufficient IP addresses in the subnet.
If there is no AZ or subnet in Zones/SubnetIds, a verification error will be reported regardless of the values of ZonesCheckPolicy.
* @param ZonesCheckPolicy AZ verification policy, whose valid values include ALL and ANY, with the default value being ANY. This policy comes into effect when actual changes are made to resource-related fields in the scaling group (such as launch configuration, AZ, or subnet).
ALL: Verification passes if all AZs or subnets are available; otherwise, a verification error will be reported.
ANY: Verification passes if any AZ or subnet is available; otherwise, a verification error will be reported.
Common reasons for unavailable AZs or subnets include the CVM InstanceType in the AZ being sold out, the CBS cloud disk in the AZ being sold out, insufficient quota in the AZ, and insufficient IP addresses in the subnet.
If there is no AZ or subnet in Zones/SubnetIds, a verification error will be reported regardless of the values of ZonesCheckPolicy.
*/
public void setZonesCheckPolicy(String ZonesCheckPolicy) {
this.ZonesCheckPolicy = ZonesCheckPolicy;
}
/**
* Get Service settings such as unhealthy instance replacement.
* @return ServiceSettings Service settings such as unhealthy instance replacement.
*/
public ServiceSettings getServiceSettings() {
return this.ServiceSettings;
}
/**
* Set Service settings such as unhealthy instance replacement.
* @param ServiceSettings Service settings such as unhealthy instance replacement.
*/
public void setServiceSettings(ServiceSettings ServiceSettings) {
this.ServiceSettings = ServiceSettings;
}
/**
* Get The number of IPv6 addresses that an instance has. Valid values: 0 and 1.
* @return Ipv6AddressCount The number of IPv6 addresses that an instance has. Valid values: 0 and 1.
*/
public Long getIpv6AddressCount() {
return this.Ipv6AddressCount;
}
/**
* Set The number of IPv6 addresses that an instance has. Valid values: 0 and 1.
* @param Ipv6AddressCount The number of IPv6 addresses that an instance has. Valid values: 0 and 1.
*/
public void setIpv6AddressCount(Long Ipv6AddressCount) {
this.Ipv6AddressCount = Ipv6AddressCount;
}
/**
* Get Multi-AZ/multi-subnet policy, whose valid values include PRIORITY and EQUALITY, with the default value being PRIORITY.
PRIORITY: Instances are attempted to be created taking the order of the AZ/subnet list as the priority. If the highest-priority AZ/subnet can create instances successfully, instances can always be created in that AZ/subnet.
EQUALITY: The instances added through scale-out will be distributed across multiple AZs/subnets to ensure a relatively balanced number of instances in each AZ/subnet after scaling out.
Points to consider regarding this policy:
When the scaling group is based on a classic network, this policy applies to the multi-AZ; when the scaling group is based on a VPC network, this policy applies to the multi-subnet, in this case, the AZs are no longer considered. For example, if there are four subnets labeled A, B, C, and D, where A, B, and C are in AZ 1 and D is in AZ 2, the subnets A, B, C, and D are considered for sorting without regard to AZs 1 and 2.
This policy applies to the multi-AZ/multi-subnet and not to the InstanceTypes parameter of the launch configuration, which is selected according to the priority policy.
When instances are created according to the PRIORITY policy, ensure the policy for multiple models first, followed by the policy for the multi-AZ/subnet. For example, with models A and B and subnets 1, 2, and 3, attempts will be made in the order of A1, A2, A3, B1, B2, and B3. If A1 is sold out, A2 will be attempted (instead of B1).
* @return MultiZoneSubnetPolicy Multi-AZ/multi-subnet policy, whose valid values include PRIORITY and EQUALITY, with the default value being PRIORITY.
PRIORITY: Instances are attempted to be created taking the order of the AZ/subnet list as the priority. If the highest-priority AZ/subnet can create instances successfully, instances can always be created in that AZ/subnet.
EQUALITY: The instances added through scale-out will be distributed across multiple AZs/subnets to ensure a relatively balanced number of instances in each AZ/subnet after scaling out.
Points to consider regarding this policy:
When the scaling group is based on a classic network, this policy applies to the multi-AZ; when the scaling group is based on a VPC network, this policy applies to the multi-subnet, in this case, the AZs are no longer considered. For example, if there are four subnets labeled A, B, C, and D, where A, B, and C are in AZ 1 and D is in AZ 2, the subnets A, B, C, and D are considered for sorting without regard to AZs 1 and 2.
This policy applies to the multi-AZ/multi-subnet and not to the InstanceTypes parameter of the launch configuration, which is selected according to the priority policy.
When instances are created according to the PRIORITY policy, ensure the policy for multiple models first, followed by the policy for the multi-AZ/subnet. For example, with models A and B and subnets 1, 2, and 3, attempts will be made in the order of A1, A2, A3, B1, B2, and B3. If A1 is sold out, A2 will be attempted (instead of B1).
*/
public String getMultiZoneSubnetPolicy() {
return this.MultiZoneSubnetPolicy;
}
/**
* Set Multi-AZ/multi-subnet policy, whose valid values include PRIORITY and EQUALITY, with the default value being PRIORITY.
PRIORITY: Instances are attempted to be created taking the order of the AZ/subnet list as the priority. If the highest-priority AZ/subnet can create instances successfully, instances can always be created in that AZ/subnet.
EQUALITY: The instances added through scale-out will be distributed across multiple AZs/subnets to ensure a relatively balanced number of instances in each AZ/subnet after scaling out.
Points to consider regarding this policy:
When the scaling group is based on a classic network, this policy applies to the multi-AZ; when the scaling group is based on a VPC network, this policy applies to the multi-subnet, in this case, the AZs are no longer considered. For example, if there are four subnets labeled A, B, C, and D, where A, B, and C are in AZ 1 and D is in AZ 2, the subnets A, B, C, and D are considered for sorting without regard to AZs 1 and 2.
This policy applies to the multi-AZ/multi-subnet and not to the InstanceTypes parameter of the launch configuration, which is selected according to the priority policy.
When instances are created according to the PRIORITY policy, ensure the policy for multiple models first, followed by the policy for the multi-AZ/subnet. For example, with models A and B and subnets 1, 2, and 3, attempts will be made in the order of A1, A2, A3, B1, B2, and B3. If A1 is sold out, A2 will be attempted (instead of B1).
* @param MultiZoneSubnetPolicy Multi-AZ/multi-subnet policy, whose valid values include PRIORITY and EQUALITY, with the default value being PRIORITY.
PRIORITY: Instances are attempted to be created taking the order of the AZ/subnet list as the priority. If the highest-priority AZ/subnet can create instances successfully, instances can always be created in that AZ/subnet.
EQUALITY: The instances added through scale-out will be distributed across multiple AZs/subnets to ensure a relatively balanced number of instances in each AZ/subnet after scaling out.
Points to consider regarding this policy:
When the scaling group is based on a classic network, this policy applies to the multi-AZ; when the scaling group is based on a VPC network, this policy applies to the multi-subnet, in this case, the AZs are no longer considered. For example, if there are four subnets labeled A, B, C, and D, where A, B, and C are in AZ 1 and D is in AZ 2, the subnets A, B, C, and D are considered for sorting without regard to AZs 1 and 2.
This policy applies to the multi-AZ/multi-subnet and not to the InstanceTypes parameter of the launch configuration, which is selected according to the priority policy.
When instances are created according to the PRIORITY policy, ensure the policy for multiple models first, followed by the policy for the multi-AZ/subnet. For example, with models A and B and subnets 1, 2, and 3, attempts will be made in the order of A1, A2, A3, B1, B2, and B3. If A1 is sold out, A2 will be attempted (instead of B1).
*/
public void setMultiZoneSubnetPolicy(String MultiZoneSubnetPolicy) {
this.MultiZoneSubnetPolicy = MultiZoneSubnetPolicy;
}
/**
* Get Scaling group instance health check type, whose valid values include:
CVM: Determines whether an instance is unhealthy based on its network status. An unhealthy network status is indicated by an event where instances become unreachable via PING. Detailed criteria of judgment can be found in [Instance Health Check](https://intl.cloud.tencent.com/document/product/377/8553?from_cn_redirect=1).
CLB: Determines whether an instance is unhealthy based on the health check status of CLB. For principles behind CLB health checks, see [Health Check](https://intl.cloud.tencent.com/document/product/214/6097?from_cn_redirect=1).
* @return HealthCheckType Scaling group instance health check type, whose valid values include:
CVM: Determines whether an instance is unhealthy based on its network status. An unhealthy network status is indicated by an event where instances become unreachable via PING. Detailed criteria of judgment can be found in [Instance Health Check](https://intl.cloud.tencent.com/document/product/377/8553?from_cn_redirect=1).
CLB: Determines whether an instance is unhealthy based on the health check status of CLB. For principles behind CLB health checks, see [Health Check](https://intl.cloud.tencent.com/document/product/214/6097?from_cn_redirect=1).
*/
public String getHealthCheckType() {
return this.HealthCheckType;
}
/**
* Set Scaling group instance health check type, whose valid values include:
CVM: Determines whether an instance is unhealthy based on its network status. An unhealthy network status is indicated by an event where instances become unreachable via PING. Detailed criteria of judgment can be found in [Instance Health Check](https://intl.cloud.tencent.com/document/product/377/8553?from_cn_redirect=1).
CLB: Determines whether an instance is unhealthy based on the health check status of CLB. For principles behind CLB health checks, see [Health Check](https://intl.cloud.tencent.com/document/product/214/6097?from_cn_redirect=1).
* @param HealthCheckType Scaling group instance health check type, whose valid values include:
CVM: Determines whether an instance is unhealthy based on its network status. An unhealthy network status is indicated by an event where instances become unreachable via PING. Detailed criteria of judgment can be found in [Instance Health Check](https://intl.cloud.tencent.com/document/product/377/8553?from_cn_redirect=1).
CLB: Determines whether an instance is unhealthy based on the health check status of CLB. For principles behind CLB health checks, see [Health Check](https://intl.cloud.tencent.com/document/product/214/6097?from_cn_redirect=1).
*/
public void setHealthCheckType(String HealthCheckType) {
this.HealthCheckType = HealthCheckType;
}
/**
* Get Grace period of the CLB health check
* @return LoadBalancerHealthCheckGracePeriod Grace period of the CLB health check
*/
public Long getLoadBalancerHealthCheckGracePeriod() {
return this.LoadBalancerHealthCheckGracePeriod;
}
/**
* Set Grace period of the CLB health check
* @param LoadBalancerHealthCheckGracePeriod Grace period of the CLB health check
*/
public void setLoadBalancerHealthCheckGracePeriod(Long LoadBalancerHealthCheckGracePeriod) {
this.LoadBalancerHealthCheckGracePeriod = LoadBalancerHealthCheckGracePeriod;
}
/**
* Get Instance assignment policy, whose valid values include LAUNCH_CONFIGURATION and SPOT_MIXED.
LAUNCH_CONFIGURATION: Represent the traditional mode of assigning instances according to the launch configuration.
SPOT_MIXED: Represent the spot mixed mode. Currently, this mode is supported only when the launch configuration is set to the pay-as-you-go billing mode. In the mixed mode, the scaling group will scale out pay-as-you-go models or spot models based on the predefined settings. When the mixed mode is used, the billing type of the associated launch configuration cannot be modified.
* @return InstanceAllocationPolicy Instance assignment policy, whose valid values include LAUNCH_CONFIGURATION and SPOT_MIXED.
LAUNCH_CONFIGURATION: Represent the traditional mode of assigning instances according to the launch configuration.
SPOT_MIXED: Represent the spot mixed mode. Currently, this mode is supported only when the launch configuration is set to the pay-as-you-go billing mode. In the mixed mode, the scaling group will scale out pay-as-you-go models or spot models based on the predefined settings. When the mixed mode is used, the billing type of the associated launch configuration cannot be modified.
*/
public String getInstanceAllocationPolicy() {
return this.InstanceAllocationPolicy;
}
/**
* Set Instance assignment policy, whose valid values include LAUNCH_CONFIGURATION and SPOT_MIXED.
LAUNCH_CONFIGURATION: Represent the traditional mode of assigning instances according to the launch configuration.
SPOT_MIXED: Represent the spot mixed mode. Currently, this mode is supported only when the launch configuration is set to the pay-as-you-go billing mode. In the mixed mode, the scaling group will scale out pay-as-you-go models or spot models based on the predefined settings. When the mixed mode is used, the billing type of the associated launch configuration cannot be modified.
* @param InstanceAllocationPolicy Instance assignment policy, whose valid values include LAUNCH_CONFIGURATION and SPOT_MIXED.
LAUNCH_CONFIGURATION: Represent the traditional mode of assigning instances according to the launch configuration.
SPOT_MIXED: Represent the spot mixed mode. Currently, this mode is supported only when the launch configuration is set to the pay-as-you-go billing mode. In the mixed mode, the scaling group will scale out pay-as-you-go models or spot models based on the predefined settings. When the mixed mode is used, the billing type of the associated launch configuration cannot be modified.
*/
public void setInstanceAllocationPolicy(String InstanceAllocationPolicy) {
this.InstanceAllocationPolicy = InstanceAllocationPolicy;
}
/**
* Get Specifies how to assign pay-as-you-go instances and spot instances.
This parameter is valid only when `InstanceAllocationPolicy` is set to `SPOT_MIXED`.
* @return SpotMixedAllocationPolicy Specifies how to assign pay-as-you-go instances and spot instances.
This parameter is valid only when `InstanceAllocationPolicy` is set to `SPOT_MIXED`.
*/
public SpotMixedAllocationPolicy getSpotMixedAllocationPolicy() {
return this.SpotMixedAllocationPolicy;
}
/**
* Set Specifies how to assign pay-as-you-go instances and spot instances.
This parameter is valid only when `InstanceAllocationPolicy` is set to `SPOT_MIXED`.
* @param SpotMixedAllocationPolicy Specifies how to assign pay-as-you-go instances and spot instances.
This parameter is valid only when `InstanceAllocationPolicy` is set to `SPOT_MIXED`.
*/
public void setSpotMixedAllocationPolicy(SpotMixedAllocationPolicy SpotMixedAllocationPolicy) {
this.SpotMixedAllocationPolicy = SpotMixedAllocationPolicy;
}
/**
* Get Capacity rebalancing feature, which is applicable only to spot instances within the scaling group. Valid values:
TRUE: Enable this feature. When spot instances in the scaling group are about to be automatically recycled by the spot instance service, AS proactively initiates the termination process of the spot instances. If there is a configured scale-in hook, it will be triggered before termination. After the termination process starts, AS asynchronously initiates the scale-out to reach the expected number of instances.
FALSE: Disable this feature. AS waits for the spot instance to be terminated before scaling out to reach the number of instances expected by the scaling group.
* @return CapacityRebalance Capacity rebalancing feature, which is applicable only to spot instances within the scaling group. Valid values:
TRUE: Enable this feature. When spot instances in the scaling group are about to be automatically recycled by the spot instance service, AS proactively initiates the termination process of the spot instances. If there is a configured scale-in hook, it will be triggered before termination. After the termination process starts, AS asynchronously initiates the scale-out to reach the expected number of instances.
FALSE: Disable this feature. AS waits for the spot instance to be terminated before scaling out to reach the number of instances expected by the scaling group.
*/
public Boolean getCapacityRebalance() {
return this.CapacityRebalance;
}
/**
* Set Capacity rebalancing feature, which is applicable only to spot instances within the scaling group. Valid values:
TRUE: Enable this feature. When spot instances in the scaling group are about to be automatically recycled by the spot instance service, AS proactively initiates the termination process of the spot instances. If there is a configured scale-in hook, it will be triggered before termination. After the termination process starts, AS asynchronously initiates the scale-out to reach the expected number of instances.
FALSE: Disable this feature. AS waits for the spot instance to be terminated before scaling out to reach the number of instances expected by the scaling group.
* @param CapacityRebalance Capacity rebalancing feature, which is applicable only to spot instances within the scaling group. Valid values:
TRUE: Enable this feature. When spot instances in the scaling group are about to be automatically recycled by the spot instance service, AS proactively initiates the termination process of the spot instances. If there is a configured scale-in hook, it will be triggered before termination. After the termination process starts, AS asynchronously initiates the scale-out to reach the expected number of instances.
FALSE: Disable this feature. AS waits for the spot instance to be terminated before scaling out to reach the number of instances expected by the scaling group.
*/
public void setCapacityRebalance(Boolean CapacityRebalance) {
this.CapacityRebalance = CapacityRebalance;
}
/**
* Get Instance name sequencing settings. When enabled, an incremental numeric sequence will be appended to the names of instances automatically created within the scaling group.
* @return InstanceNameIndexSettings Instance name sequencing settings. When enabled, an incremental numeric sequence will be appended to the names of instances automatically created within the scaling group.
*/
public InstanceNameIndexSettings getInstanceNameIndexSettings() {
return this.InstanceNameIndexSettings;
}
/**
* Set Instance name sequencing settings. When enabled, an incremental numeric sequence will be appended to the names of instances automatically created within the scaling group.
* @param InstanceNameIndexSettings Instance name sequencing settings. When enabled, an incremental numeric sequence will be appended to the names of instances automatically created within the scaling group.
*/
public void setInstanceNameIndexSettings(InstanceNameIndexSettings InstanceNameIndexSettings) {
this.InstanceNameIndexSettings = InstanceNameIndexSettings;
}
public ModifyAutoScalingGroupRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public ModifyAutoScalingGroupRequest(ModifyAutoScalingGroupRequest source) {
if (source.AutoScalingGroupId != null) {
this.AutoScalingGroupId = new String(source.AutoScalingGroupId);
}
if (source.AutoScalingGroupName != null) {
this.AutoScalingGroupName = new String(source.AutoScalingGroupName);
}
if (source.DefaultCooldown != null) {
this.DefaultCooldown = new Long(source.DefaultCooldown);
}
if (source.DesiredCapacity != null) {
this.DesiredCapacity = new Long(source.DesiredCapacity);
}
if (source.LaunchConfigurationId != null) {
this.LaunchConfigurationId = new String(source.LaunchConfigurationId);
}
if (source.MaxSize != null) {
this.MaxSize = new Long(source.MaxSize);
}
if (source.MinSize != null) {
this.MinSize = new Long(source.MinSize);
}
if (source.ProjectId != null) {
this.ProjectId = new Long(source.ProjectId);
}
if (source.SubnetIds != null) {
this.SubnetIds = new String[source.SubnetIds.length];
for (int i = 0; i < source.SubnetIds.length; i++) {
this.SubnetIds[i] = new String(source.SubnetIds[i]);
}
}
if (source.TerminationPolicies != null) {
this.TerminationPolicies = new String[source.TerminationPolicies.length];
for (int i = 0; i < source.TerminationPolicies.length; i++) {
this.TerminationPolicies[i] = new String(source.TerminationPolicies[i]);
}
}
if (source.VpcId != null) {
this.VpcId = new String(source.VpcId);
}
if (source.Zones != null) {
this.Zones = new String[source.Zones.length];
for (int i = 0; i < source.Zones.length; i++) {
this.Zones[i] = new String(source.Zones[i]);
}
}
if (source.RetryPolicy != null) {
this.RetryPolicy = new String(source.RetryPolicy);
}
if (source.ZonesCheckPolicy != null) {
this.ZonesCheckPolicy = new String(source.ZonesCheckPolicy);
}
if (source.ServiceSettings != null) {
this.ServiceSettings = new ServiceSettings(source.ServiceSettings);
}
if (source.Ipv6AddressCount != null) {
this.Ipv6AddressCount = new Long(source.Ipv6AddressCount);
}
if (source.MultiZoneSubnetPolicy != null) {
this.MultiZoneSubnetPolicy = new String(source.MultiZoneSubnetPolicy);
}
if (source.HealthCheckType != null) {
this.HealthCheckType = new String(source.HealthCheckType);
}
if (source.LoadBalancerHealthCheckGracePeriod != null) {
this.LoadBalancerHealthCheckGracePeriod = new Long(source.LoadBalancerHealthCheckGracePeriod);
}
if (source.InstanceAllocationPolicy != null) {
this.InstanceAllocationPolicy = new String(source.InstanceAllocationPolicy);
}
if (source.SpotMixedAllocationPolicy != null) {
this.SpotMixedAllocationPolicy = new SpotMixedAllocationPolicy(source.SpotMixedAllocationPolicy);
}
if (source.CapacityRebalance != null) {
this.CapacityRebalance = new Boolean(source.CapacityRebalance);
}
if (source.InstanceNameIndexSettings != null) {
this.InstanceNameIndexSettings = new InstanceNameIndexSettings(source.InstanceNameIndexSettings);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "AutoScalingGroupId", this.AutoScalingGroupId);
this.setParamSimple(map, prefix + "AutoScalingGroupName", this.AutoScalingGroupName);
this.setParamSimple(map, prefix + "DefaultCooldown", this.DefaultCooldown);
this.setParamSimple(map, prefix + "DesiredCapacity", this.DesiredCapacity);
this.setParamSimple(map, prefix + "LaunchConfigurationId", this.LaunchConfigurationId);
this.setParamSimple(map, prefix + "MaxSize", this.MaxSize);
this.setParamSimple(map, prefix + "MinSize", this.MinSize);
this.setParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.setParamArraySimple(map, prefix + "SubnetIds.", this.SubnetIds);
this.setParamArraySimple(map, prefix + "TerminationPolicies.", this.TerminationPolicies);
this.setParamSimple(map, prefix + "VpcId", this.VpcId);
this.setParamArraySimple(map, prefix + "Zones.", this.Zones);
this.setParamSimple(map, prefix + "RetryPolicy", this.RetryPolicy);
this.setParamSimple(map, prefix + "ZonesCheckPolicy", this.ZonesCheckPolicy);
this.setParamObj(map, prefix + "ServiceSettings.", this.ServiceSettings);
this.setParamSimple(map, prefix + "Ipv6AddressCount", this.Ipv6AddressCount);
this.setParamSimple(map, prefix + "MultiZoneSubnetPolicy", this.MultiZoneSubnetPolicy);
this.setParamSimple(map, prefix + "HealthCheckType", this.HealthCheckType);
this.setParamSimple(map, prefix + "LoadBalancerHealthCheckGracePeriod", this.LoadBalancerHealthCheckGracePeriod);
this.setParamSimple(map, prefix + "InstanceAllocationPolicy", this.InstanceAllocationPolicy);
this.setParamObj(map, prefix + "SpotMixedAllocationPolicy.", this.SpotMixedAllocationPolicy);
this.setParamSimple(map, prefix + "CapacityRebalance", this.CapacityRebalance);
this.setParamObj(map, prefix + "InstanceNameIndexSettings.", this.InstanceNameIndexSettings);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy