All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.autoscaling.model.AutoScalingGroup Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Auto Scaling module holds the client classes that are used for communicating with Auto Scaling Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2015-2020 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 amount of time, in seconds, after a scaling activity completes before another scaling activity can start. *

*/ private Integer defaultCooldown; /** *

* One or more Availability Zones for the group. *

*/ private com.amazonaws.internal.SdkInternalList availabilityZones; /** *

* One or more load balancers associated with the group. *

*/ private com.amazonaws.internal.SdkInternalList loadBalancerNames; /** *

* The Amazon Resource Names (ARN) of the target groups for your load balancer. *

*/ private com.amazonaws.internal.SdkInternalList targetGroupARNs; /** *

* The service to use for the health checks. The valid values are EC2 and ELB. If you * configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either * the EC2 status checks or the load balancer health checks. *

*/ private String healthCheckType; /** *

* 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. *

*/ private Integer healthCheckGracePeriod; /** *

* The EC2 instances associated with the group. *

*/ private com.amazonaws.internal.SdkInternalList instances; /** *

* 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 suspendedProcesses; /** *

* 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 enabledMetrics; /** *

* The current state of the group when DeleteAutoScalingGroup is in progress. *

*/ private String status; /** *

* The tags for the group. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The termination policies for the group. *

*/ private com.amazonaws.internal.SdkInternalList terminationPolicies; /** *

* 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 AWS * 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 604800. *

*/ private Integer maxInstanceLifetime; /** *

* 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 amount of time, in seconds, after a scaling activity completes before another scaling activity can start. *

* * @param defaultCooldown * The amount of time, in seconds, after a scaling activity completes before another scaling activity can * start. */ public void setDefaultCooldown(Integer defaultCooldown) { this.defaultCooldown = defaultCooldown; } /** *

* The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. *

* * @return The amount of time, in seconds, after a scaling activity completes before another scaling activity can * start. */ public Integer getDefaultCooldown() { return this.defaultCooldown; } /** *

* The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. *

* * @param defaultCooldown * The amount of time, in seconds, after a scaling activity completes before another scaling activity can * start. * @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 getAvailabilityZones() { if (availabilityZones == null) { availabilityZones = new com.amazonaws.internal.SdkInternalList(); } return availabilityZones; } /** *

* One or more Availability Zones for the group. *

* * @param availabilityZones * One or more Availability Zones for the group. */ public void setAvailabilityZones(java.util.Collection availabilityZones) { if (availabilityZones == null) { this.availabilityZones = null; return; } this.availabilityZones = new com.amazonaws.internal.SdkInternalList(availabilityZones); } /** *

* 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(availabilityZones.length)); } for (String ele : availabilityZones) { this.availabilityZones.add(ele); } return this; } /** *

* 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 availabilityZones) { setAvailabilityZones(availabilityZones); return this; } /** *

* One or more load balancers associated with the group. *

* * @return One or more load balancers associated with the group. */ public java.util.List getLoadBalancerNames() { if (loadBalancerNames == null) { loadBalancerNames = new com.amazonaws.internal.SdkInternalList(); } return loadBalancerNames; } /** *

* 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 loadBalancerNames) { if (loadBalancerNames == null) { this.loadBalancerNames = null; return; } this.loadBalancerNames = new com.amazonaws.internal.SdkInternalList(loadBalancerNames); } /** *

* 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(loadBalancerNames.length)); } for (String ele : loadBalancerNames) { this.loadBalancerNames.add(ele); } return this; } /** *

* 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 loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); return this; } /** *

* 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 getTargetGroupARNs() { if (targetGroupARNs == null) { targetGroupARNs = new com.amazonaws.internal.SdkInternalList(); } return targetGroupARNs; } /** *

* 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 targetGroupARNs) { if (targetGroupARNs == null) { this.targetGroupARNs = null; return; } this.targetGroupARNs = new com.amazonaws.internal.SdkInternalList(targetGroupARNs); } /** *

* 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(targetGroupARNs.length)); } for (String ele : targetGroupARNs) { this.targetGroupARNs.add(ele); } return this; } /** *

* 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 targetGroupARNs) { setTargetGroupARNs(targetGroupARNs); return this; } /** *

* The service to use for the health checks. The valid values are EC2 and ELB. If you * configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either * the EC2 status checks or the load balancer health checks. *

* * @param healthCheckType * The service to use for the health checks. The valid values are EC2 and ELB. If * you configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it * fails either the EC2 status checks or the load balancer health checks. */ public void setHealthCheckType(String healthCheckType) { this.healthCheckType = healthCheckType; } /** *

* The service to use for the health checks. The valid values are EC2 and ELB. If you * configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either * the EC2 status checks or the load balancer health checks. *

* * @return The service to use for the health checks. The valid values are EC2 and ELB. If * you configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it * fails either the EC2 status checks or the load balancer health checks. */ public String getHealthCheckType() { return this.healthCheckType; } /** *

* The service to use for the health checks. The valid values are EC2 and ELB. If you * configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either * the EC2 status checks or the load balancer health checks. *

* * @param healthCheckType * The service to use for the health checks. The valid values are EC2 and ELB. If * you configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it * fails either the EC2 status checks or the load balancer health checks. * @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 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. *

* * @param 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. */ 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. *

