AWS Security Token Service

2016/04/05 - AWS Security Token Service - 1 new api methods

GetCallerIdentity (new) Link ΒΆ

Returns details about the IAM identity whose credentials are used to call the API.

Request Syntax

client.get_caller_identity()
rtype

dict

returns

Response Syntax

{
    'UserId': 'string',
    'Account': 'string',
    'Arn': 'string'
}

Response Structure

  • (dict) --

    Contains the response to a successful GetCallerIdentity request, including information about the entity making the request.

    • UserId (string) --

      The unique identifier of the calling entity. The exact value depends on the type of entity making the call. The values returned are those listed in the aws:userid column in the Principal table found on the Policy Variables reference page in the IAM User Guide .

    • Account (string) --

      The AWS account ID number of the account that owns or contains the calling entity.

    • Arn (string) --

      The AWS ARN associated with the calling entity.