DescribeIamInstanceProfileAssociations - Amazon Elastic Compute Cloud

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

The IAM instance profile associations.

Type: Array of strings

Required: No

Filter.N

The filters.

  • instance-id - The ID of the instance.

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

Type: Array of Filter objects

Required: No

MaxResults

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

Type: Integer

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

Required: No

NextToken

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

Type: String

Required: No

Response Elements

The following elements are returned by the service.

iamInstanceProfileAssociationSet

Information about the IAM instance profile associations.

Type: Array of IamInstanceProfileAssociation objects

nextToken

The token to include in another request to get the next page of items. This value is null when there are no more items to return.

Type: String

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common client error codes.

Examples

Example

This example describes all of your IAM instance profile associations.

Sample Request

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

Sample Response

<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: