Skip to content

Sts  >  Operations  >  get_delegated_access_token

get_delegated_access_token

Operation

get_delegated_access_token async

get_delegated_access_token(input: GetDelegatedAccessTokenInput, plugins: list[Plugin] | None = None) -> GetDelegatedAccessTokenOutput

Exchanges a trade-in token for temporary Amazon Web Services credentials with the permissions associated with the assumed principal. This operation allows you to obtain credentials for a specific principal based on a trade-in token, enabling delegation of access to Amazon Web Services resources.

Parameters:

Name Type Description Default
input GetDelegatedAccessTokenInput

An instance of GetDelegatedAccessTokenInput.

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
GetDelegatedAccessTokenOutput

An instance of GetDelegatedAccessTokenOutput.

Input

GetDelegatedAccessTokenInput dataclass

Dataclass for GetDelegatedAccessTokenInput structure.

Attributes

trade_in_token class-attribute instance-attribute
trade_in_token: str | None = field(repr=False, default=None)

The token to exchange for temporary Amazon Web Services credentials. This token must be valid and unexpired at the time of the request.

Output

GetDelegatedAccessTokenOutput dataclass

Dataclass for GetDelegatedAccessTokenOutput structure.

Attributes

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

The Amazon Resource Name (ARN) of the principal that was assumed when obtaining the delegated access token. This ARN identifies the IAM entity whose permissions are granted by the temporary credentials.

credentials class-attribute instance-attribute
credentials: Credentials | None = None

Amazon Web Services credentials for API authentication.

packed_policy_size class-attribute instance-attribute
packed_policy_size: int | None = None

The percentage of the maximum policy size that is used by the session policy. The policy size is calculated as the sum of all the session policies and permission boundaries attached to the session. If the packed size exceeds 100%, the request fails.