Skip to content

get_delegated_access_token

Operation

get_delegated_access_token

get_delegated_access_token(request: GetDelegatedAccessTokenInput | GetDelegatedAccessTokenInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetDelegatedAccessTokenInputDict]) -> 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
request GetDelegatedAccessTokenInput | GetDelegatedAccessTokenInputDict | 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[GetDelegatedAccessTokenInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetDelegatedAccessTokenOutput

An instance of GetDelegatedAccessTokenOutput.

get_delegated_access_token async

get_delegated_access_token(request: GetDelegatedAccessTokenInput | GetDelegatedAccessTokenInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetDelegatedAccessTokenInputDict]) -> 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
request GetDelegatedAccessTokenInput | GetDelegatedAccessTokenInputDict | 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[GetDelegatedAccessTokenInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetDelegatedAccessTokenOutput

An instance of GetDelegatedAccessTokenOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

GetDelegatedAccessTokenInputDict

Bases: TypedDict

Dictionary form of GetDelegatedAccessTokenInput.

Attributes

trade_in_token instance-attribute
trade_in_token: Required[str]

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

GetDelegatedAccessTokenInput dataclass

Bases: _SerdeShape

Dataclass for GetDelegatedAccessTokenInput structure.

Attributes

trade_in_token class-attribute instance-attribute
trade_in_token: str | 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

Bases: _SerdeShape

Dataclass for GetDelegatedAccessTokenOutput structure.

Attributes

assumed_principal class-attribute instance-attribute
assumed_principal: str | 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 = ...

Amazon Web Services credentials for API authentication.

packed_policy_size class-attribute instance-attribute
packed_policy_size: int | 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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

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.