DescribePrincipalIdFormat - Amazon Elastic Compute Cloud

DescribePrincipalIdFormat

Describes the ID format settings for the root user and all IAM roles and IAM users that have explicitly specified a longer ID (17-character ID) preference.

By default, all IAM roles and IAM users default to the same ID settings as the root user, unless they explicitly override the settings. This request is useful for identifying those IAM users and IAM roles that have overridden the default ID settings.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

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.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

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 1. Maximum value of 1000.

Required: No

NextToken

The token to request the next page of results.

Type: String

Required: No

Resource.N

The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway

Type: Array of strings

Required: No

Response Elements

The following elements are returned by the service.

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

principalSet

Information about the ID format settings for the ARN.

Type: Array of PrincipalIdFormat objects

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 the ID format for the root user and all IAM roles and IAM users that have explicitly specified a longer ID preference.

Sample Request

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

Sample Response

<DescribePrincipalIdFormatResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <principalSet> <item> <arn>arn:aws:iam::123456789012:root</arn> <statusSet> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>reservation</resource> <useLongIds>true</useLongIds> </item> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>instance</resource> <useLongIds>true</useLongIds> </item> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>volume</resource> <useLongIds>true</useLongIds> </item> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>snapshot</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-interface-attachment</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-interface</resource> <useLongIds>true</useLongIds> </item> <item> <resource>elastic-ip-allocation</resource> <useLongIds>true</useLongIds> </item> <item> <resource>elastic-ip-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc</resource> <useLongIds>true</useLongIds> </item> <item> <resource>subnet</resource> <useLongIds>true</useLongIds> </item> <item> <resource>route-table</resource> <useLongIds>true</useLongIds> </item> <item> <resource>route-table-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-acl</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-acl-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>dhcp-options</resource> <useLongIds>true</useLongIds> </item> <item> <resource>internet-gateway</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-cidr-block-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-ipv6-cidr-block-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>subnet-ipv6-cidr-block-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-peering-connection</resource> <useLongIds>true</useLongIds> </item> <item> <resource>security-group</resource> <useLongIds>true</useLongIds> </item> <item> <resource>flow-log</resource> <useLongIds>true</useLongIds> </item> <item> <resource>customer-gateway</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-endpoint</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpn-connection</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpn-gateway</resource> <useLongIds>true</useLongIds> </item> </statusSet> </item> <item> <arn>arn:aws:iam::987654321000:user/user1</arn> <statusSet> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>reservation</resource> <useLongIds>true</useLongIds> </item> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>instance</resource> <useLongIds>true</useLongIds> </item> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>volume</resource> <useLongIds>true</useLongIds> </item> <item> <deadline>2016-12-15T12:00:00.000Z</deadline> <resource>snapshot</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-interface-attachment</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-interface</resource> <useLongIds>true</useLongIds> </item> <item> <resource>elastic-ip-allocation</resource> <useLongIds>true</useLongIds> </item> <item> <resource>elastic-ip-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc</resource> <useLongIds>false</useLongIds> </item> <item> <resource>subnet</resource> <useLongIds>true</useLongIds> </item> <item> <resource>route-table</resource> <useLongIds>true</useLongIds> </item> <item> <resource>route-table-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-acl</resource> <useLongIds>true</useLongIds> </item> <item> <resource>network-acl-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>dhcp-options</resource> <useLongIds>true</useLongIds> </item> <item> <resource>internet-gateway</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-cidr-block-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-ipv6-cidr-block-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>subnet-ipv6-cidr-block-association</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-peering-connection</resource> <useLongIds>true</useLongIds> </item> <item> <resource>security-group</resource> <useLongIds>true</useLongIds> </item> <item> <resource>flow-log</resource> <useLongIds>true</useLongIds> </item> <item> <resource>customer-gateway</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpc-endpoint</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpn-connection</resource> <useLongIds>true</useLongIds> </item> <item> <resource>vpn-gateway</resource> <useLongIds>true</useLongIds> </item> </statusSet> </item> </principalSet> </DescribePrincipalIdFormatResponse>

See Also

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