CreateImportJobCommand

Creates an import job for a data destination.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SESv2Client, CreateImportJobCommand } from "@aws-sdk/client-sesv2"; // ES Modules import
// const { SESv2Client, CreateImportJobCommand } = require("@aws-sdk/client-sesv2"); // CommonJS import
const client = new SESv2Client(config);
const input = { // CreateImportJobRequest
  ImportDestination: { // ImportDestination
    SuppressionListDestination: { // SuppressionListDestination
      SuppressionListImportAction: "DELETE" || "PUT", // required
    },
    ContactListDestination: { // ContactListDestination
      ContactListName: "STRING_VALUE", // required
      ContactListImportAction: "DELETE" || "PUT", // required
    },
  },
  ImportDataSource: { // ImportDataSource
    S3Url: "STRING_VALUE", // required
    DataFormat: "CSV" || "JSON", // required
  },
};
const command = new CreateImportJobCommand(input);
const response = await client.send(command);
// { // CreateImportJobResponse
//   JobId: "STRING_VALUE",
// };

CreateImportJobCommand Input

See CreateImportJobCommandInput for more details

Parameter
Type
Description
ImportDataSource
Required
ImportDataSource | undefined

The data source for the import job.

ImportDestination
Required
ImportDestination | undefined

The destination for the import job.

CreateImportJobCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
JobId
string | undefined

A string that represents the import job ID.

Throws

Name
Fault
Details
BadRequestException
client

The input you provided is invalid.

LimitExceededException
client

There are too many instances of the specified resource type.

TooManyRequestsException
client

Too many requests have been made to the operation.

SESv2ServiceException
Base exception class for all service exceptions from SESv2 service.