WorkMail / Client / assume_impersonation_role
assume_impersonation_role#
- WorkMail.Client.assume_impersonation_role(**kwargs)#
Assumes an impersonation role for the given WorkMail organization. This method returns an authentication token you can use to make impersonated calls.
See also: AWS API Documentation
Request Syntax
response = client.assume_impersonation_role( OrganizationId='string', ImpersonationRoleId='string' )
- Parameters:
OrganizationId (string) –
[REQUIRED]
The WorkMail organization under which the impersonation role will be assumed.
ImpersonationRoleId (string) –
[REQUIRED]
The impersonation role ID to assume.
- Return type:
dict
- Returns:
Response Syntax
{ 'Token': 'string', 'ExpiresIn': 123 }
Response Structure
(dict) –
Token (string) –
The authentication token for the impersonation role.
ExpiresIn (integer) –
The authentication token’s validity, in seconds.
Exceptions
WorkMail.Client.exceptions.InvalidParameterException
WorkMail.Client.exceptions.OrganizationNotFoundException
WorkMail.Client.exceptions.OrganizationStateException
WorkMail.Client.exceptions.ResourceNotFoundException