Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

DescribeIamInstanceProfileAssociations

Describes your IAM instance profile associations.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

AssociationId.N

One or more IAM instance profile associations.

Type: Array of strings

Required: No

Filter.N

One or more filters.

  • instance-id - The ID of the instance.

  • state - The state of the association (associating | associated | disassociating | disassociated).

Type: Array of Filter objects

Required: No

MaxResults

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

Type: Integer

Valid Range: Minimum value of 5. Maximum value of 255.

Required: No

NextToken

The token to request the next page of results.

Type: String

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

Required: No

Response Elements

The following elements are returned by the service.

iamInstanceProfileAssociationSet

Information about one or more IAM instance profile associations.

Type: Array of IamInstanceProfileAssociation objects

nextToken

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Type: String

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

requestId

The ID of the request.

Type: String

Errors

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

Example

Example

This example describes all of your IAM instance profile associations.

Sample Request

Copy
https://ec2.amazonaws.com/?Action=DescribeIamInstanceProfileAssociations &AUTHPARAMS

Sample Response

Copy
<DescribeIamInstanceProfileAssociationsResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>84c2d2a6-12dc-491f-a9ee-example</requestId> <iamInstanceProfileAssociations> <item> <associationId>iip-assoc-08049da59357d598c</associationId> <iamInstanceProfile> <arn>arn:aws:iam::123456789012:instance-profile/AdminProfile</arn> <id>AIPAJEDNCAA64SSD265D6</id> </iamInstanceProfile> <instanceId>i-1234567890abcdef0</instanceId> <state>associated</state> </item> </iamInstanceProfileAssociations> </DescribeIamInstanceProfileAssociationsResponse>

See Also

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