WorkMail.Client.
create_impersonation_role
(**kwargs)¶Creates an impersonation role for the given WorkMail organization.
Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries also complete successfully without performing any further actions.
See also: AWS API Documentation
Request Syntax
response = client.create_impersonation_role(
ClientToken='string',
OrganizationId='string',
Name='string',
Type='FULL_ACCESS'|'READ_ONLY',
Description='string',
Rules=[
{
'ImpersonationRuleId': 'string',
'Name': 'string',
'Description': 'string',
'Effect': 'ALLOW'|'DENY',
'TargetUsers': [
'string',
],
'NotTargetUsers': [
'string',
]
},
]
)
The idempotency token for the client request.
This field is autopopulated if not provided.
[REQUIRED]
The WorkMail organization to create the new impersonation role within.
[REQUIRED]
The name of the new impersonation role.
[REQUIRED]
The impersonation role's type. The available impersonation role types are READ_ONLY
or FULL_ACCESS
.
[REQUIRED]
The list of rules for the impersonation role.
The rules for the given impersonation role.
The identifier of the rule.
The rule name.
The rule description.
The effect of the rule when it matches the input. Allowed effect values are ALLOW
or DENY
.
A list of user IDs that match the rule.
A list of user IDs that don't match the rule.
dict
Response Syntax
{
'ImpersonationRoleId': 'string'
}
Response Structure
(dict) --
ImpersonationRoleId (string) --
The new impersonation role ID.
Exceptions
WorkMail.Client.exceptions.InvalidParameterException
WorkMail.Client.exceptions.OrganizationNotFoundException
WorkMail.Client.exceptions.OrganizationStateException
WorkMail.Client.exceptions.EntityNotFoundException
WorkMail.Client.exceptions.EntityStateException
WorkMail.Client.exceptions.LimitExceededException