* * @return 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. */ 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. *

* * @param 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. * @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 getInstances() { if (instances == null) { instances = new com.amazonaws.internal.SdkInternalList(); } return instances; } /** *

* The EC2 instances associated with the group. *

* * @param instances * The EC2 instances associated with the group. */ public void setInstances(java.util.Collection instances) { if (instances == null) { this.instances = null; return; } this.instances = new com.amazonaws.internal.SdkInternalList(instances); } /** *

* 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(instances.length)); } for (Instance ele : instances) { this.instances.add(ele); } return this; } /** *

* 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 instances) { setInstances(instances); return this; } /** *

* 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 getSuspendedProcesses() { if (suspendedProcesses == null) { suspendedProcesses = new com.amazonaws.internal.SdkInternalList(); } return suspendedProcesses; } /** *

* The suspended processes associated with the group. *

* * @param suspendedProcesses * The suspended processes associated with the group. */ public void setSuspendedProcesses(java.util.Collection suspendedProcesses) { if (suspendedProcesses == null) { this.suspendedProcesses = null; return; } this.suspendedProcesses = new com.amazonaws.internal.SdkInternalList(suspendedProcesses); } /** *

* 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(suspendedProcesses.length)); } for (SuspendedProcess ele : suspendedProcesses) { this.suspendedProcesses.add(ele); } return this; } /** *

* 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 suspendedProcesses) { setSuspendedProcesses(suspendedProcesses); return this; } /** *

* 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 getEnabledMetrics() { if (enabledMetrics == null) { enabledMetrics = new com.amazonaws.internal.SdkInternalList(); } return enabledMetrics; } /** *

* The metrics enabled for the group. *

* * @param enabledMetrics * The metrics enabled for the group. */ public void setEnabledMetrics(java.util.Collection enabledMetrics) { if (enabledMetrics == null) { this.enabledMetrics = null; return; } this.enabledMetrics = new com.amazonaws.internal.SdkInternalList(enabledMetrics); } /** *

* 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(enabledMetrics.length)); } for (EnabledMetric ele : enabledMetrics) { this.enabledMetrics.add(ele); } return this; } /** *

* 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 enabledMetrics) { setEnabledMetrics(enabledMetrics); return this; } /** *

* The current state of the group when DeleteAutoScalingGroup is in progress. *

* * @param status * The current state of the group when DeleteAutoScalingGroup is in progress. */ public void setStatus(String status) { this.status = status; } /** *

* The current state of the group when DeleteAutoScalingGroup is in progress. *

* * @return The current state of the group when DeleteAutoScalingGroup is in progress. */ public String getStatus() { return this.status; } /** *

* The current state of the group when DeleteAutoScalingGroup is in progress. *

* * @param status * The current state of the group when DeleteAutoScalingGroup 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 getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The tags for the group. *

* * @param tags * The tags for the group. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* 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(tags.length)); } for (TagDescription ele : tags) { this.tags.add(ele); } return this; } /** *

* 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 tags) { setTags(tags); return this; } /** *

* The termination policies for the group. *

* * @return The termination policies for the group. */ public java.util.List getTerminationPolicies() { if (terminationPolicies == null) { terminationPolicies = new com.amazonaws.internal.SdkInternalList(); } return terminationPolicies; } /** *

* The termination policies for the group. *

* * @param terminationPolicies * The termination policies for the group. */ public void setTerminationPolicies(java.util.Collection terminationPolicies) { if (terminationPolicies == null) { this.terminationPolicies = null; return; } this.terminationPolicies = new com.amazonaws.internal.SdkInternalList(terminationPolicies); } /** *

* 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(terminationPolicies.length)); } for (String ele : terminationPolicies) { this.terminationPolicies.add(ele); } return this; } /** *

* 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 terminationPolicies) { setTerminationPolicies(terminationPolicies); return this; } /** *

* 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 AWS * 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 * AWS 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 AWS * services on your behalf. *

* * @return The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other * AWS 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 AWS * 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 * AWS 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 604800. *

* * @param maxInstanceLifetime * The maximum amount of time, in seconds, that an instance can be in service.

*

* Valid Range: Minimum value of 604800. */ 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 604800. *

