Class AutoScalingGroup
- java.lang.Object
-
- software.amazon.awssdk.services.autoscaling.model.AutoScalingGroup
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<AutoScalingGroup.Builder,AutoScalingGroup>
@Generated("software.amazon.awssdk:codegen") public final class AutoScalingGroup extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AutoScalingGroup.Builder,AutoScalingGroup>
Describes an Auto Scaling group.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAutoScalingGroup.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringautoScalingGroupARN()The Amazon Resource Name (ARN) of the Auto Scaling group.StringautoScalingGroupName()The name of the Auto Scaling group.AvailabilityZoneDistributionavailabilityZoneDistribution()The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.AvailabilityZoneImpairmentPolicyavailabilityZoneImpairmentPolicy()The Availability Zone impairment policy for the Auto Scaling group.List<String>availabilityZones()One or more Availability Zones for the Auto Scaling group.static AutoScalingGroup.Builderbuilder()BooleancapacityRebalance()Indicates whether Capacity Rebalancing is enabled.CapacityReservationSpecificationcapacityReservationSpecification()The capacity reservation specification for the Auto Scaling group.Stringcontext()Reserved.InstantcreatedTime()The date and time the Auto Scaling group was created.IntegerdefaultCooldown()The duration of the default cooldown period, in seconds, for the Auto Scaling group.IntegerdefaultInstanceWarmup()The duration of the default EC2 instance warmup time, in seconds, for the Auto Scaling group.DeletionProtectiondeletionProtection()The deletion protection setting for the Auto Scaling group.StringdeletionProtectionAsString()The deletion protection setting for the Auto Scaling group.IntegerdesiredCapacity()The desired size of the Auto Scaling group.StringdesiredCapacityType()The unit of measurement for the value specified for desired capacity.List<EnabledMetric>enabledMetrics()The metrics enabled for the Auto Scaling group.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasAvailabilityZones()For responses, this returns true if the service returned a value for the AvailabilityZones property.booleanhasEnabledMetrics()For responses, this returns true if the service returned a value for the EnabledMetrics property.inthashCode()booleanhasInstances()For responses, this returns true if the service returned a value for the Instances property.booleanhasLoadBalancerNames()For responses, this returns true if the service returned a value for the LoadBalancerNames property.booleanhasSuspendedProcesses()For responses, this returns true if the service returned a value for the SuspendedProcesses property.booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.booleanhasTargetGroupARNs()For responses, this returns true if the service returned a value for the TargetGroupARNs property.booleanhasTerminationPolicies()For responses, this returns true if the service returned a value for the TerminationPolicies property.booleanhasTrafficSources()For responses, this returns true if the service returned a value for the TrafficSources property.IntegerhealthCheckGracePeriod()The duration of the health check grace period, in seconds, for the Auto Scaling group.StringhealthCheckType()One or more comma-separated health check types for the Auto Scaling group.InstanceLifecyclePolicyinstanceLifecyclePolicy()The instance lifecycle policy for the Auto Scaling group.InstanceMaintenancePolicyinstanceMaintenancePolicy()An instance maintenance policy.List<Instance>instances()The EC2 instances associated with the Auto Scaling group.StringlaunchConfigurationName()The name of the associated launch configuration for the Auto Scaling group.LaunchTemplateSpecificationlaunchTemplate()The launch template for the Auto Scaling group.List<String>loadBalancerNames()One or more load balancers associated with the group.IntegermaxInstanceLifetime()The maximum amount of time, in seconds, that an EC2 instance can be in service for the Auto Scaling group.IntegermaxSize()The maximum size of the Auto Scaling group.IntegerminSize()The minimum size of the Auto Scaling group.MixedInstancesPolicymixedInstancesPolicy()The mixed instances policy for the group.BooleannewInstancesProtectedFromScaleIn()Indicates whether newly launched EC2 instances are protected from termination when scaling in for the Auto Scaling group.StringplacementGroup()The name of the placement group into which to launch EC2 instances for the Auto Scaling group.IntegerpredictedCapacity()The predicted capacity of the group when it has a predictive scaling policy.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends AutoScalingGroup.Builder>serializableBuilderClass()StringserviceLinkedRoleARN()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.Stringstatus()The current state of the Auto Scaling group when the DeleteAutoScalingGroup operation is in progress.List<SuspendedProcess>suspendedProcesses()The suspended processes associated with the Auto Scaling group.List<TagDescription>tags()The tags for the Auto Scaling group.List<String>targetGroupARNs()The Amazon Resource Names (ARN) of the target groups for your load balancer.List<String>terminationPolicies()The termination policies for the Auto Scaling group.AutoScalingGroup.BuildertoBuilder()StringtoString()Returns a string representation of this object.List<TrafficSourceIdentifier>trafficSources()The traffic sources associated with this Auto Scaling group.StringvpcZoneIdentifier()One or more comma-separated subnet IDs for the Auto Scaling group.WarmPoolConfigurationwarmPoolConfiguration()The warm pool for the group.IntegerwarmPoolSize()The current size of the warm pool.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
autoScalingGroupName
public final String autoScalingGroupName()
The name of the Auto Scaling group.
- Returns:
- The name of the Auto Scaling group.
-
autoScalingGroupARN
public final String autoScalingGroupARN()
The Amazon Resource Name (ARN) of the Auto Scaling group.
- Returns:
- The Amazon Resource Name (ARN) of the Auto Scaling group.
-
launchConfigurationName
public final String launchConfigurationName()
The name of the associated launch configuration for the Auto Scaling group.
- Returns:
- The name of the associated launch configuration for the Auto Scaling group.
-
launchTemplate
public final LaunchTemplateSpecification launchTemplate()
The launch template for the Auto Scaling group.
- Returns:
- The launch template for the Auto Scaling group.
-
mixedInstancesPolicy
public final MixedInstancesPolicy mixedInstancesPolicy()
The mixed instances policy for the group.
- Returns:
- The mixed instances policy for the group.
-
minSize
public final Integer minSize()
The minimum size of the Auto Scaling group.
- Returns:
- The minimum size of the Auto Scaling group.
-
maxSize
public final Integer maxSize()
The maximum size of the Auto Scaling group.
- Returns:
- The maximum size of the Auto Scaling group.
-
desiredCapacity
public final Integer desiredCapacity()
The desired size of the Auto Scaling group.
- Returns:
- The desired size of the Auto Scaling group.
-
predictedCapacity
public final Integer predictedCapacity()
The predicted capacity of the group when it has a predictive scaling policy.
- Returns:
- The predicted capacity of the group when it has a predictive scaling policy.
-
defaultCooldown
public final Integer defaultCooldown()
The duration of the default cooldown period, in seconds, for the Auto Scaling group.
- Returns:
- The duration of the default cooldown period, in seconds, for the Auto Scaling group.
-
hasAvailabilityZones
public final boolean hasAvailabilityZones()
For responses, this returns true if the service returned a value for the AvailabilityZones property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
availabilityZones
public final List<String> availabilityZones()
One or more Availability Zones for the Auto Scaling group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAvailabilityZones()method.- Returns:
- One or more Availability Zones for the Auto Scaling group.
-
hasLoadBalancerNames
public final boolean hasLoadBalancerNames()
For responses, this returns true if the service returned a value for the LoadBalancerNames property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
loadBalancerNames
public final List<String> loadBalancerNames()
One or more load balancers associated with the group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasLoadBalancerNames()method.- Returns:
- One or more load balancers associated with the group.
-
hasTargetGroupARNs
public final boolean hasTargetGroupARNs()
For responses, this returns true if the service returned a value for the TargetGroupARNs property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
targetGroupARNs
public final List<String> targetGroupARNs()
The Amazon Resource Names (ARN) of the target groups for your load balancer.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTargetGroupARNs()method.- Returns:
- The Amazon Resource Names (ARN) of the target groups for your load balancer.
-
healthCheckType
public final String healthCheckType()
One or more comma-separated health check types for the Auto Scaling group.
- Returns:
- One or more comma-separated health check types for the Auto Scaling group.
-
healthCheckGracePeriod
public final Integer healthCheckGracePeriod()
The duration of the health check grace period, in seconds, for the Auto Scaling group.
- Returns:
- The duration of the health check grace period, in seconds, for the Auto Scaling group.
-
hasInstances
public final boolean hasInstances()
For responses, this returns true if the service returned a value for the Instances property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
instances
public final List<Instance> instances()
The EC2 instances associated with the Auto Scaling group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInstances()method.- Returns:
- The EC2 instances associated with the Auto Scaling group.
-
createdTime
public final Instant createdTime()
The date and time the Auto Scaling group was created.
- Returns:
- The date and time the Auto Scaling group was created.
-
hasSuspendedProcesses
public final boolean hasSuspendedProcesses()
For responses, this returns true if the service returned a value for the SuspendedProcesses property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
suspendedProcesses
public final List<SuspendedProcess> suspendedProcesses()
The suspended processes associated with the Auto Scaling group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSuspendedProcesses()method.- Returns:
- The suspended processes associated with the Auto Scaling group.
-
placementGroup
public final String placementGroup()
The name of the placement group into which to launch EC2 instances for the Auto Scaling group.
- Returns:
- The name of the placement group into which to launch EC2 instances for the Auto Scaling group.
-
vpcZoneIdentifier
public final String vpcZoneIdentifier()
One or more comma-separated subnet IDs for the Auto Scaling group.
- Returns:
- One or more comma-separated subnet IDs for the Auto Scaling group.
-
hasEnabledMetrics
public final boolean hasEnabledMetrics()
For responses, this returns true if the service returned a value for the EnabledMetrics property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
enabledMetrics
public final List<EnabledMetric> enabledMetrics()
The metrics enabled for the Auto Scaling group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEnabledMetrics()method.- Returns:
- The metrics enabled for the Auto Scaling group.
-
status
public final String status()
The current state of the Auto Scaling group when the DeleteAutoScalingGroup operation is in progress.
- Returns:
- The current state of the Auto Scaling group when the DeleteAutoScalingGroup operation is in progress.
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final List<TagDescription> tags()
The tags for the Auto Scaling group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- The tags for the Auto Scaling group.
-
hasTerminationPolicies
public final boolean hasTerminationPolicies()
For responses, this returns true if the service returned a value for the TerminationPolicies property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
terminationPolicies
public final List<String> terminationPolicies()
The termination policies for the Auto Scaling group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTerminationPolicies()method.- Returns:
- The termination policies for the Auto Scaling group.
-
newInstancesProtectedFromScaleIn
public final Boolean newInstancesProtectedFromScaleIn()
Indicates whether newly launched EC2 instances are protected from termination when scaling in for the Auto Scaling group.
For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- Returns:
- Indicates whether newly launched EC2 instances are protected from termination when scaling in for the
Auto Scaling group.
For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
-
serviceLinkedRoleARN
public final String 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.
- Returns:
- 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.
-
maxInstanceLifetime
public final Integer maxInstanceLifetime()
The maximum amount of time, in seconds, that an EC2 instance can be in service for the Auto Scaling group.
- Returns:
- The maximum amount of time, in seconds, that an EC2 instance can be in service for the Auto Scaling group.
-
capacityRebalance
public final Boolean capacityRebalance()
Indicates whether Capacity Rebalancing is enabled.
- Returns:
- Indicates whether Capacity Rebalancing is enabled.
-
warmPoolConfiguration
public final WarmPoolConfiguration warmPoolConfiguration()
The warm pool for the group.
- Returns:
- The warm pool for the group.
-
warmPoolSize
public final Integer warmPoolSize()
The current size of the warm pool.
- Returns:
- The current size of the warm pool.
-
context
public final String context()
Reserved.
- Returns:
- Reserved.
-
desiredCapacityType
public final String desiredCapacityType()
The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
DesiredCapacityTypefor attribute-based instance type selection only.- Returns:
- The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
DesiredCapacityTypefor attribute-based instance type selection only.
-
defaultInstanceWarmup
public final Integer defaultInstanceWarmup()
The duration of the default EC2 instance warmup time, in seconds, for the Auto Scaling group.
- Returns:
- The duration of the default EC2 instance warmup time, in seconds, for the Auto Scaling group.
-
hasTrafficSources
public final boolean hasTrafficSources()
For responses, this returns true if the service returned a value for the TrafficSources property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
trafficSources
public final List<TrafficSourceIdentifier> trafficSources()
The traffic sources associated with this Auto Scaling group.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTrafficSources()method.- Returns:
- The traffic sources associated with this Auto Scaling group.
-
instanceMaintenancePolicy
public final InstanceMaintenancePolicy instanceMaintenancePolicy()
An instance maintenance policy.
- Returns:
- An instance maintenance policy.
-
deletionProtection
public final DeletionProtection deletionProtection()
The deletion protection setting for the Auto Scaling group.
If the service returns an enum value that is not available in the current SDK version,
deletionProtectionwill returnDeletionProtection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdeletionProtectionAsString().- Returns:
- The deletion protection setting for the Auto Scaling group.
- See Also:
DeletionProtection
-
deletionProtectionAsString
public final String deletionProtectionAsString()
The deletion protection setting for the Auto Scaling group.
If the service returns an enum value that is not available in the current SDK version,
deletionProtectionwill returnDeletionProtection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdeletionProtectionAsString().- Returns:
- The deletion protection setting for the Auto Scaling group.
- See Also:
DeletionProtection
-
availabilityZoneDistribution
public final AvailabilityZoneDistribution availabilityZoneDistribution()
The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.
- Returns:
- The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.
-
availabilityZoneImpairmentPolicy
public final AvailabilityZoneImpairmentPolicy availabilityZoneImpairmentPolicy()
The Availability Zone impairment policy for the Auto Scaling group.
- Returns:
- The Availability Zone impairment policy for the Auto Scaling group.
-
capacityReservationSpecification
public final CapacityReservationSpecification capacityReservationSpecification()
The capacity reservation specification for the Auto Scaling group.
- Returns:
- The capacity reservation specification for the Auto Scaling group.
-
instanceLifecyclePolicy
public final InstanceLifecyclePolicy instanceLifecyclePolicy()
The instance lifecycle policy for the Auto Scaling group.
- Returns:
- The instance lifecycle policy for the Auto Scaling group.
-
toBuilder
public AutoScalingGroup.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<AutoScalingGroup.Builder,AutoScalingGroup>
-
builder
public static AutoScalingGroup.Builder builder()
-
serializableBuilderClass
public static Class<? extends AutoScalingGroup.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-