MailManager / Client / create_archive

create_archive#

MailManager.Client.create_archive(**kwargs)#

Creates a new email archive resource for storing and retaining emails.

See also: AWS API Documentation

Request Syntax

response = client.create_archive(
    ArchiveName='string',
    ClientToken='string',
    KmsKeyArn='string',
    Retention={
        'RetentionPeriod': 'THREE_MONTHS'|'SIX_MONTHS'|'NINE_MONTHS'|'ONE_YEAR'|'EIGHTEEN_MONTHS'|'TWO_YEARS'|'THIRTY_MONTHS'|'THREE_YEARS'|'FOUR_YEARS'|'FIVE_YEARS'|'SIX_YEARS'|'SEVEN_YEARS'|'EIGHT_YEARS'|'NINE_YEARS'|'TEN_YEARS'|'PERMANENT'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • ArchiveName (string) –

    [REQUIRED]

    A unique name for the new archive.

  • ClientToken (string) –

    A unique token Amazon SES uses to recognize retries of this request.

    This field is autopopulated if not provided.

  • KmsKeyArn (string) – The Amazon Resource Name (ARN) of the KMS key for encrypting emails in the archive.

  • Retention (dict) –

    The period for retaining emails in the archive before automatic deletion.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: RetentionPeriod.

    • RetentionPeriod (string) –

      The enum value sets the period for retaining emails in an archive.

  • Tags (list) –

    The tags used to organize, track, or control access for the resource. For example, { “tags”: {“key1”:”value1”, “key2”:”value2”} }.

    • (dict) –

      A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.

      • Key (string) – [REQUIRED]

        The key of the key-value tag.

      • Value (string) – [REQUIRED]

        The value of the key-value tag.

Return type:

dict

Returns:

Response Syntax

{
    'ArchiveId': 'string'
}

Response Structure

  • (dict) –

    The response from creating a new email archive.

    • ArchiveId (string) –

      The unique identifier for the newly created archive.

Exceptions

  • MailManager.Client.exceptions.ValidationException

  • MailManager.Client.exceptions.AccessDeniedException

  • MailManager.Client.exceptions.ServiceQuotaExceededException

  • MailManager.Client.exceptions.ConflictException

  • MailManager.Client.exceptions.ThrottlingException