* * @return The maximum amount of time, in seconds, that an instance can be in service.

*

* Valid Range: Minimum value of 604800. */ 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 604800. *

* * @param maxInstanceLifetime * The maximum amount of time, in seconds, that an instance can be in service.

*

* Valid Range: Minimum value of 604800. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroup withMaxInstanceLifetime(Integer maxInstanceLifetime) { setMaxInstanceLifetime(maxInstanceLifetime); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAutoScalingGroupName() != null) sb.append("AutoScalingGroupName: ").append(getAutoScalingGroupName()).append(","); if (getAutoScalingGroupARN() != null) sb.append("AutoScalingGroupARN: ").append(getAutoScalingGroupARN()).append(","); if (getLaunchConfigurationName() != null) sb.append("LaunchConfigurationName: ").append(getLaunchConfigurationName()).append(","); if (getLaunchTemplate() != null) sb.append("LaunchTemplate: ").append(getLaunchTemplate()).append(","); if (getMixedInstancesPolicy() != null) sb.append("MixedInstancesPolicy: ").append(getMixedInstancesPolicy()).append(","); if (getMinSize() != null) sb.append("MinSize: ").append(getMinSize()).append(","); if (getMaxSize() != null) sb.append("MaxSize: ").append(getMaxSize()).append(","); if (getDesiredCapacity() != null) sb.append("DesiredCapacity: ").append(getDesiredCapacity()).append(","); if (getDefaultCooldown() != null) sb.append("DefaultCooldown: ").append(getDefaultCooldown()).append(","); if (getAvailabilityZones() != null) sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(","); if (getLoadBalancerNames() != null) sb.append("LoadBalancerNames: ").append(getLoadBalancerNames()).append(","); if (getTargetGroupARNs() != null) sb.append("TargetGroupARNs: ").append(getTargetGroupARNs()).append(","); if (getHealthCheckType() != null) sb.append("HealthCheckType: ").append(getHealthCheckType()).append(","); if (getHealthCheckGracePeriod() != null) sb.append("HealthCheckGracePeriod: ").append(getHealthCheckGracePeriod()).append(","); if (getInstances() != null) sb.append("Instances: ").append(getInstances()).append(","); if (getCreatedTime() != null) sb.append("CreatedTime: ").append(getCreatedTime()).append(","); if (getSuspendedProcesses() != null) sb.append("SuspendedProcesses: ").append(getSuspendedProcesses()).append(","); if (getPlacementGroup() != null) sb.append("PlacementGroup: ").append(getPlacementGroup()).append(","); if (getVPCZoneIdentifier() != null) sb.append("VPCZoneIdentifier: ").append(getVPCZoneIdentifier()).append(","); if (getEnabledMetrics() != null) sb.append("EnabledMetrics: ").append(getEnabledMetrics()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getTerminationPolicies() != null) sb.append("TerminationPolicies: ").append(getTerminationPolicies()).append(","); if (getNewInstancesProtectedFromScaleIn() != null) sb.append("NewInstancesProtectedFromScaleIn: ").append(getNewInstancesProtectedFromScaleIn()).append(","); if (getServiceLinkedRoleARN() != null) sb.append("ServiceLinkedRoleARN: ").append(getServiceLinkedRoleARN()).append(","); if (getMaxInstanceLifetime() != null) sb.append("MaxInstanceLifetime: ").append(getMaxInstanceLifetime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AutoScalingGroup == false) return false; AutoScalingGroup other = (AutoScalingGroup) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getAutoScalingGroupARN() == null ^ this.getAutoScalingGroupARN() == null) return false; if (other.getAutoScalingGroupARN() != null && other.getAutoScalingGroupARN().equals(this.getAutoScalingGroupARN()) == false) return false; if (other.getLaunchConfigurationName() == null ^ this.getLaunchConfigurationName() == null) return false; if (other.getLaunchConfigurationName() != null && other.getLaunchConfigurationName().equals(this.getLaunchConfigurationName()) == false) return false; if (other.getLaunchTemplate() == null ^ this.getLaunchTemplate() == null) return false; if (other.getLaunchTemplate() != null && other.getLaunchTemplate().equals(this.getLaunchTemplate()) == false) return false; if (other.getMixedInstancesPolicy() == null ^ this.getMixedInstancesPolicy() == null) return false; if (other.getMixedInstancesPolicy() != null && other.getMixedInstancesPolicy().equals(this.getMixedInstancesPolicy()) == false) return false; if (other.getMinSize() == null ^ this.getMinSize() == null) return false; if (other.getMinSize() != null && other.getMinSize().equals(this.getMinSize()) == false) return false; if (other.getMaxSize() == null ^ this.getMaxSize() == null) return false; if (other.getMaxSize() != null && other.getMaxSize().equals(this.getMaxSize()) == false) return false; if (other.getDesiredCapacity() == null ^ this.getDesiredCapacity() == null) return false; if (other.getDesiredCapacity() != null && other.getDesiredCapacity().equals(this.getDesiredCapacity()) == false) return false; if (other.getDefaultCooldown() == null ^ this.getDefaultCooldown() == null) return false; if (other.getDefaultCooldown() != null && other.getDefaultCooldown().equals(this.getDefaultCooldown()) == false) return false; if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null) return false; if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == false) return false; if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == null) return false; if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == false) return false; if (other.getTargetGroupARNs() == null ^ this.getTargetGroupARNs() == null) return false; if (other.getTargetGroupARNs() != null && other.getTargetGroupARNs().equals(this.getTargetGroupARNs()) == false) return false; if (other.getHealthCheckType() == null ^ this.getHealthCheckType() == null) return false; if (other.getHealthCheckType() != null && other.getHealthCheckType().equals(this.getHealthCheckType()) == false) return false; if (other.getHealthCheckGracePeriod() == null ^ this.getHealthCheckGracePeriod() == null) return false; if (other.getHealthCheckGracePeriod() != null && other.getHealthCheckGracePeriod().equals(this.getHealthCheckGracePeriod()) == false) return false; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; if (other.getCreatedTime() == null ^ this.getCreatedTime() == null) return false; if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false) return false; if (other.getSuspendedProcesses() == null ^ this.getSuspendedProcesses() == null) return false; if (other.getSuspendedProcesses() != null && other.getSuspendedProcesses().equals(this.getSuspendedProcesses()) == false) return false; if (other.getPlacementGroup() == null ^ this.getPlacementGroup() == null) return false; if (other.getPlacementGroup() != null && other.getPlacementGroup().equals(this.getPlacementGroup()) == false) return false; if (other.getVPCZoneIdentifier() == null ^ this.getVPCZoneIdentifier() == null) return false; if (other.getVPCZoneIdentifier() != null && other.getVPCZoneIdentifier().equals(this.getVPCZoneIdentifier()) == false) return false; if (other.getEnabledMetrics() == null ^ this.getEnabledMetrics() == null) return false; if (other.getEnabledMetrics() != null && other.getEnabledMetrics().equals(this.getEnabledMetrics()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getTerminationPolicies() == null ^ this.getTerminationPolicies() == null) return false; if (other.getTerminationPolicies() != null && other.getTerminationPolicies().equals(this.getTerminationPolicies()) == false) return false; if (other.getNewInstancesProtectedFromScaleIn() == null ^ this.getNewInstancesProtectedFromScaleIn() == null) return false; if (other.getNewInstancesProtectedFromScaleIn() != null && other.getNewInstancesProtectedFromScaleIn().equals(this.getNewInstancesProtectedFromScaleIn()) == false) return false; if (other.getServiceLinkedRoleARN() == null ^ this.getServiceLinkedRoleARN() == null) return false; if (other.getServiceLinkedRoleARN() != null && other.getServiceLinkedRoleARN().equals(this.getServiceLinkedRoleARN()) == false) return false; if (other.getMaxInstanceLifetime() == null ^ this.getMaxInstanceLifetime() == null) return false; if (other.getMaxInstanceLifetime() != null && other.getMaxInstanceLifetime().equals(this.getMaxInstanceLifetime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getAutoScalingGroupARN() == null) ? 0 : getAutoScalingGroupARN().hashCode()); hashCode = prime * hashCode + ((getLaunchConfigurationName() == null) ? 0 : getLaunchConfigurationName().hashCode()); hashCode = prime * hashCode + ((getLaunchTemplate() == null) ? 0 : getLaunchTemplate().hashCode()); hashCode = prime * hashCode + ((getMixedInstancesPolicy() == null) ? 0 : getMixedInstancesPolicy().hashCode()); hashCode = prime * hashCode + ((getMinSize() == null) ? 0 : getMinSize().hashCode()); hashCode = prime * hashCode + ((getMaxSize() == null) ? 0 : getMaxSize().hashCode()); hashCode = prime * hashCode + ((getDesiredCapacity() == null) ? 0 : getDesiredCapacity().hashCode()); hashCode = prime * hashCode + ((getDefaultCooldown() == null) ? 0 : getDefaultCooldown().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); hashCode = prime * hashCode + ((getTargetGroupARNs() == null) ? 0 : getTargetGroupARNs().hashCode()); hashCode = prime * hashCode + ((getHealthCheckType() == null) ? 0 : getHealthCheckType().hashCode()); hashCode = prime * hashCode + ((getHealthCheckGracePeriod() == null) ? 0 : getHealthCheckGracePeriod().hashCode()); hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); hashCode = prime * hashCode + ((getSuspendedProcesses() == null) ? 0 : getSuspendedProcesses().hashCode()); hashCode = prime * hashCode + ((getPlacementGroup() == null) ? 0 : getPlacementGroup().hashCode()); hashCode = prime * hashCode + ((getVPCZoneIdentifier() == null) ? 0 : getVPCZoneIdentifier().hashCode()); hashCode = prime * hashCode + ((getEnabledMetrics() == null) ? 0 : getEnabledMetrics().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getTerminationPolicies() == null) ? 0 : getTerminationPolicies().hashCode()); hashCode = prime * hashCode + ((getNewInstancesProtectedFromScaleIn() == null) ? 0 : getNewInstancesProtectedFromScaleIn().hashCode()); hashCode = prime * hashCode + ((getServiceLinkedRoleARN() == null) ? 0 : getServiceLinkedRoleARN().hashCode()); hashCode = prime * hashCode + ((getMaxInstanceLifetime() == null) ? 0 : getMaxInstanceLifetime().hashCode()); return hashCode; } @Override public AutoScalingGroup clone() { try { return (AutoScalingGroup) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy