Amazon WorkMail

2020/09/22 - Amazon WorkMail - 4 new api methods

Changes  Update workmail client to latest version

StartMailboxExportJob (new) Link ¶

Starts a mailbox export job to export MIME-format email messages and calendar items from the specified mailbox to the specified Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Exporting mailbox content in the Amazon WorkMail Administrator Guide.

See also: AWS API Documentation

Request Syntax

client.start_mailbox_export_job(
    ClientToken='string',
    OrganizationId='string',
    EntityId='string',
    Description='string',
    RoleArn='string',
    KmsKeyArn='string',
    S3BucketName='string',
    S3Prefix='string'
)
type ClientToken:

string

param ClientToken:

[REQUIRED]

The idempotency token for the client request.

This field is autopopulated if not provided.

type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The identifier associated with the organization.

type EntityId:

string

param EntityId:

[REQUIRED]

The identifier of the user or resource associated with the mailbox.

type Description:

string

param Description:

The mailbox export job description.

type RoleArn:

string

param RoleArn:

[REQUIRED]

The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the S3 bucket.

type KmsKeyArn:

string

param KmsKeyArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS KMS) key that encrypts the exported mailbox content.

type S3BucketName:

string

param S3BucketName:

[REQUIRED]

The name of the S3 bucket.

type S3Prefix:

string

param S3Prefix:

[REQUIRED]

The S3 bucket prefix.

rtype:

dict

returns:

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The job ID.

ListMailboxExportJobs (new) Link ¶

Lists the mailbox export jobs started for the specified organization within the last seven days.

See also: AWS API Documentation

Request Syntax

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

string

param OrganizationId:

[REQUIRED]

The organization ID.

type NextToken:

string

param NextToken:

The token to use to retrieve the next page of results.

type MaxResults:

integer

param MaxResults:

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

rtype:

dict

returns:

Response Syntax

{
    'Jobs': [
        {
            'JobId': 'string',
            'EntityId': 'string',
            'Description': 'string',
            'S3BucketName': 'string',
            'S3Path': 'string',
            'EstimatedProgress': 123,
            'State': 'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Jobs (list) --

      The mailbox export job details.

      • (dict) --

        The details of a mailbox export job, including the user or resource ID associated with the mailbox and the S3 bucket that the mailbox contents are exported to.

        • JobId (string) --

          The identifier of the mailbox export job.

        • EntityId (string) --

          The identifier of the user or resource associated with the mailbox.

        • Description (string) --

          The mailbox export job description.

        • S3BucketName (string) --

          The name of the S3 bucket.

        • S3Path (string) --

          The path to the S3 bucket and file that the mailbox export job exports to.

        • EstimatedProgress (integer) --

          The estimated progress of the mailbox export job, in percentage points.

        • State (string) --

          The state of the mailbox export job.

        • StartTime (datetime) --

          The mailbox export job start timestamp.

        • EndTime (datetime) --

          The mailbox export job end timestamp.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

DescribeMailboxExportJob (new) Link ¶

Describes the current status of a mailbox export job.

See also: AWS API Documentation

Request Syntax

client.describe_mailbox_export_job(
    JobId='string',
    OrganizationId='string'
)
type JobId:

string

param JobId:

[REQUIRED]

The mailbox export job ID.

type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The organization ID.

rtype:

dict

returns:

Response Syntax

{
    'EntityId': 'string',
    'Description': 'string',
    'RoleArn': 'string',
    'KmsKeyArn': 'string',
    'S3BucketName': 'string',
    'S3Prefix': 'string',
    'S3Path': 'string',
    'EstimatedProgress': 123,
    'State': 'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED',
    'ErrorInfo': 'string',
    'StartTime': datetime(2015, 1, 1),
    'EndTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • EntityId (string) --

      The identifier of the user or resource associated with the mailbox.

    • Description (string) --

      The mailbox export job description.

    • RoleArn (string) --

      The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the Amazon Simple Storage Service (Amazon S3) bucket.

    • KmsKeyArn (string) --

      The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS KMS) key that encrypts the exported mailbox content.

    • S3BucketName (string) --

      The name of the S3 bucket.

    • S3Prefix (string) --

      The S3 bucket prefix.

    • S3Path (string) --

      The path to the S3 bucket and file that the mailbox export job is exporting to.

    • EstimatedProgress (integer) --

      The estimated progress of the mailbox export job, in percentage points.

    • State (string) --

      The state of the mailbox export job.

    • ErrorInfo (string) --

      Error information for failed mailbox export jobs.

    • StartTime (datetime) --

      The mailbox export job start timestamp.

    • EndTime (datetime) --

      The mailbox export job end timestamp.

CancelMailboxExportJob (new) Link ¶

Cancels a mailbox export job.

See also: AWS API Documentation

Request Syntax

client.cancel_mailbox_export_job(
    ClientToken='string',
    JobId='string',
    OrganizationId='string'
)
type ClientToken:

string

param ClientToken:

[REQUIRED]

The idempotency token for the client request.

This field is autopopulated if not provided.

type JobId:

string

param JobId:

[REQUIRED]

The job ID.

type OrganizationId:

string

param OrganizationId:

[REQUIRED]

The organization ID.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --