ListEmailIdentitiesCommand

Returns a list of all of the email identities that are associated with your Amazon Web Services account. An identity can be either an email address or a domain. This operation returns identities that are verified as well as those that aren't. This operation returns identities that are associated with Amazon SES and Amazon Pinpoint.

Example Syntax

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

import { SESv2Client, ListEmailIdentitiesCommand } from "@aws-sdk/client-sesv2"; // ES Modules import
// const { SESv2Client, ListEmailIdentitiesCommand } = require("@aws-sdk/client-sesv2"); // CommonJS import
const client = new SESv2Client(config);
const input = { // ListEmailIdentitiesRequest
  NextToken: "STRING_VALUE",
  PageSize: Number("int"),
};
const command = new ListEmailIdentitiesCommand(input);
const response = await client.send(command);
// { // ListEmailIdentitiesResponse
//   EmailIdentities: [ // IdentityInfoList
//     { // IdentityInfo
//       IdentityType: "EMAIL_ADDRESS" || "DOMAIN" || "MANAGED_DOMAIN",
//       IdentityName: "STRING_VALUE",
//       SendingEnabled: true || false,
//       VerificationStatus: "PENDING" || "SUCCESS" || "FAILED" || "TEMPORARY_FAILURE" || "NOT_STARTED",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListEmailIdentitiesCommand Input

See ListEmailIdentitiesCommandInput for more details

Parameter
Type
Description
NextToken
string | undefined

A token returned from a previous call to ListEmailIdentities to indicate the position in the list of identities.

PageSize
number | undefined

The number of results to show in a single call to ListEmailIdentities. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

The value you specify has to be at least 0, and can be no more than 1000.

ListEmailIdentitiesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
EmailIdentities
IdentityInfo[] | undefined

An array that includes all of the email identities associated with your Amazon Web Services account.

NextToken
string | undefined

A token that indicates that there are additional configuration sets to list. To view additional configuration sets, issue another request to ListEmailIdentities, and pass this token in the NextToken parameter.

Throws

Name
Fault
Details
BadRequestException
client

The input you provided is invalid.

TooManyRequestsException
client

Too many requests have been made to the operation.

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