Amazon WorkMail

2020/10/15 - Amazon WorkMail - 2 new 1 updated api methods

Changes  Add CreateOrganization and DeleteOrganization API operations.

DeleteOrganization (new) Link ¶

Deletes an Amazon WorkMail organization and all underlying AWS resources managed by Amazon WorkMail as part of the organization. You can choose whether to delete the associated directory. For more information, see Removing an organization in the Amazon WorkMail Administrator Guide .

See also: AWS API Documentation

Request Syntax

client.delete_organization(
    ClientToken='string',
    OrganizationId='string',
    DeleteDirectory=True|False
)
type ClientToken

string

param ClientToken

The idempotency token associated with the request.

This field is autopopulated if not provided.

type OrganizationId

string

param OrganizationId

[REQUIRED]

The organization ID.

type DeleteDirectory

boolean

param DeleteDirectory

[REQUIRED]

If true, deletes the AWS Directory Service directory associated with the organization.

rtype

dict

returns

Response Syntax

{
    'OrganizationId': 'string',
    'State': 'string'
}

Response Structure

  • (dict) --

    • OrganizationId (string) --

      The organization ID.

    • State (string) --

      The state of the organization.

CreateOrganization (new) Link ¶

Creates a new Amazon 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 Amazon WorkMail directory for you. For more information, see Adding an organization in the Amazon WorkMail Administrator Guide .

You can associate multiple email domains with an organization, then set your default email domain from the Amazon 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 Amazon WorkMail Administrator Guide .

Optionally, you can use a customer managed master key from AWS Key Management Service (AWS KMS) to encrypt email for your organization. If you don't associate an AWS KMS key, Amazon WorkMail creates a default AWS managed master key for you.

See also: AWS API Documentation

Request Syntax

client.create_organization(
    DirectoryId='string',
    Alias='string',
    ClientToken='string',
    Domains=[
        {
            'DomainName': 'string',
            'HostedZoneId': 'string'
        },
    ],
    KmsKeyArn='string',
    EnableInteroperability=True|False
)
type DirectoryId

string

param DirectoryId

The AWS Directory Service directory ID.

type Alias

string

param Alias

[REQUIRED]

The organization alias.

type ClientToken

string

param ClientToken

The idempotency token associated with the request.

This field is autopopulated if not provided.

type Domains

list

param Domains

The email domains to associate with the organization.

  • (dict) --

    The domain to associate with an Amazon WorkMail organization.

    When you configure a domain hosted in Amazon Route 53 (Route 53), all recommended DNS records are added to the organization when you create it. For more information, see Adding a domain in the Amazon WorkMail Administrator Guide .

    • DomainName (string) --

      The fully qualified domain name.

    • HostedZoneId (string) --

      The hosted zone ID for a domain hosted in Route 53. Required when configuring a domain hosted in Route 53.

type KmsKeyArn

string

param KmsKeyArn

The Amazon Resource Name (ARN) of a customer managed master key from AWS KMS.

type EnableInteroperability

boolean

param EnableInteroperability

When true , allows organization interoperability between Amazon WorkMail and Microsoft Exchange. Can only be set to true if an AD Connector directory ID is included in the request.

rtype

dict

returns

Response Syntax

{
    'OrganizationId': 'string'
}

Response Structure

  • (dict) --

    • OrganizationId (string) --

      The organization ID.

ListOrganizations (updated) Link ¶
Changes (response)
{'OrganizationSummaries': {'DefaultMailDomain': 'string'}}

Returns summaries of the customer's organizations.

See also: AWS API Documentation

Request Syntax

client.list_organizations(
    NextToken='string',
    MaxResults=123
)
type NextToken

string

param NextToken

The token to use to retrieve the next page of results. The first call does not contain any tokens.

type MaxResults

integer

param MaxResults

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

rtype

dict

returns

Response Syntax

{
    'OrganizationSummaries': [
        {
            'OrganizationId': 'string',
            'Alias': 'string',
            'DefaultMailDomain': 'string',
            'ErrorMessage': 'string',
            'State': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • OrganizationSummaries (list) --

      The overview of owned organizations presented as a list of organization summaries.

      • (dict) --

        The representation of an organization.

        • OrganizationId (string) --

          The identifier associated with the organization.

        • Alias (string) --

          The alias associated with the organization.

        • DefaultMailDomain (string) --

          The default email domain associated with the organization.

        • ErrorMessage (string) --

          The error message associated with the organization. It is only present if unexpected behavior has occurred with regards to the organization. It provides insight or solutions regarding unexpected behavior.

        • State (string) --

          The state associated with the organization.

    • NextToken (string) --

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