DescribeAutoScalingInstances - Amazon EC2 Auto Scaling
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DescribeAutoScalingInstances

Gets information about the Auto Scaling instances in the account and Region.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

InstanceIds.member.N

The IDs of the instances. If you omit this property, all Auto Scaling instances are described. If you specify an ID that does not exist, it is ignored with no error.

Array Members: Maximum number of 50 items.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum value is 50.

Type: Integer

Required: No

NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements

The following elements are returned by the service.

AutoScalingInstances.member.N

The instances.

Type: Array of AutoScalingInstanceDetails objects

NextToken

A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the NextToken value when requesting the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).

HTTP Status Code: 500

Examples

Example

This example illustrates one usage of DescribeAutoScalingInstances.

Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeAutoScalingInstances &InstanceIds.member.1=i-1234567890abcdef0 &Version=2011-01-01 &AUTHPARAMS

Sample Response

<DescribeAutoScalingInstancesResponse xmlns="https://autoscaling.amazonaws.com/doc/2011-01-01/"> <DescribeAutoScalingInstancesResult> <AutoScalingInstances> <member> <ProtectedFromScaleIn>false</ProtectedFromScaleIn> <AvailabilityZone>us-east-1b</AvailabilityZone> <LaunchConfigurationName>my-lc</LaunchConfigurationName> <LaunchTemplate /> <InstanceId>i-1234567890abcdef0</InstanceId> <InstanceType>t3.micro</InstanceType> <AutoScalingGroupName>my-asg</AutoScalingGroupName> <HealthStatus>HEALTHY</HealthStatus> <LifecycleState>InService</LifecycleState> <WeightedCapacity /> </member> </AutoScalingInstances> </DescribeAutoScalingInstancesResult> <ResponseMetadata> <RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId> </ResponseMetadata> </DescribeAutoScalingInstancesResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: