ListSuppressedDestinationsCommand

Retrieves a list of email addresses that are on the suppression list for your account.

Example Syntax

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

import { SESv2Client, ListSuppressedDestinationsCommand } from "@aws-sdk/client-sesv2"; // ES Modules import
// const { SESv2Client, ListSuppressedDestinationsCommand } = require("@aws-sdk/client-sesv2"); // CommonJS import
const client = new SESv2Client(config);
const input = { // ListSuppressedDestinationsRequest
  Reasons: [ // SuppressionListReasons
    "BOUNCE" || "COMPLAINT",
  ],
  StartDate: new Date("TIMESTAMP"),
  EndDate: new Date("TIMESTAMP"),
  NextToken: "STRING_VALUE",
  PageSize: Number("int"),
};
const command = new ListSuppressedDestinationsCommand(input);
const response = await client.send(command);
// { // ListSuppressedDestinationsResponse
//   SuppressedDestinationSummaries: [ // SuppressedDestinationSummaries
//     { // SuppressedDestinationSummary
//       EmailAddress: "STRING_VALUE", // required
//       Reason: "BOUNCE" || "COMPLAINT", // required
//       LastUpdateTime: new Date("TIMESTAMP"), // required
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListSuppressedDestinationsCommand Input

Parameter
Type
Description
EndDate
Date | undefined

Used to filter the list of suppressed email destinations so that it only includes addresses that were added to the list before a specific date.

NextToken
string | undefined

A token returned from a previous call to ListSuppressedDestinations to indicate the position in the list of suppressed email addresses.

PageSize
number | undefined

The number of results to show in a single call to ListSuppressedDestinations. 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.

Reasons
SuppressionListReason[] | undefined

The factors that caused the email address to be added to .

StartDate
Date | undefined

Used to filter the list of suppressed email destinations so that it only includes addresses that were added to the list after a specific date.

ListSuppressedDestinationsCommand Output

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

A token that indicates that there are additional email addresses on the suppression list for your account. To view additional suppressed addresses, issue another request to ListSuppressedDestinations, and pass this token in the NextToken parameter.

SuppressedDestinationSummaries
SuppressedDestinationSummary[] | undefined

A list of summaries, each containing a summary for a suppressed email destination.

Throws

Name
Fault
Details
BadRequestException
client

The input you provided is invalid.

InvalidNextTokenException
client

The specified request includes an invalid or expired token.

TooManyRequestsException
client

Too many requests have been made to the operation.

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