create_organization
async
¶
create_organization(
alias: OrganizationName,
*,
config_overrides: Optional[AsyncWorkMailClientConfig] = None,
directory_id: Optional[DirectoryId] = None,
client_token: Optional[IdempotencyClientToken] = None,
domains: Optional[Domains] = None,
kms_key_arn: Optional[KmsKeyArn] = None,
enable_interoperability: Optional[Boolean] = None,
) -> CreateOrganizationResponse
Creates a new WorkMail organization. Optionally, you can choose to associate an existing AWS Directory Service directory with your organization. If an AWS Directory Service directory ID is specified, the organization alias must match the directory alias. If you choose not to associate an existing directory with your organization, then we create a new WorkMail directory for you. For more information, see Adding an organization in the WorkMail Administrator Guide.
You can associate multiple email domains with an organization, then choose your default email domain from the WorkMail console. You can also associate a domain that is managed in an Amazon Route 53 public hosted zone. For more information, see Adding a domain and Choosing the default domain in the WorkMail Administrator Guide.
Optionally, you can use a customer managed key from AWS Key Management Service (AWS KMS) to encrypt email for your organization. If you don't associate an AWS KMS key, WorkMail creates a default, AWS managed key for you.
Parameters:
-
directory_id(Optional[DirectoryId], default:None) –The AWS Directory Service directory ID.
-
alias(OrganizationName) –The organization alias.
-
client_token(Optional[IdempotencyClientToken], default:None) –The idempotency token associated with the request.
-
domains(Optional[Domains], default:None) –The email domains to associate with the organization.
-
kms_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.
-
enable_interoperability(Optional[Boolean], default:None) –When
true, allows organization interoperability between WorkMail and Microsoft Exchange. Iftrue, you must include a AD Connector directory ID in the request.
Raises:
-
DirectoryInUseException–The directory is already in use by another WorkMail organization in the same account and Region.
-
DirectoryUnavailableException–The directory is unavailable. It might be located in another Region or deleted.
-
InvalidParameterException–One or more of the input parameters don't match the service's restrictions.
-
LimitExceededException–The request exceeds the limit of the resource.
-
NameAvailabilityException–The user, group, or resource name isn't unique in WorkMail.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_workmail/_services/async_work_mail.py
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 | |