Updates the default mail domain for an organization. The default mail domain is used by the WorkMail AWS Console to suggest an email address when enabling a mail user. You can only have one default domain.
Parameters:
-
organization_id
(OrganizationId)
–
The WorkMail organization for which to list domains.
-
domain_name
(WorkMailDomainName)
–
The domain name that will become the default domain.
Raises:
Source code in docs_src/capo_workmail/_services/work_mail.py
| def update_default_mail_domain(
self,
organization_id: "capo_workmail.types.organization_id.OrganizationId",
domain_name: "capo_workmail.types.work_mail_domain_name.WorkMailDomainName",
*,
config_overrides: Optional[WorkMailClientConfig] = None,
) -> "capo_workmail.types.update_default_mail_domain_response.UpdateDefaultMailDomainResponse":
"""<p>Updates the default mail domain for an organization. The default mail domain is used by the WorkMail AWS Console to suggest an email address when enabling a mail user. You can only have one default domain.</p>
Args:
organization_id: <p>The WorkMail organization for which to list domains.</p>
domain_name: <p>The domain name that will become the default domain.</p>
Raises:
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_not_found_exception.MailDomainNotFoundException: <p>The domain specified is not found in your organization.</p>
capo_workmail.errors.mail_domain_state_exception.MailDomainStateException: <p>After a domain has been added to the organization, it must be verified. The domain is not yet verified.</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.
"""
def _handler(
req: "OperationRequest[capo_workmail.types.update_default_mail_domain_request.UpdateDefaultMailDomainRequest]",
) -> OperationResponse[
"capo_workmail.types.update_default_mail_domain_response.UpdateDefaultMailDomainResponse"
]:
import capo_workmail._operations.work_mail_service.update_default_mail_domain
output, http_response = (
capo_workmail._operations.work_mail_service.update_default_mail_domain.update_default_mail_domain(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateDefaultMailDomain")
)
input_: capo_workmail.types.update_default_mail_domain_request.UpdateDefaultMailDomainRequest = {
"organization_id": organization_id,
"domain_name": domain_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|