Removes a domain from WorkMail, stops email routing to WorkMail, and removes the authorization allowing WorkMail use. SES keeps the domain because other applications may use it. You must first remove any email address used by WorkMail entities before you remove the domain.
Parameters:
-
organization_id
(OrganizationId)
–
The WorkMail organization for which the domain will be deregistered.
-
domain_name
(WorkMailDomainName)
–
The domain to deregister in WorkMail and SES.
Raises:
Source code in docs_src/capo_workmail/_services/async_work_mail.py
| async def deregister_mail_domain(
self,
organization_id: "capo_workmail.types.organization_id.OrganizationId",
domain_name: "capo_workmail.types.work_mail_domain_name.WorkMailDomainName",
*,
config_overrides: Optional[AsyncWorkMailClientConfig] = None,
) -> "capo_workmail.types.deregister_mail_domain_response.DeregisterMailDomainResponse":
"""<p>Removes a domain from WorkMail, stops email routing to WorkMail, and removes the authorization allowing WorkMail use. SES keeps the domain because other applications may use it. You must first remove any email address used by WorkMail entities before you remove the domain.</p>
Args:
organization_id: <p>The WorkMail organization for which the domain will be deregistered.</p>
domain_name: <p>The domain to deregister in WorkMail and SES.</p>
Raises:
capo_workmail.errors.invalid_custom_ses_configuration_exception.InvalidCustomSesConfigurationException: <p>You SES configuration has customizations that WorkMail cannot save. The error message lists the invalid setting. For examples of invalid settings, refer to <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_CreateReceiptRule.html">CreateReceiptRule</a>.</p>
capo_workmail.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the input parameters don't match the service's restrictions.</p>
capo_workmail.errors.mail_domain_in_use_exception.MailDomainInUseException: <p>The domain you're trying to change is in use by another user or organization in your account. See the error message for details.</p>
capo_workmail.errors.organization_not_found_exception.OrganizationNotFoundException: <p>An operation received a valid organization identifier that either doesn't belong or exist in the system.</p>
capo_workmail.errors.organization_state_exception.OrganizationStateException: <p>The organization must have a valid state to perform certain operations on the organization or its members.</p>
capo_workmail.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_workmail.types.deregister_mail_domain_request.DeregisterMailDomainRequest]",
) -> AsyncOperationResponse[
"capo_workmail.types.deregister_mail_domain_response.DeregisterMailDomainResponse"
]:
import capo_workmail._operations.work_mail_service.deregister_mail_domain
(
output,
http_response,
) = await capo_workmail._operations.work_mail_service.deregister_mail_domain.async_deregister_mail_domain(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterMailDomain")
)
input_: capo_workmail.types.deregister_mail_domain_request.DeregisterMailDomainRequest = {
"organization_id": organization_id,
"domain_name": domain_name,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|