

# DescribePrincipalIdFormat
<a name="API_DescribePrincipalIdFormat"></a>

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` \$1 `conversion-task` \$1 `customer-gateway` \$1 `dhcp-options` \$1 `elastic-ip-allocation` \$1 `elastic-ip-association` \$1 `export-task` \$1 `flow-log` \$1 `image` \$1 `import-task` \$1 `instance` \$1 `internet-gateway` \$1 `network-acl` \$1 `network-acl-association` \$1 `network-interface` \$1 `network-interface-attachment` \$1 `prefix-list` \$1 `reservation` \$1 `route-table` \$1 `route-table-association` \$1 `security-group` \$1 `snapshot` \$1 `subnet` \$1 `subnet-cidr-block-association` \$1 `volume` \$1 `vpc` \$1 `vpc-cidr-block-association` \$1 `vpc-endpoint` \$1 `vpc-peering-connection` \$1 `vpn-connection` \$1 `vpn-gateway`. 

## Request Parameters
<a name="API_DescribePrincipalIdFormat_RequestParameters"></a>

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](CommonParameters.md).

 **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` \$1 `conversion-task` \$1 `customer-gateway` \$1 `dhcp-options` \$1 `elastic-ip-allocation` \$1 `elastic-ip-association` \$1 `export-task` \$1 `flow-log` \$1 `image` \$1 `import-task` \$1 `instance` \$1 `internet-gateway` \$1 `network-acl` \$1 `network-acl-association` \$1 `network-interface` \$1 `network-interface-attachment` \$1 `prefix-list` \$1 `reservation` \$1 `route-table` \$1 `route-table-association` \$1 `security-group` \$1 `snapshot` \$1 `subnet` \$1 `subnet-cidr-block-association` \$1 `volume` \$1 `vpc` \$1 `vpc-cidr-block-association` \$1 `vpc-endpoint` \$1 `vpc-peering-connection` \$1 `vpn-connection` \$1 `vpn-gateway`   
Type: Array of strings  
Required: No

## Response Elements
<a name="API_DescribePrincipalIdFormat_ResponseElements"></a>

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](API_PrincipalIdFormat.md) objects

 **requestId**   
The ID of the request.  
Type: String

## Errors
<a name="API_DescribePrincipalIdFormat_Errors"></a>

For information about the errors that are common to all actions, see [Common client error codes](errors-overview.md#CommonErrors).

## Examples
<a name="API_DescribePrincipalIdFormat_Examples"></a>

### Example
<a name="API_DescribePrincipalIdFormat_Example_1"></a>

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
<a name="API_DescribePrincipalIdFormat_Example_1_Request"></a>

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

#### Sample Response
<a name="API_DescribePrincipalIdFormat_Example_1_Response"></a>

```
<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
<a name="API_DescribePrincipalIdFormat_SeeAlso"></a>

For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/ec2-2016-11-15/DescribePrincipalIdFormat) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/ec2-2016-11-15/DescribePrincipalIdFormat) 