get_caller_identity¶
Operation¶
get_caller_identity
¶
get_caller_identity(request: GetCallerIdentityInput | GetCallerIdentityInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetCallerIdentityInputDict]) -> 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 |
|---|---|---|---|
request
|
GetCallerIdentityInput | GetCallerIdentityInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetCallerIdentityInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetCallerIdentityOutput
|
An instance of |
get_caller_identity
async
¶
get_caller_identity(request: GetCallerIdentityInput | GetCallerIdentityInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetCallerIdentityInputDict]) -> 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 |
|---|---|---|---|
request
|
GetCallerIdentityInput | GetCallerIdentityInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetCallerIdentityInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetCallerIdentityOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
Output¶
GetCallerIdentityOutput
dataclass
¶
Bases: _SerdeShape
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 = ...
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 = ...
The Amazon Web Services ARN associated with the calling entity.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
user_id
class-attribute
instance-attribute
¶
user_id: str | 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.