create_impersonation_role
¶
create_impersonation_role(
organization_id: OrganizationId,
name: ImpersonationRoleName,
type: ImpersonationRoleType,
rules: ImpersonationRuleList,
*,
config_overrides: Optional[WorkMailClientConfig] = None,
client_token: Optional[IdempotencyClientToken] = None,
description: Optional[ImpersonationRoleDescription] = None,
) -> CreateImpersonationRoleResponse
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.
Parameters:
-
client_token(Optional[IdempotencyClientToken], default:None) –The idempotency token for the client request.
-
organization_id(OrganizationId) –The WorkMail organization to create the new impersonation role within.
-
name(ImpersonationRoleName) –The name of the new impersonation role.
-
type(ImpersonationRoleType) –The impersonation role's type. The available impersonation role types are
READ_ONLYorFULL_ACCESS. -
description(Optional[ImpersonationRoleDescription], default:None) –The description of the new impersonation role.
-
rules(ImpersonationRuleList) –The list of rules for the impersonation role.
Raises:
-
EntityNotFoundException–The identifier supplied for the user, group, or resource does not exist in your organization.
-
EntityStateException–You are performing an operation on a user, group, or resource that isn't in the expected state, such as trying to delete an active user.
-
InvalidParameterException–One or more of the input parameters don't match the service's restrictions.
-
LimitExceededException–The request exceeds the limit of the resource.
-
OrganizationNotFoundException–An operation received a valid organization identifier that either doesn't belong or exist in the system.
-
OrganizationStateException–The organization must have a valid state to perform certain operations on the organization or its members.
-
UnknownServiceError–The service returned an error code this client does not model.