getDelegatedAccessToken method
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.
May throw ExpiredTradeInTokenException.
May throw PackedPolicyTooLargeException.
May throw RegionDisabledException.
Parameter tradeInToken :
The token to exchange for temporary Amazon Web Services credentials. This
token must be valid and unexpired at the time of the request.
Implementation
Future<GetDelegatedAccessTokenResponse> getDelegatedAccessToken({
required String tradeInToken,
}) async {
final $request = <String, String>{
'TradeInToken': tradeInToken,
};
final $result = await _protocol.send(
$request,
action: 'GetDelegatedAccessToken',
version: '2011-06-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'GetDelegatedAccessTokenResult',
);
return GetDelegatedAccessTokenResponse.fromXml($result);
}