Skip to content

Sts  >  Operations  >  get_caller_identity

get_caller_identity

Operation

get_caller_identity async

get_caller_identity(input: GetCallerIdentityInput, plugins: list[Plugin] | None = None) -> GetCallerIdentityOutput

Returns details about the IAM user or role whose credentials are used to call the operation.

Note

No permissions are required to perform this operation. If an administrator attaches a policy to your identity that explicitly denies access to the sts:GetCallerIdentity action, you can still perform this operation. Permissions are not required because the same information is returned when access is denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the IAM User Guide.

Parameters:

Name Type Description Default
input GetCallerIdentityInput

An instance of GetCallerIdentityInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetCallerIdentityOutput

An instance of GetCallerIdentityOutput.

Input

GetCallerIdentityInput dataclass

Dataclass for GetCallerIdentityInput structure.

Output

GetCallerIdentityOutput dataclass

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

Attributes

account class-attribute instance-attribute
account: str | None = None

The Amazon Web Services account ID number of the account that owns or contains the calling entity.

arn class-attribute instance-attribute
arn: str | None = None

The Amazon Web Services ARN associated with the calling entity.

user_id class-attribute instance-attribute
user_id: str | None = None

The unique identifier of the calling entity. The exact value depends on the type of entity that is 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.