Amazon WorkMail

2021/10/13 - Amazon WorkMail - 5 new api methods

Changes  This release adds APIs for adding, removing and retrieving details of mail domains

RegisterMailDomain (new) Link ¶

Registers a new domain in Amazon WorkMail and SES, and configures it for use by WorkMail. Emails received by SES for this domain are routed to the specified WorkMail organization, and WorkMail has permanent permission to use the specified domain for sending your users' emails.

See also: AWS API Documentation

Request Syntax

client.register_mail_domain(
    ClientToken='string',
    OrganizationId='string',
    DomainName='string'
)
type ClientToken:

string

param ClientToken:

Idempotency token used when retrying requests.

This field is autopopulated if not provided.

type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The Amazon WorkMail organization under which you're creating the domain.

type DomainName:

string

param DomainName:

[REQUIRED]

The name of the mail domain to create in Amazon WorkMail and SES.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DeregisterMailDomain (new) Link ¶

Removes a domain from Amazon 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.

See also: AWS API Documentation

Request Syntax

client.deregister_mail_domain(
    OrganizationId='string',
    DomainName='string'
)
type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The Amazon WorkMail organization for which the domain will be deregistered.

type DomainName:

string

param DomainName:

[REQUIRED]

The domain to deregister in WorkMail and SES.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListMailDomains (new) Link ¶

Lists the mail domains in a given Amazon WorkMail organization.

See also: AWS API Documentation

Request Syntax

client.list_mail_domains(
    OrganizationId='string',
    MaxResults=123,
    NextToken='string'
)
type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The Amazon WorkMail organization for which to list domains.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return in a single call.

type NextToken:

string

param NextToken:

The token to use to retrieve the next page of results. The first call does not require a token.

rtype:

dict

returns:

Response Syntax

{
    'MailDomains': [
        {
            'DomainName': 'string',
            'DefaultDomain': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • MailDomains (list) --

      The list of mail domain summaries, specifying domains that exist in the specified Amazon WorkMail organization, along with the information about whether the domain is or isn't the default.

      • (dict) --

        The data for a given domain.

        • DomainName (string) --

          The domain name.

        • DefaultDomain (boolean) --

          Whether the domain is default or not.

    • NextToken (string) --

      The token to use to retrieve the next page of results. The value becomes null when there are no more results to return.

GetMailDomain (new) Link ¶

Gets details for a mail domain, including domain records required to configure your domain with recommended security.

See also: AWS API Documentation

Request Syntax

client.get_mail_domain(
    OrganizationId='string',
    DomainName='string'
)
type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The Amazon WorkMail organization for which the domain is retrieved.

type DomainName:

string

param DomainName:

[REQUIRED]

The domain from which you want to retrieve details.

rtype:

dict

returns:

Response Syntax

{
    'Records': [
        {
            'Type': 'string',
            'Hostname': 'string',
            'Value': 'string'
        },
    ],
    'IsTestDomain': True|False,
    'IsDefault': True|False,
    'OwnershipVerificationStatus': 'PENDING'|'VERIFIED'|'FAILED',
    'DkimVerificationStatus': 'PENDING'|'VERIFIED'|'FAILED'
}

Response Structure

  • (dict) --

    • Records (list) --

      A list of the DNS records that Amazon WorkMail recommends adding in your DNS provider for the best user experience. The records configure your domain with DMARC, SPF, DKIM, and direct incoming email traffic to SES. See admin guide for more details.

      • (dict) --

        A DNS record uploaded to your DNS provider.

        • Type (string) --

          The RFC 1035 record type. Possible values: CNAME, A, MX.

        • Hostname (string) --

          The DNS hostname.- For example, domain.example.com.

        • Value (string) --

          The value returned by the DNS for a query to that hostname and record type.

    • IsTestDomain (boolean) --

      Specifies whether the domain is a test domain provided by WorkMail, or a custom domain.

    • IsDefault (boolean) --

      Specifies whether the domain is the default domain for your organization.

    • OwnershipVerificationStatus (string) --

      Indicates the status of the domain ownership verification.

    • DkimVerificationStatus (string) --

      Indicates the status of a DKIM verification.

UpdateDefaultMailDomain (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.update_default_mail_domain(
    OrganizationId='string',
    DomainName='string'
)
type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The Amazon WorkMail organization for which to list domains.

type DomainName:

string

param DomainName:

[REQUIRED]

The domain name that will become the default domain.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --