WorkMailClient#
Auto-generated documentation for WorkMail type annotations stubs module mypy-boto3-workmail.
WorkMailClient#
Type annotations and code completion for boto3.client("workmail")
.
boto3 documentation
# WorkMailClient usage example
from boto3.session import Session
from mypy_boto3_workmail.client import WorkMailClient
def get_workmail_client() -> WorkMailClient:
return Session().client("workmail")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("workmail").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("workmail")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.DirectoryInUseException,
client.exceptions.DirectoryServiceAuthenticationFailedException,
client.exceptions.DirectoryUnavailableException,
client.exceptions.EmailAddressInUseException,
client.exceptions.EntityAlreadyRegisteredException,
client.exceptions.EntityNotFoundException,
client.exceptions.EntityStateException,
client.exceptions.InvalidConfigurationException,
client.exceptions.InvalidCustomSesConfigurationException,
client.exceptions.InvalidParameterException,
client.exceptions.InvalidPasswordException,
client.exceptions.LimitExceededException,
client.exceptions.MailDomainInUseException,
client.exceptions.MailDomainNotFoundException,
client.exceptions.MailDomainStateException,
client.exceptions.NameAvailabilityException,
client.exceptions.OrganizationNotFoundException,
client.exceptions.OrganizationStateException,
client.exceptions.ReservedNameException,
client.exceptions.ResourceNotFoundException,
client.exceptions.TooManyTagsException,
client.exceptions.UnsupportedOperationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_workmail.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
associate_delegate_to_resource#
Adds a member (user or group) to the resource's set of delegates.
Type annotations and code completion for boto3.client("workmail").associate_delegate_to_resource
method.
boto3 documentation
# associate_delegate_to_resource method definition
def associate_delegate_to_resource(
self,
*,
OrganizationId: str,
ResourceId: str,
EntityId: str,
) -> Dict[str, Any]:
...
# associate_delegate_to_resource method usage example with argument unpacking
kwargs: AssociateDelegateToResourceRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"ResourceId": ...,
"EntityId": ...,
}
parent.associate_delegate_to_resource(**kwargs)
associate_member_to_group#
Adds a member (user or group) to the group's set.
Type annotations and code completion for boto3.client("workmail").associate_member_to_group
method.
boto3 documentation
# associate_member_to_group method definition
def associate_member_to_group(
self,
*,
OrganizationId: str,
GroupId: str,
MemberId: str,
) -> Dict[str, Any]:
...
# associate_member_to_group method usage example with argument unpacking
kwargs: AssociateMemberToGroupRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"GroupId": ...,
"MemberId": ...,
}
parent.associate_member_to_group(**kwargs)
assume_impersonation_role#
Assumes an impersonation role for the given WorkMail organization.
Type annotations and code completion for boto3.client("workmail").assume_impersonation_role
method.
boto3 documentation
# assume_impersonation_role method definition
def assume_impersonation_role(
self,
*,
OrganizationId: str,
ImpersonationRoleId: str,
) -> AssumeImpersonationRoleResponseTypeDef: # (1)
...
# assume_impersonation_role method usage example with argument unpacking
kwargs: AssumeImpersonationRoleRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"ImpersonationRoleId": ...,
}
parent.assume_impersonation_role(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("workmail").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
cancel_mailbox_export_job#
Cancels a mailbox export job.
Type annotations and code completion for boto3.client("workmail").cancel_mailbox_export_job
method.
boto3 documentation
# cancel_mailbox_export_job method definition
def cancel_mailbox_export_job(
self,
*,
ClientToken: str,
JobId: str,
OrganizationId: str,
) -> Dict[str, Any]:
...
# cancel_mailbox_export_job method usage example with argument unpacking
kwargs: CancelMailboxExportJobRequestRequestTypeDef = { # (1)
"ClientToken": ...,
"JobId": ...,
"OrganizationId": ...,
}
parent.cancel_mailbox_export_job(**kwargs)
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("workmail").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_alias#
Adds an alias to the set of a given member (user or group) of WorkMail.
Type annotations and code completion for boto3.client("workmail").create_alias
method.
boto3 documentation
# create_alias method definition
def create_alias(
self,
*,
OrganizationId: str,
EntityId: str,
Alias: str,
) -> Dict[str, Any]:
...
# create_alias method usage example with argument unpacking
kwargs: CreateAliasRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"EntityId": ...,
"Alias": ...,
}
parent.create_alias(**kwargs)
create_availability_configuration#
Creates an AvailabilityConfiguration
for the given WorkMail organization and
domain.
Type annotations and code completion for boto3.client("workmail").create_availability_configuration
method.
boto3 documentation
# create_availability_configuration method definition
def create_availability_configuration(
self,
*,
OrganizationId: str,
DomainName: str,
ClientToken: str = ...,
EwsProvider: EwsAvailabilityProviderTypeDef = ..., # (1)
LambdaProvider: LambdaAvailabilityProviderTypeDef = ..., # (2)
) -> Dict[str, Any]:
...
# create_availability_configuration method usage example with argument unpacking
kwargs: CreateAvailabilityConfigurationRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"DomainName": ...,
}
parent.create_availability_configuration(**kwargs)
create_group#
Creates a group that can be used in WorkMail by calling the RegisterToWorkMail operation.
Type annotations and code completion for boto3.client("workmail").create_group
method.
boto3 documentation
# create_group method definition
def create_group(
self,
*,
OrganizationId: str,
Name: str,
HiddenFromGlobalAddressList: bool = ...,
) -> CreateGroupResponseTypeDef: # (1)
...
# create_group method usage example with argument unpacking
kwargs: CreateGroupRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"Name": ...,
}
parent.create_group(**kwargs)
create_impersonation_role#
Creates an impersonation role for the given WorkMail organization.
Type annotations and code completion for boto3.client("workmail").create_impersonation_role
method.
boto3 documentation
# create_impersonation_role method definition
def create_impersonation_role(
self,
*,
OrganizationId: str,
Name: str,
Type: ImpersonationRoleTypeType, # (1)
Rules: Sequence[ImpersonationRuleTypeDef], # (2)
ClientToken: str = ...,
Description: str = ...,
) -> CreateImpersonationRoleResponseTypeDef: # (3)
...
- See ImpersonationRoleTypeType
- See ImpersonationRuleTypeDef
- See CreateImpersonationRoleResponseTypeDef
# create_impersonation_role method usage example with argument unpacking
kwargs: CreateImpersonationRoleRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"Name": ...,
"Type": ...,
"Rules": ...,
}
parent.create_impersonation_role(**kwargs)
create_mobile_device_access_rule#
Creates a new mobile device access rule for the specified WorkMail organization.
Type annotations and code completion for boto3.client("workmail").create_mobile_device_access_rule
method.
boto3 documentation
# create_mobile_device_access_rule method definition
def create_mobile_device_access_rule(
self,
*,
OrganizationId: str,
Name: str,
Effect: MobileDeviceAccessRuleEffectType, # (1)
ClientToken: str = ...,
Description: str = ...,
DeviceTypes: Sequence[str] = ...,
NotDeviceTypes: Sequence[str] = ...,
DeviceModels: Sequence[str] = ...,
NotDeviceModels: Sequence[str] = ...,
DeviceOperatingSystems: Sequence[str] = ...,
NotDeviceOperatingSystems: Sequence[str] = ...,
DeviceUserAgents: Sequence[str] = ...,
NotDeviceUserAgents: Sequence[str] = ...,
) -> CreateMobileDeviceAccessRuleResponseTypeDef: # (2)
...
# create_mobile_device_access_rule method usage example with argument unpacking
kwargs: CreateMobileDeviceAccessRuleRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"Name": ...,
"Effect": ...,
}
parent.create_mobile_device_access_rule(**kwargs)
create_organization#
Creates a new WorkMail organization.
Type annotations and code completion for boto3.client("workmail").create_organization
method.
boto3 documentation
# create_organization method definition
def create_organization(
self,
*,
Alias: str,
DirectoryId: str = ...,
ClientToken: str = ...,
Domains: Sequence[DomainTypeDef] = ..., # (1)
KmsKeyArn: str = ...,
EnableInteroperability: bool = ...,
) -> CreateOrganizationResponseTypeDef: # (2)
...
# create_organization method usage example with argument unpacking
kwargs: Create