/* * 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; /** *
* Describes an Auto Scaling group. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AutoScalingGroup implements Serializable, Cloneable { /** ** The name of the Auto Scaling group. *
*/ private String autoScalingGroupName; /** ** The Amazon Resource Name (ARN) of the Auto Scaling group. *
*/ private String autoScalingGroupARN; /** ** The name of the associated launch configuration. *
*/ private String launchConfigurationName; /** ** The launch template for the group. *
*/ private LaunchTemplateSpecification launchTemplate; /** ** The mixed instances policy for the group. *
*/ private MixedInstancesPolicy mixedInstancesPolicy; /** ** The minimum size of the group. *
*/ private Integer minSize; /** ** The maximum size of the group. *
*/ private Integer maxSize; /** ** The desired size of the group. *
*/ private Integer desiredCapacity; /** ** The predicted capacity of the group when it has a predictive scaling policy. *
*/ private Integer predictedCapacity; /** ** The duration of the default cooldown period, in seconds. *
*/ private Integer defaultCooldown; /** ** One or more Availability Zones for the group. *
*/ private com.amazonaws.internal.SdkInternalList* One or more load balancers associated with the group. *
*/ private com.amazonaws.internal.SdkInternalList* The Amazon Resource Names (ARN) of the target groups for your load balancer. *
*/ private com.amazonaws.internal.SdkInternalList* A comma-separated value string of one or more health check types. *
*/ private String healthCheckType; /** ** The duration of the health check grace period, in seconds. *
*/ private Integer healthCheckGracePeriod; /** ** The EC2 instances associated with the group. *
*/ private com.amazonaws.internal.SdkInternalList* The date and time the group was created. *
*/ private java.util.Date createdTime; /** ** The suspended processes associated with the group. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the placement group into which to launch your instances, if any. *
*/ private String placementGroup; /** ** One or more subnet IDs, if applicable, separated by commas. *
*/ private String vPCZoneIdentifier; /** ** The metrics enabled for the group. *
*/ private com.amazonaws.internal.SdkInternalList* The current state of the group when the DeleteAutoScalingGroup operation is in progress. *
*/ private String status; /** ** The tags for the group. *
*/ private com.amazonaws.internal.SdkInternalList* The termination policies for the group. *
*/ private com.amazonaws.internal.SdkInternalList* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling * in. *
*/ 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. *
*/ private String serviceLinkedRoleARN; /** ** The maximum amount of time, in seconds, that an instance can be in service. *
** Valid Range: Minimum value of 0. *
*/ private Integer maxInstanceLifetime; /** ** Indicates whether Capacity Rebalancing is enabled. *
*/ private Boolean capacityRebalance; /** ** The warm pool for the group. *
*/ private WarmPoolConfiguration warmPoolConfiguration; /** ** The current size of the warm pool. *
*/ private Integer warmPoolSize; /** ** 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.
*
* The duration of the default instance warmup, in seconds. *
*/ private Integer defaultInstanceWarmup; /** ** The traffic sources associated with this Auto Scaling group. *
*/ private com.amazonaws.internal.SdkInternalList* 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 AutoScalingGroup withAutoScalingGroupName(String autoScalingGroupName) { setAutoScalingGroupName(autoScalingGroupName); return this; } /** ** The Amazon Resource Name (ARN) of the Auto Scaling group. *
* * @param autoScalingGroupARN * The Amazon Resource Name (ARN) of the Auto Scaling group. */ public void setAutoScalingGroupARN(String autoScalingGroupARN) { this.autoScalingGroupARN = autoScalingGroupARN; } /** ** The Amazon Resource Name (ARN) of the Auto Scaling group. *
* * @return The Amazon Resource Name (ARN) of the Auto Scaling group. */ public String getAutoScalingGroupARN() { return this.autoScalingGroupARN; } /** ** The Amazon Resource Name (ARN) of the Auto Scaling group. *
* * @param autoScalingGroupARN * The Amazon Resource Name (ARN) of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withAutoScalingGroupARN(String autoScalingGroupARN) { setAutoScalingGroupARN(autoScalingGroupARN); return this; } /** ** The name of the associated launch configuration. *
* * @param launchConfigurationName * The name of the associated launch configuration. */ public void setLaunchConfigurationName(String launchConfigurationName) { this.launchConfigurationName = launchConfigurationName; } /** ** The name of the associated launch configuration. *
* * @return The name of the associated launch configuration. */ public String getLaunchConfigurationName() { return this.launchConfigurationName; } /** ** The name of the associated launch configuration. *
* * @param launchConfigurationName * The name of the associated launch configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withLaunchConfigurationName(String launchConfigurationName) { setLaunchConfigurationName(launchConfigurationName); return this; } /** ** The launch template for the group. *
* * @param launchTemplate * The launch template for the group. */ public void setLaunchTemplate(LaunchTemplateSpecification launchTemplate) { this.launchTemplate = launchTemplate; } /** ** The launch template for the group. *
* * @return The launch template for the group. */ public LaunchTemplateSpecification getLaunchTemplate() { return this.launchTemplate; } /** ** The launch template for the group. *
* * @param launchTemplate * The launch template for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withLaunchTemplate(LaunchTemplateSpecification launchTemplate) { setLaunchTemplate(launchTemplate); return this; } /** ** The mixed instances policy for the group. *
* * @param mixedInstancesPolicy * The mixed instances policy for the group. */ public void setMixedInstancesPolicy(MixedInstancesPolicy mixedInstancesPolicy) { this.mixedInstancesPolicy = mixedInstancesPolicy; } /** ** The mixed instances policy for the group. *
* * @return The mixed instances policy for the group. */ public MixedInstancesPolicy getMixedInstancesPolicy() { return this.mixedInstancesPolicy; } /** ** The mixed instances policy for the group. *
* * @param mixedInstancesPolicy * The mixed instances policy for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withMixedInstancesPolicy(MixedInstancesPolicy mixedInstancesPolicy) { setMixedInstancesPolicy(mixedInstancesPolicy); return this; } /** ** The minimum size of the group. *
* * @param minSize * The minimum size of the group. */ public void setMinSize(Integer minSize) { this.minSize = minSize; } /** ** The minimum size of the group. *
* * @return The minimum size of the group. */ public Integer getMinSize() { return this.minSize; } /** ** The minimum size of the group. *
* * @param minSize * The minimum size of the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withMinSize(Integer minSize) { setMinSize(minSize); return this; } /** ** The maximum size of the group. *
* * @param maxSize * The maximum size of the group. */ public void setMaxSize(Integer maxSize) { this.maxSize = maxSize; } /** ** The maximum size of the group. *
* * @return The maximum size of the group. */ public Integer getMaxSize() { return this.maxSize; } /** ** The maximum size of the group. *
* * @param maxSize * The maximum size of the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withMaxSize(Integer maxSize) { setMaxSize(maxSize); return this; } /** ** The desired size of the group. *
* * @param desiredCapacity * The desired size of the group. */ public void setDesiredCapacity(Integer desiredCapacity) { this.desiredCapacity = desiredCapacity; } /** ** The desired size of the group. *
* * @return The desired size of the group. */ public Integer getDesiredCapacity() { return this.desiredCapacity; } /** ** The desired size of the group. *
* * @param desiredCapacity * The desired size of the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withDesiredCapacity(Integer desiredCapacity) { setDesiredCapacity(desiredCapacity); return this; } /** ** The predicted capacity of the group when it has a predictive scaling policy. *
* * @param predictedCapacity * The predicted capacity of the group when it has a predictive scaling policy. */ public void setPredictedCapacity(Integer predictedCapacity) { this.predictedCapacity = predictedCapacity; } /** ** The predicted capacity of the group when it has a predictive scaling policy. *
* * @return The predicted capacity of the group when it has a predictive scaling policy. */ public Integer getPredictedCapacity() { return this.predictedCapacity; } /** ** The predicted capacity of the group when it has a predictive scaling policy. *
* * @param predictedCapacity * The predicted capacity of the group when it has a predictive scaling policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withPredictedCapacity(Integer predictedCapacity) { setPredictedCapacity(predictedCapacity); return this; } /** ** The duration of the default cooldown period, in seconds. *
* * @param defaultCooldown * The duration of the default cooldown period, in seconds. */ public void setDefaultCooldown(Integer defaultCooldown) { this.defaultCooldown = defaultCooldown; } /** ** The duration of the default cooldown period, in seconds. *
* * @return The duration of the default cooldown period, in seconds. */ public Integer getDefaultCooldown() { return this.defaultCooldown; } /** ** The duration of the default cooldown period, in seconds. *
* * @param defaultCooldown * The duration of the default cooldown period, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup 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 AutoScalingGroup 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 AutoScalingGroup withAvailabilityZones(java.util.Collection* One or more load balancers associated with the group. *
* * @return One or more load balancers associated with the group. */ public java.util.List* One or more load balancers associated with the group. *
* * @param loadBalancerNames * One or more load balancers associated with the group. */ public void setLoadBalancerNames(java.util.Collection* One or more load balancers associated with the group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setLoadBalancerNames(java.util.Collection)} or {@link #withLoadBalancerNames(java.util.Collection)} if * you want to override the existing values. *
* * @param loadBalancerNames * One or more load balancers associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withLoadBalancerNames(String... loadBalancerNames) { if (this.loadBalancerNames == null) { setLoadBalancerNames(new com.amazonaws.internal.SdkInternalList* One or more load balancers associated with the group. *
* * @param loadBalancerNames * One or more load balancers associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withLoadBalancerNames(java.util.Collection* The Amazon Resource Names (ARN) of the target groups for your load balancer. *
* * @return The Amazon Resource Names (ARN) of the target groups for your load balancer. */ public java.util.List* The Amazon Resource Names (ARN) of the target groups for your load balancer. *
* * @param targetGroupARNs * The Amazon Resource Names (ARN) of the target groups for your load balancer. */ public void setTargetGroupARNs(java.util.Collection* The Amazon Resource Names (ARN) of the target groups for your load balancer. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTargetGroupARNs(java.util.Collection)} or {@link #withTargetGroupARNs(java.util.Collection)} if you * want to override the existing values. *
* * @param targetGroupARNs * The Amazon Resource Names (ARN) of the target groups for your load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTargetGroupARNs(String... targetGroupARNs) { if (this.targetGroupARNs == null) { setTargetGroupARNs(new com.amazonaws.internal.SdkInternalList* The Amazon Resource Names (ARN) of the target groups for your load balancer. *
* * @param targetGroupARNs * The Amazon Resource Names (ARN) of the target groups for your load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTargetGroupARNs(java.util.Collection* A comma-separated value string of one or more health check types. *
* * @param healthCheckType * A comma-separated value string of one or more health check types. */ public void setHealthCheckType(String healthCheckType) { this.healthCheckType = healthCheckType; } /** ** A comma-separated value string of one or more health check types. *
* * @return A comma-separated value string of one or more health check types. */ public String getHealthCheckType() { return this.healthCheckType; } /** ** A comma-separated value string of one or more health check types. *
* * @param healthCheckType * A comma-separated value string of one or more health check types. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withHealthCheckType(String healthCheckType) { setHealthCheckType(healthCheckType); return this; } /** ** The duration of the health check grace period, in seconds. *
* * @param healthCheckGracePeriod * The duration of the health check grace period, in seconds. */ public void setHealthCheckGracePeriod(Integer healthCheckGracePeriod) { this.healthCheckGracePeriod = healthCheckGracePeriod; } /** ** The duration of the health check grace period, in seconds. *
* * @return The duration of the health check grace period, in seconds. */ public Integer getHealthCheckGracePeriod() { return this.healthCheckGracePeriod; } /** ** The duration of the health check grace period, in seconds. *
* * @param healthCheckGracePeriod * The duration of the health check grace period, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withHealthCheckGracePeriod(Integer healthCheckGracePeriod) { setHealthCheckGracePeriod(healthCheckGracePeriod); return this; } /** ** The EC2 instances associated with the group. *
* * @return The EC2 instances associated with the group. */ public java.util.List* The EC2 instances associated with the group. *
* * @param instances * The EC2 instances associated with the group. */ public void setInstances(java.util.Collection* The EC2 instances associated with the group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstances(java.util.Collection)} or {@link #withInstances(java.util.Collection)} if you want to * override the existing values. *
* * @param instances * The EC2 instances associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withInstances(Instance... instances) { if (this.instances == null) { setInstances(new com.amazonaws.internal.SdkInternalList* The EC2 instances associated with the group. *
* * @param instances * The EC2 instances associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withInstances(java.util.Collection* The date and time the group was created. *
* * @param createdTime * The date and time the group was created. */ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** ** The date and time the group was created. *
* * @return The date and time the group was created. */ public java.util.Date getCreatedTime() { return this.createdTime; } /** ** The date and time the group was created. *
* * @param createdTime * The date and time the group was created. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withCreatedTime(java.util.Date createdTime) { setCreatedTime(createdTime); return this; } /** ** The suspended processes associated with the group. *
* * @return The suspended processes associated with the group. */ public java.util.List* The suspended processes associated with the group. *
* * @param suspendedProcesses * The suspended processes associated with the group. */ public void setSuspendedProcesses(java.util.Collection* The suspended processes associated with the group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSuspendedProcesses(java.util.Collection)} or {@link #withSuspendedProcesses(java.util.Collection)} if * you want to override the existing values. *
* * @param suspendedProcesses * The suspended processes associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withSuspendedProcesses(SuspendedProcess... suspendedProcesses) { if (this.suspendedProcesses == null) { setSuspendedProcesses(new com.amazonaws.internal.SdkInternalList* The suspended processes associated with the group. *
* * @param suspendedProcesses * The suspended processes associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withSuspendedProcesses(java.util.Collection* The name of the placement group into which to launch your instances, if any. *
* * @param placementGroup * The name of the placement group into which to launch your instances, if any. */ public void setPlacementGroup(String placementGroup) { this.placementGroup = placementGroup; } /** ** The name of the placement group into which to launch your instances, if any. *
* * @return The name of the placement group into which to launch your instances, if any. */ public String getPlacementGroup() { return this.placementGroup; } /** ** The name of the placement group into which to launch your instances, if any. *
* * @param placementGroup * The name of the placement group into which to launch your instances, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withPlacementGroup(String placementGroup) { setPlacementGroup(placementGroup); return this; } /** ** One or more subnet IDs, if applicable, separated by commas. *
* * @param vPCZoneIdentifier * One or more subnet IDs, if applicable, separated by commas. */ public void setVPCZoneIdentifier(String vPCZoneIdentifier) { this.vPCZoneIdentifier = vPCZoneIdentifier; } /** ** One or more subnet IDs, if applicable, separated by commas. *
* * @return One or more subnet IDs, if applicable, separated by commas. */ public String getVPCZoneIdentifier() { return this.vPCZoneIdentifier; } /** ** One or more subnet IDs, if applicable, separated by commas. *
* * @param vPCZoneIdentifier * One or more subnet IDs, if applicable, separated by commas. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withVPCZoneIdentifier(String vPCZoneIdentifier) { setVPCZoneIdentifier(vPCZoneIdentifier); return this; } /** ** The metrics enabled for the group. *
* * @return The metrics enabled for the group. */ public java.util.List* The metrics enabled for the group. *
* * @param enabledMetrics * The metrics enabled for the group. */ public void setEnabledMetrics(java.util.Collection* The metrics enabled for the group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEnabledMetrics(java.util.Collection)} or {@link #withEnabledMetrics(java.util.Collection)} if you want * to override the existing values. *
* * @param enabledMetrics * The metrics enabled for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withEnabledMetrics(EnabledMetric... enabledMetrics) { if (this.enabledMetrics == null) { setEnabledMetrics(new com.amazonaws.internal.SdkInternalList* The metrics enabled for the group. *
* * @param enabledMetrics * The metrics enabled for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withEnabledMetrics(java.util.Collection* The current state of the group when the DeleteAutoScalingGroup operation is in progress. *
* * @param status * The current state of the group when the DeleteAutoScalingGroup operation is in progress. */ public void setStatus(String status) { this.status = status; } /** ** The current state of the group when the DeleteAutoScalingGroup operation is in progress. *
* * @return The current state of the group when the DeleteAutoScalingGroup operation is in progress. */ public String getStatus() { return this.status; } /** ** The current state of the group when the DeleteAutoScalingGroup operation is in progress. *
* * @param status * The current state of the group when the DeleteAutoScalingGroup operation is in progress. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withStatus(String status) { setStatus(status); return this; } /** ** The tags for the group. *
* * @return The tags for the group. */ public java.util.List* The tags for the group. *
* * @param tags * The tags for the group. */ public void setTags(java.util.Collection* The tags for the group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tags for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTags(TagDescription... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The tags for the group. *
* * @param tags * The tags for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTags(java.util.Collection* The termination policies for the group. *
* * @return The termination policies for the group. */ public java.util.List* The termination policies for the group. *
* * @param terminationPolicies * The termination policies for the group. */ public void setTerminationPolicies(java.util.Collection* The termination policies for the group. *
** 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. *
* * @param terminationPolicies * The termination policies for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTerminationPolicies(String... terminationPolicies) { if (this.terminationPolicies == null) { setTerminationPolicies(new com.amazonaws.internal.SdkInternalList* The termination policies for the group. *
* * @param terminationPolicies * The termination policies for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTerminationPolicies(java.util.Collection* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling * in. *
* * @param newInstancesProtectedFromScaleIn * Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when * scaling in. */ public void setNewInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn) { this.newInstancesProtectedFromScaleIn = newInstancesProtectedFromScaleIn; } /** ** Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling * in. *
* * @return Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when * scaling in. */ public Boolean getNewInstancesProtectedFromScaleIn() { return this.newInstancesProtectedFromScaleIn; } /** ** Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling * in. *
* * @param newInstancesProtectedFromScaleIn * Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when * scaling in. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withNewInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn) { setNewInstancesProtectedFromScaleIn(newInstancesProtectedFromScaleIn); return this; } /** ** Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling * in. *
* * @return Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when * scaling in. */ public Boolean isNewInstancesProtectedFromScaleIn() { return this.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. *
* * @param serviceLinkedRoleARN * 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. */ public void setServiceLinkedRoleARN(String serviceLinkedRoleARN) { this.serviceLinkedRoleARN = serviceLinkedRoleARN; } /** ** 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. *
* * @return 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. */ public String getServiceLinkedRoleARN() { return this.serviceLinkedRoleARN; } /** ** 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. *
* * @param serviceLinkedRoleARN * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withServiceLinkedRoleARN(String serviceLinkedRoleARN) { setServiceLinkedRoleARN(serviceLinkedRoleARN); return this; } /** ** The maximum amount of time, in seconds, that an instance can be in service. *
** Valid Range: Minimum value of 0. *
* * @param maxInstanceLifetime * The maximum amount of time, in seconds, that an instance can be in service. ** Valid Range: Minimum value of 0. */ public void setMaxInstanceLifetime(Integer maxInstanceLifetime) { this.maxInstanceLifetime = maxInstanceLifetime; } /** *
* The maximum amount of time, in seconds, that an instance can be in service. *
** Valid Range: Minimum value of 0. *
* * @return The maximum amount of time, in seconds, that an instance can be in service. ** Valid Range: Minimum value of 0. */ public Integer getMaxInstanceLifetime() { return this.maxInstanceLifetime; } /** *
* The maximum amount of time, in seconds, that an instance can be in service. *
** Valid Range: Minimum value of 0. *
* * @param maxInstanceLifetime * The maximum amount of time, in seconds, that an instance can be in service. ** Valid Range: Minimum value of 0. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withMaxInstanceLifetime(Integer maxInstanceLifetime) { setMaxInstanceLifetime(maxInstanceLifetime); return this; } /** *
* Indicates whether Capacity Rebalancing is enabled. *
* * @param capacityRebalance * Indicates whether Capacity Rebalancing is enabled. */ public void setCapacityRebalance(Boolean capacityRebalance) { this.capacityRebalance = capacityRebalance; } /** ** Indicates whether Capacity Rebalancing is enabled. *
* * @return Indicates whether Capacity Rebalancing is enabled. */ public Boolean getCapacityRebalance() { return this.capacityRebalance; } /** ** Indicates whether Capacity Rebalancing is enabled. *
* * @param capacityRebalance * Indicates whether Capacity Rebalancing is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withCapacityRebalance(Boolean capacityRebalance) { setCapacityRebalance(capacityRebalance); return this; } /** ** Indicates whether Capacity Rebalancing is enabled. *
* * @return Indicates whether Capacity Rebalancing is enabled. */ public Boolean isCapacityRebalance() { return this.capacityRebalance; } /** ** The warm pool for the group. *
* * @param warmPoolConfiguration * The warm pool for the group. */ public void setWarmPoolConfiguration(WarmPoolConfiguration warmPoolConfiguration) { this.warmPoolConfiguration = warmPoolConfiguration; } /** ** The warm pool for the group. *
* * @return The warm pool for the group. */ public WarmPoolConfiguration getWarmPoolConfiguration() { return this.warmPoolConfiguration; } /** ** The warm pool for the group. *
* * @param warmPoolConfiguration * The warm pool for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withWarmPoolConfiguration(WarmPoolConfiguration warmPoolConfiguration) { setWarmPoolConfiguration(warmPoolConfiguration); return this; } /** ** The current size of the warm pool. *
* * @param warmPoolSize * The current size of the warm pool. */ public void setWarmPoolSize(Integer warmPoolSize) { this.warmPoolSize = warmPoolSize; } /** ** The current size of the warm pool. *
* * @return The current size of the warm pool. */ public Integer getWarmPoolSize() { return this.warmPoolSize; } /** ** The current size of the warm pool. *
* * @param warmPoolSize * The current size of the warm pool. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withWarmPoolSize(Integer warmPoolSize) { setWarmPoolSize(warmPoolSize); return this; } /** ** Reserved. *
* * @param context * Reserved. */ public void setContext(String context) { this.context = context; } /** ** Reserved. *
* * @return Reserved. */ public String getContext() { return this.context; } /** ** Reserved. *
* * @param context * Reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withContext(String context) { setContext(context); return this; } /** *
* The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
* DesiredCapacityType
for attribute-based instance type selection only.
*
DesiredCapacityType
for attribute-based instance type selection only.
*/
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.
*
DesiredCapacityType
for attribute-based instance type selection only.
*/
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.
*
DesiredCapacityType
for attribute-based instance type selection only.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AutoScalingGroup withDesiredCapacityType(String desiredCapacityType) {
setDesiredCapacityType(desiredCapacityType);
return this;
}
/**
* * The duration of the default instance warmup, in seconds. *
* * @param defaultInstanceWarmup * The duration of the default instance warmup, in seconds. */ public void setDefaultInstanceWarmup(Integer defaultInstanceWarmup) { this.defaultInstanceWarmup = defaultInstanceWarmup; } /** ** The duration of the default instance warmup, in seconds. *
* * @return The duration of the default instance warmup, in seconds. */ public Integer getDefaultInstanceWarmup() { return this.defaultInstanceWarmup; } /** ** The duration of the default instance warmup, in seconds. *
* * @param defaultInstanceWarmup * The duration of the default instance warmup, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withDefaultInstanceWarmup(Integer defaultInstanceWarmup) { setDefaultInstanceWarmup(defaultInstanceWarmup); return this; } /** ** The traffic sources associated with this Auto Scaling group. *
* * @return The traffic sources associated with this Auto Scaling group. */ public java.util.List* The traffic sources associated with this Auto Scaling group. *
* * @param trafficSources * The traffic sources associated with this Auto Scaling group. */ public void setTrafficSources(java.util.Collection* The traffic sources associated with this Auto Scaling group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTrafficSources(java.util.Collection)} or {@link #withTrafficSources(java.util.Collection)} if you want * to override the existing values. *
* * @param trafficSources * The traffic sources associated with this Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTrafficSources(TrafficSourceIdentifier... trafficSources) { if (this.trafficSources == null) { setTrafficSources(new com.amazonaws.internal.SdkInternalList* The traffic sources associated with this Auto Scaling group. *
* * @param trafficSources * The traffic sources associated with this Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withTrafficSources(java.util.Collection