SESV2 / Client / create_import_job

create_import_job#

SESV2.Client.create_import_job(**kwargs)#

Creates an import job for a data destination.

See also: AWS API Documentation

Request Syntax

response = client.create_import_job(
    ImportDestination={
        'SuppressionListDestination': {
            'SuppressionListImportAction': 'DELETE'|'PUT'
        },
        'ContactListDestination': {
            'ContactListName': 'string',
            'ContactListImportAction': 'DELETE'|'PUT'
        }
    },
    ImportDataSource={
        'S3Url': 'string',
        'DataFormat': 'CSV'|'JSON'
    }
)
Parameters:
  • ImportDestination (dict) –

    [REQUIRED]

    The destination for the import job.

    • SuppressionListDestination (dict) –

      An object that contains the action of the import job towards suppression list.

      • SuppressionListImportAction (string) – [REQUIRED]

        The type of action to perform on the address. The following are possible values:

        • PUT: add the addresses to the suppression list. If the record already exists, it will override it with the new value.

        • DELETE: remove the addresses from the suppression list.

    • ContactListDestination (dict) –

      An object that contains the action of the import job towards a contact list.

      • ContactListName (string) – [REQUIRED]

        The name of the contact list.

      • ContactListImportAction (string) – [REQUIRED]

        >The type of action to perform on the addresses. The following are the possible values:

        • PUT: add the addresses to the contact list. If the record already exists, it will override it with the new value.

        • DELETE: remove the addresses from the contact list.

  • ImportDataSource (dict) –

    [REQUIRED]

    The data source for the import job.

    • S3Url (string) – [REQUIRED]

      An Amazon S3 URL in the format s3://<bucket_name>/<object>.

    • DataFormat (string) – [REQUIRED]

      The data format of the import job’s data source.

Return type:

dict

Returns:

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) –

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

    • JobId (string) –

      A string that represents the import job ID.

Exceptions

  • SESV2.Client.exceptions.BadRequestException

  • SESV2.Client.exceptions.LimitExceededException

  • SESV2.Client.exceptions.TooManyRequestsException