/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.autoscaling.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateAutoScalingGroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the Auto Scaling group. *
*/ private String autoScalingGroupName; /** *
* The name of the launch configuration. If you specify LaunchConfigurationName
in your update request,
* you can't specify LaunchTemplate
or MixedInstancesPolicy
.
*
* The launch template and version to use to specify the updates. If you specify LaunchTemplate
in your
* update request, you can't specify LaunchConfigurationName
or MixedInstancesPolicy
.
*
* The mixed instances policy. For more information, see Auto * Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User * Guide. *
*/ private MixedInstancesPolicy mixedInstancesPolicy; /** ** The minimum size of the Auto Scaling group. *
*/ private Integer minSize; /** ** The maximum size of the Auto Scaling group. *
*
* With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
* MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go
* above MaxSize
by more than your largest instance weight (weights that define how many units each
* instance contributes to the desired capacity of the group).
*
* The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the * capacity it attempts to maintain. This number must be greater than or equal to the minimum size of the group and * less than or equal to the maximum size of the group. *
*/ private Integer desiredCapacity; /** ** Only needed if you use simple scaling policies. *
** The amount of time, in seconds, between one scaling activity ending and another one starting due to simple * scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto * Scaling in the Amazon EC2 Auto Scaling User Guide. *
*/ private Integer defaultCooldown; /** ** One or more Availability Zones for the group. *
*/ private com.amazonaws.internal.SdkInternalList* A comma-separated value string of one or more health check types. *
*
* The valid values are EC2
, ELB
, and VPC_LATTICE
. EC2
is the
* default health check and cannot be disabled. For more information, see Health checks for Auto Scaling
* instances in the Amazon EC2 Auto Scaling User Guide.
*
* Only specify EC2
if you must clear a value that was previously set.
*
* The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2
* instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your
* instances do not immediately pass their health checks after they enter the InService
state. For more
* information, see Set the health check
* grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
*
* The name of an existing placement group into which to launch your instances. For more information, see Placement groups in the * Amazon EC2 User Guide for Linux Instances. *
** A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot * specify multiple Availability Zones and a cluster placement group. *
*
* A comma-separated list of subnet IDs for a virtual private cloud (VPC). If you specify
* VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must reside in
* those Availability Zones.
*
* A policy or a list of policies that are used to select the instances to terminate. The policies are executed in * the order that you list them. For more information, see Work with * Amazon EC2 Auto Scaling termination policies in the Amazon EC2 Auto Scaling User Guide. *
*
* Valid values: Default
| AllocationStrategy
| ClosestToNextInstanceHour
|
* NewestInstance
| OldestInstance
| OldestLaunchConfiguration
|
* OldestLaunchTemplate
| arn:aws:lambda:region:account-id:function:my-function:my-alias
*
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling * in. For more information about preventing instances from terminating on scale in, see Using * instance scale-in protection in the Amazon EC2 Auto Scaling User Guide. *
*/ private Boolean newInstancesProtectedFromScaleIn; /** ** The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon * Web Services on your behalf. For more information, see Service-linked * roles in the Amazon EC2 Auto Scaling User Guide. *
*/ private String serviceLinkedRoleARN; /** ** The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, * the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). To clear a previously set * value, specify a new value of 0. For more information, see Replacing Auto * Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide. *
*/ private Integer maxInstanceLifetime; /** ** Enables or disables Capacity Rebalancing. For more information, see Use * Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the Amazon EC2 Auto Scaling User * Guide. *
*/ private Boolean capacityRebalance; /** ** Reserved. *
*/ private String context; /** *
* The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
* DesiredCapacityType
for attribute-based instance type selection only. For more information, see Creating
* an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User
* Guide.
*
* By default, Amazon EC2 Auto Scaling specifies units
, which translates into number of instances.
*
* Valid values: units
| vcpu
| memory-mib
*
* The amount of time, in seconds, until a new instance is considered to have finished initializing and resource
* consumption to become stable after it enters the InService
state.
*
* During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance * before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period * before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that * are used for scaling, resulting in more reliable usage data. For more information, see Set * the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide. *
*
* To manage various warm-up settings at the group level, we recommend that you set the default instance warmup,
* even if it is set to 0 seconds. To remove a value that you previously set, include the property but
* specify -1
for the value. However, we strongly recommend keeping the default instance warmup enabled
* by specifying a value of 0
or other nominal value.
*
* The name of the Auto Scaling group. *
* * @param autoScalingGroupName * The name of the Auto Scaling group. */ public void setAutoScalingGroupName(String autoScalingGroupName) { this.autoScalingGroupName = autoScalingGroupName; } /** ** The name of the Auto Scaling group. *
* * @return The name of the Auto Scaling group. */ public String getAutoScalingGroupName() { return this.autoScalingGroupName; } /** ** The name of the Auto Scaling group. *
* * @param autoScalingGroupName * The name of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withAutoScalingGroupName(String autoScalingGroupName) { setAutoScalingGroupName(autoScalingGroupName); return this; } /** *
* The name of the launch configuration. If you specify LaunchConfigurationName
in your update request,
* you can't specify LaunchTemplate
or MixedInstancesPolicy
.
*
LaunchConfigurationName
in your update
* request, you can't specify LaunchTemplate
or MixedInstancesPolicy
.
*/
public void setLaunchConfigurationName(String launchConfigurationName) {
this.launchConfigurationName = launchConfigurationName;
}
/**
*
* The name of the launch configuration. If you specify LaunchConfigurationName
in your update request,
* you can't specify LaunchTemplate
or MixedInstancesPolicy
.
*
LaunchConfigurationName
in your update
* request, you can't specify LaunchTemplate
or MixedInstancesPolicy
.
*/
public String getLaunchConfigurationName() {
return this.launchConfigurationName;
}
/**
*
* The name of the launch configuration. If you specify LaunchConfigurationName
in your update request,
* you can't specify LaunchTemplate
or MixedInstancesPolicy
.
*
LaunchConfigurationName
in your update
* request, you can't specify LaunchTemplate
or MixedInstancesPolicy
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withLaunchConfigurationName(String launchConfigurationName) {
setLaunchConfigurationName(launchConfigurationName);
return this;
}
/**
*
* The launch template and version to use to specify the updates. If you specify LaunchTemplate
in your
* update request, you can't specify LaunchConfigurationName
or MixedInstancesPolicy
.
*
LaunchTemplate
* in your update request, you can't specify LaunchConfigurationName
or
* MixedInstancesPolicy
.
*/
public void setLaunchTemplate(LaunchTemplateSpecification launchTemplate) {
this.launchTemplate = launchTemplate;
}
/**
*
* The launch template and version to use to specify the updates. If you specify LaunchTemplate
in your
* update request, you can't specify LaunchConfigurationName
or MixedInstancesPolicy
.
*
LaunchTemplate
* in your update request, you can't specify LaunchConfigurationName
or
* MixedInstancesPolicy
.
*/
public LaunchTemplateSpecification getLaunchTemplate() {
return this.launchTemplate;
}
/**
*
* The launch template and version to use to specify the updates. If you specify LaunchTemplate
in your
* update request, you can't specify LaunchConfigurationName
or MixedInstancesPolicy
.
*
LaunchTemplate
* in your update request, you can't specify LaunchConfigurationName
or
* MixedInstancesPolicy
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withLaunchTemplate(LaunchTemplateSpecification launchTemplate) {
setLaunchTemplate(launchTemplate);
return this;
}
/**
* * The mixed instances policy. For more information, see Auto * Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User * Guide. *
* * @param mixedInstancesPolicy * The mixed instances policy. For more information, see Auto * Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling * User Guide. */ public void setMixedInstancesPolicy(MixedInstancesPolicy mixedInstancesPolicy) { this.mixedInstancesPolicy = mixedInstancesPolicy; } /** ** The mixed instances policy. For more information, see Auto * Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User * Guide. *
* * @return The mixed instances policy. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto * Scaling User Guide. */ public MixedInstancesPolicy getMixedInstancesPolicy() { return this.mixedInstancesPolicy; } /** ** The mixed instances policy. For more information, see Auto * Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User * Guide. *
* * @param mixedInstancesPolicy * The mixed instances policy. For more information, see Auto * Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling * User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withMixedInstancesPolicy(MixedInstancesPolicy mixedInstancesPolicy) { setMixedInstancesPolicy(mixedInstancesPolicy); return this; } /** ** The minimum size of the Auto Scaling group. *
* * @param minSize * The minimum size of the Auto Scaling group. */ public void setMinSize(Integer minSize) { this.minSize = minSize; } /** ** The minimum size of the Auto Scaling group. *
* * @return The minimum size of the Auto Scaling group. */ public Integer getMinSize() { return this.minSize; } /** ** The minimum size of the Auto Scaling group. *
* * @param minSize * The minimum size of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withMinSize(Integer minSize) { setMinSize(minSize); return this; } /** ** The maximum size of the Auto Scaling group. *
*
* With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
* MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go
* above MaxSize
by more than your largest instance weight (weights that define how many units each
* instance contributes to the desired capacity of the group).
*
* With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
* MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never
* go above MaxSize
by more than your largest instance weight (weights that define how many
* units each instance contributes to the desired capacity of the group).
*
* The maximum size of the Auto Scaling group. *
*
* With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
* MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go
* above MaxSize
by more than your largest instance weight (weights that define how many units each
* instance contributes to the desired capacity of the group).
*
* With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
* MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will
* never go above MaxSize
by more than your largest instance weight (weights that define how
* many units each instance contributes to the desired capacity of the group).
*
* The maximum size of the Auto Scaling group. *
*
* With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
* MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go
* above MaxSize
by more than your largest instance weight (weights that define how many units each
* instance contributes to the desired capacity of the group).
*
* With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
* MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never
* go above MaxSize
by more than your largest instance weight (weights that define how many
* units each instance contributes to the desired capacity of the group).
*
* The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the * capacity it attempts to maintain. This number must be greater than or equal to the minimum size of the group and * less than or equal to the maximum size of the group. *
* * @param desiredCapacity * The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and * the capacity it attempts to maintain. This number must be greater than or equal to the minimum size of the * group and less than or equal to the maximum size of the group. */ public void setDesiredCapacity(Integer desiredCapacity) { this.desiredCapacity = desiredCapacity; } /** ** The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the * capacity it attempts to maintain. This number must be greater than or equal to the minimum size of the group and * less than or equal to the maximum size of the group. *
* * @return The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and * the capacity it attempts to maintain. This number must be greater than or equal to the minimum size of * the group and less than or equal to the maximum size of the group. */ public Integer getDesiredCapacity() { return this.desiredCapacity; } /** ** The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the * capacity it attempts to maintain. This number must be greater than or equal to the minimum size of the group and * less than or equal to the maximum size of the group. *
* * @param desiredCapacity * The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and * the capacity it attempts to maintain. This number must be greater than or equal to the minimum size of the * group and less than or equal to the maximum size of the group. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withDesiredCapacity(Integer desiredCapacity) { setDesiredCapacity(desiredCapacity); return this; } /** ** Only needed if you use simple scaling policies. *
** The amount of time, in seconds, between one scaling activity ending and another one starting due to simple * scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto * Scaling in the Amazon EC2 Auto Scaling User Guide. *
* * @param defaultCooldown * Only needed if you use simple scaling policies. ** The amount of time, in seconds, between one scaling activity ending and another one starting due to simple * scaling policies. For more information, see Scaling cooldowns for Amazon * EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. */ public void setDefaultCooldown(Integer defaultCooldown) { this.defaultCooldown = defaultCooldown; } /** *
* Only needed if you use simple scaling policies. *
** The amount of time, in seconds, between one scaling activity ending and another one starting due to simple * scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto * Scaling in the Amazon EC2 Auto Scaling User Guide. *
* * @return Only needed if you use simple scaling policies. ** The amount of time, in seconds, between one scaling activity ending and another one starting due to * simple scaling policies. For more information, see Scaling cooldowns for Amazon * EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. */ public Integer getDefaultCooldown() { return this.defaultCooldown; } /** *
* Only needed if you use simple scaling policies. *
** The amount of time, in seconds, between one scaling activity ending and another one starting due to simple * scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto * Scaling in the Amazon EC2 Auto Scaling User Guide. *
* * @param defaultCooldown * Only needed if you use simple scaling policies. ** The amount of time, in seconds, between one scaling activity ending and another one starting due to simple * scaling policies. For more information, see Scaling cooldowns for Amazon * EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withDefaultCooldown(Integer defaultCooldown) { setDefaultCooldown(defaultCooldown); return this; } /** *
* One or more Availability Zones for the group. *
* * @return One or more Availability Zones for the group. */ public java.util.List* One or more Availability Zones for the group. *
* * @param availabilityZones * One or more Availability Zones for the group. */ public void setAvailabilityZones(java.util.Collection* One or more Availability Zones for the group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if * you want to override the existing values. *
* * @param availabilityZones * One or more Availability Zones for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withAvailabilityZones(String... availabilityZones) { if (this.availabilityZones == null) { setAvailabilityZones(new com.amazonaws.internal.SdkInternalList* One or more Availability Zones for the group. *
* * @param availabilityZones * One or more Availability Zones for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withAvailabilityZones(java.util.Collection* A comma-separated value string of one or more health check types. *
*
* The valid values are EC2
, ELB
, and VPC_LATTICE
. EC2
is the
* default health check and cannot be disabled. For more information, see Health checks for Auto Scaling
* instances in the Amazon EC2 Auto Scaling User Guide.
*
* Only specify EC2
if you must clear a value that was previously set.
*
* The valid values are EC2
, ELB
, and VPC_LATTICE
. EC2
is
* the default health check and cannot be disabled. For more information, see Health checks for Auto
* Scaling instances in the Amazon EC2 Auto Scaling User Guide.
*
* Only specify EC2
if you must clear a value that was previously set.
*/
public void setHealthCheckType(String healthCheckType) {
this.healthCheckType = healthCheckType;
}
/**
*
* A comma-separated value string of one or more health check types. *
*
* The valid values are EC2
, ELB
, and VPC_LATTICE
. EC2
is the
* default health check and cannot be disabled. For more information, see Health checks for Auto Scaling
* instances in the Amazon EC2 Auto Scaling User Guide.
*
* Only specify EC2
if you must clear a value that was previously set.
*
* The valid values are EC2
, ELB
, and VPC_LATTICE
. EC2
* is the default health check and cannot be disabled. For more information, see Health checks for Auto
* Scaling instances in the Amazon EC2 Auto Scaling User Guide.
*
* Only specify EC2
if you must clear a value that was previously set.
*/
public String getHealthCheckType() {
return this.healthCheckType;
}
/**
*
* A comma-separated value string of one or more health check types. *
*
* The valid values are EC2
, ELB
, and VPC_LATTICE
. EC2
is the
* default health check and cannot be disabled. For more information, see Health checks for Auto Scaling
* instances in the Amazon EC2 Auto Scaling User Guide.
*
* Only specify EC2
if you must clear a value that was previously set.
*
* The valid values are EC2
, ELB
, and VPC_LATTICE
. EC2
is
* the default health check and cannot be disabled. For more information, see Health checks for Auto
* Scaling instances in the Amazon EC2 Auto Scaling User Guide.
*
* Only specify EC2
if you must clear a value that was previously set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withHealthCheckType(String healthCheckType) {
setHealthCheckType(healthCheckType);
return this;
}
/**
*
* The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2
* instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your
* instances do not immediately pass their health checks after they enter the InService
state. For more
* information, see Set the health check
* grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
*
InService
state. For more information, see Set the health
* check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
*/
public void setHealthCheckGracePeriod(Integer healthCheckGracePeriod) {
this.healthCheckGracePeriod = healthCheckGracePeriod;
}
/**
*
* The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2
* instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your
* instances do not immediately pass their health checks after they enter the InService
state. For more
* information, see Set the health check
* grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
*
InService
state. For more information, see Set the
* health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
*/
public Integer getHealthCheckGracePeriod() {
return this.healthCheckGracePeriod;
}
/**
*
* The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2
* instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your
* instances do not immediately pass their health checks after they enter the InService
state. For more
* information, see Set the health check
* grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
*
InService
state. For more information, see Set the health
* check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withHealthCheckGracePeriod(Integer healthCheckGracePeriod) {
setHealthCheckGracePeriod(healthCheckGracePeriod);
return this;
}
/**
* * The name of an existing placement group into which to launch your instances. For more information, see Placement groups in the * Amazon EC2 User Guide for Linux Instances. *
** A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot * specify multiple Availability Zones and a cluster placement group. *
** A cluster placement group is a logical grouping of instances within a single Availability Zone. You * cannot specify multiple Availability Zones and a cluster placement group. *
*/ public void setPlacementGroup(String placementGroup) { this.placementGroup = placementGroup; } /** ** The name of an existing placement group into which to launch your instances. For more information, see Placement groups in the * Amazon EC2 User Guide for Linux Instances. *
** A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot * specify multiple Availability Zones and a cluster placement group. *
** A cluster placement group is a logical grouping of instances within a single Availability Zone. * You cannot specify multiple Availability Zones and a cluster placement group. *
*/ public String getPlacementGroup() { return this.placementGroup; } /** ** The name of an existing placement group into which to launch your instances. For more information, see Placement groups in the * Amazon EC2 User Guide for Linux Instances. *
** A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot * specify multiple Availability Zones and a cluster placement group. *
** A cluster placement group is a logical grouping of instances within a single Availability Zone. You * cannot specify multiple Availability Zones and a cluster placement group. *
* @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutoScalingGroupRequest withPlacementGroup(String placementGroup) { setPlacementGroup(placementGroup); return this; } /** *
* A comma-separated list of subnet IDs for a virtual private cloud (VPC). If you specify
* VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must reside in
* those Availability Zones.
*
VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must
* reside in those Availability Zones.
*/
public void setVPCZoneIdentifier(String vPCZoneIdentifier) {
this.vPCZoneIdentifier = vPCZoneIdentifier;
}
/**
*
* A comma-separated list of subnet IDs for a virtual private cloud (VPC). If you specify
* VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must reside in
* those Availability Zones.
*
VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must
* reside in those Availability Zones.
*/
public String getVPCZoneIdentifier() {
return this.vPCZoneIdentifier;
}
/**
*
* A comma-separated list of subnet IDs for a virtual private cloud (VPC). If you specify
* VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must reside in
* those Availability Zones.
*
VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must
* reside in those Availability Zones.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withVPCZoneIdentifier(String vPCZoneIdentifier) {
setVPCZoneIdentifier(vPCZoneIdentifier);
return this;
}
/**
* * A policy or a list of policies that are used to select the instances to terminate. The policies are executed in * the order that you list them. For more information, see Work with * Amazon EC2 Auto Scaling termination policies in the Amazon EC2 Auto Scaling User Guide. *
*
* Valid values: Default
| AllocationStrategy
| ClosestToNextInstanceHour
|
* NewestInstance
| OldestInstance
| OldestLaunchConfiguration
|
* OldestLaunchTemplate
| arn:aws:lambda:region:account-id:function:my-function:my-alias
*
* Valid values:
* A policy or a list of policies that are used to select the instances to terminate. The policies are executed in
* the order that you list them. For more information, see Work with
* Amazon EC2 Auto Scaling termination policies in the Amazon EC2 Auto Scaling User Guide.
*
* Valid values: Default
| AllocationStrategy
|
* ClosestToNextInstanceHour
| NewestInstance
| OldestInstance
|
* OldestLaunchConfiguration
| OldestLaunchTemplate
|
* arn:aws:lambda:region:account-id:function:my-function:my-alias
*/
public java.util.ListDefault
| AllocationStrategy
| ClosestToNextInstanceHour
|
* NewestInstance
| OldestInstance
| OldestLaunchConfiguration
|
* OldestLaunchTemplate
| arn:aws:lambda:region:account-id:function:my-function:my-alias
*
* Valid values:
* A policy or a list of policies that are used to select the instances to terminate. The policies are executed in
* the order that you list them. For more information, see Work with
* Amazon EC2 Auto Scaling termination policies in the Amazon EC2 Auto Scaling User Guide.
*
* Valid values:
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTerminationPolicies(java.util.Collection)} or {@link #withTerminationPolicies(java.util.Collection)}
* if you want to override the existing values.
* Default
| AllocationStrategy
|
* ClosestToNextInstanceHour
| NewestInstance
| OldestInstance
|
* OldestLaunchConfiguration
| OldestLaunchTemplate
|
* arn:aws:lambda:region:account-id:function:my-function:my-alias
*/
public void setTerminationPolicies(java.util.CollectionDefault
| AllocationStrategy
| ClosestToNextInstanceHour
|
* NewestInstance
| OldestInstance
| OldestLaunchConfiguration
|
* OldestLaunchTemplate
| arn:aws:lambda:region:account-id:function:my-function:my-alias
*
* Valid values:
* A policy or a list of policies that are used to select the instances to terminate. The policies are executed in
* the order that you list them. For more information, see Work with
* Amazon EC2 Auto Scaling termination policies in the Amazon EC2 Auto Scaling User Guide.
*
* Valid values: Default
| AllocationStrategy
|
* ClosestToNextInstanceHour
| NewestInstance
| OldestInstance
|
* OldestLaunchConfiguration
| OldestLaunchTemplate
|
* arn:aws:lambda:region:account-id:function:my-function:my-alias
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withTerminationPolicies(String... terminationPolicies) {
if (this.terminationPolicies == null) {
setTerminationPolicies(new com.amazonaws.internal.SdkInternalListDefault
| AllocationStrategy
| ClosestToNextInstanceHour
|
* NewestInstance
| OldestInstance
| OldestLaunchConfiguration
|
* OldestLaunchTemplate
| arn:aws:lambda:region:account-id:function:my-function:my-alias
*
* Valid values:
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling
* in. For more information about preventing instances from terminating on scale in, see Using
* instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
*
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling
* in. For more information about preventing instances from terminating on scale in, see Using
* instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
*
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling
* in. For more information about preventing instances from terminating on scale in, see Using
* instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
*
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling
* in. For more information about preventing instances from terminating on scale in, see Using
* instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
*
* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon
* Web Services on your behalf. For more information, see Service-linked
* roles in the Amazon EC2 Auto Scaling User Guide.
*
* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon
* Web Services on your behalf. For more information, see Service-linked
* roles in the Amazon EC2 Auto Scaling User Guide.
*
* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon
* Web Services on your behalf. For more information, see Service-linked
* roles in the Amazon EC2 Auto Scaling User Guide.
*
* The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified,
* the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). To clear a previously set
* value, specify a new value of 0. For more information, see Replacing Auto
* Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide.
*
* The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified,
* the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). To clear a previously set
* value, specify a new value of 0. For more information, see Replacing Auto
* Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide.
*
* The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified,
* the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). To clear a previously set
* value, specify a new value of 0. For more information, see Replacing Auto
* Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide.
*
* Enables or disables Capacity Rebalancing. For more information, see Use
* Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the Amazon EC2 Auto Scaling User
* Guide.
*
* Enables or disables Capacity Rebalancing. For more information, see Use
* Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the Amazon EC2 Auto Scaling User
* Guide.
*
* Enables or disables Capacity Rebalancing. For more information, see Use
* Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the Amazon EC2 Auto Scaling User
* Guide.
*
* Enables or disables Capacity Rebalancing. For more information, see Use
* Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the Amazon EC2 Auto Scaling User
* Guide.
*
* Reserved.
*
* Reserved.
*
* Reserved.
*
* The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
*
* By default, Amazon EC2 Auto Scaling specifies
* Valid values: Default
| AllocationStrategy
|
* ClosestToNextInstanceHour
| NewestInstance
| OldestInstance
|
* OldestLaunchConfiguration
| OldestLaunchTemplate
|
* arn:aws:lambda:region:account-id:function:my-function:my-alias
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withTerminationPolicies(java.util.CollectionDesiredCapacityType
for attribute-based instance type selection only. For more information, see Creating
* an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User
* Guide.
* units
, which translates into number of instances.
* units
| vcpu
| memory-mib
* DesiredCapacityType
for attribute-based instance type selection only. For more information,
* see Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2
* Auto Scaling User Guide.
* By default, Amazon EC2 Auto Scaling specifies units
, which translates into number of
* instances.
*
* Valid values: units
| vcpu
| memory-mib
*/
public void setDesiredCapacityType(String desiredCapacityType) {
this.desiredCapacityType = desiredCapacityType;
}
/**
*
* The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
* DesiredCapacityType
for attribute-based instance type selection only. For more information, see Creating
* an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User
* Guide.
*
* By default, Amazon EC2 Auto Scaling specifies units
, which translates into number of instances.
*
* Valid values: units
| vcpu
| memory-mib
*
DesiredCapacityType
for attribute-based instance type selection only. For more information,
* see Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2
* Auto Scaling User Guide.
*
* By default, Amazon EC2 Auto Scaling specifies units
, which translates into number of
* instances.
*
* Valid values: units
| vcpu
| memory-mib
*/
public String getDesiredCapacityType() {
return this.desiredCapacityType;
}
/**
*
* The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
* DesiredCapacityType
for attribute-based instance type selection only. For more information, see Creating
* an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User
* Guide.
*
* By default, Amazon EC2 Auto Scaling specifies units
, which translates into number of instances.
*
* Valid values: units
| vcpu
| memory-mib
*
DesiredCapacityType
for attribute-based instance type selection only. For more information,
* see Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2
* Auto Scaling User Guide.
*
* By default, Amazon EC2 Auto Scaling specifies units
, which translates into number of
* instances.
*
* Valid values: units
| vcpu
| memory-mib
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutoScalingGroupRequest withDesiredCapacityType(String desiredCapacityType) {
setDesiredCapacityType(desiredCapacityType);
return this;
}
/**
*
* The amount of time, in seconds, until a new instance is considered to have finished initializing and resource
* consumption to become stable after it enters the InService
state.
*
* During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance * before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period * before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that * are used for scaling, resulting in more reliable usage data. For more information, see Set * the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide. *
*
* To manage various warm-up settings at the group level, we recommend that you set the default instance warmup,
* even if it is set to 0 seconds. To remove a value that you previously set, include the property but
* specify -1
for the value. However, we strongly recommend keeping the default instance warmup enabled
* by specifying a value of 0
or other nominal value.
*
InService
state.
* * During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an * instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the * warm-up period before aggregating the metrics for new instances with existing instances in the Amazon * CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, * see Set * the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User * Guide. *
*
* To manage various warm-up settings at the group level, we recommend that you set the default instance
* warmup, even if it is set to 0 seconds. To remove a value that you previously set, include the
* property but specify -1
for the value. However, we strongly recommend keeping the default
* instance warmup enabled by specifying a value of 0
or other nominal value.
*
* The amount of time, in seconds, until a new instance is considered to have finished initializing and resource
* consumption to become stable after it enters the InService
state.
*
* During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance * before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period * before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that * are used for scaling, resulting in more reliable usage data. For more information, see Set * the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide. *
*
* To manage various warm-up settings at the group level, we recommend that you set the default instance warmup,
* even if it is set to 0 seconds. To remove a value that you previously set, include the property but
* specify -1
for the value. However, we strongly recommend keeping the default instance warmup enabled
* by specifying a value of 0
or other nominal value.
*
InService
state.
* * During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an * instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the * warm-up period before aggregating the metrics for new instances with existing instances in the Amazon * CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more * information, see Set * the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User * Guide. *
*
* To manage various warm-up settings at the group level, we recommend that you set the default instance
* warmup, even if it is set to 0 seconds. To remove a value that you previously set, include the
* property but specify -1
for the value. However, we strongly recommend keeping the default
* instance warmup enabled by specifying a value of 0
or other nominal value.
*
* The amount of time, in seconds, until a new instance is considered to have finished initializing and resource
* consumption to become stable after it enters the InService
state.
*
* During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance * before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period * before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that * are used for scaling, resulting in more reliable usage data. For more information, see Set * the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide. *
*
* To manage various warm-up settings at the group level, we recommend that you set the default instance warmup,
* even if it is set to 0 seconds. To remove a value that you previously set, include the property but
* specify -1
for the value. However, we strongly recommend keeping the default instance warmup enabled
* by specifying a value of 0
or other nominal value.
*
InService
state.
* * During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an * instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the * warm-up period before aggregating the metrics for new instances with existing instances in the Amazon * CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, * see Set * the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User * Guide. *
*
* To manage various warm-up settings at the group level, we recommend that you set the default instance
* warmup, even if it is set to 0 seconds. To remove a value that you previously set, include the
* property but specify -1
for the value. However, we strongly recommend keeping the default
* instance warmup enabled by specifying a value of 0
or other nominal value.
*