ListTrafficPoliciesCommand

List traffic policy resources.

Example Syntax

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

import { MailManagerClient, ListTrafficPoliciesCommand } from "@aws-sdk/client-mailmanager"; // ES Modules import
// const { MailManagerClient, ListTrafficPoliciesCommand } = require("@aws-sdk/client-mailmanager"); // CommonJS import
const client = new MailManagerClient(config);
const input = { // ListTrafficPoliciesRequest
  PageSize: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListTrafficPoliciesCommand(input);
const response = await client.send(command);
// { // ListTrafficPoliciesResponse
//   TrafficPolicies: [ // TrafficPolicyList
//     { // TrafficPolicy
//       TrafficPolicyName: "STRING_VALUE", // required
//       TrafficPolicyId: "STRING_VALUE", // required
//       DefaultAction: "ALLOW" || "DENY", // required
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListTrafficPoliciesCommand Input

See ListTrafficPoliciesCommandInput for more details

Parameter
Type
Description
NextToken
string | undefined

If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.

PageSize
number | undefined

The maximum number of traffic policy resources that are returned per call. You can use NextToken to obtain further traffic policies.

ListTrafficPoliciesCommand Output

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

If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.

TrafficPolicies
TrafficPolicy[] | undefined

The list of traffic policies.

Throws

Name
Fault
Details
ValidationException
client

The request validation has failed. For details, see the accompanying error message.

MailManagerServiceException
Base exception class for all service exceptions from MailManager service.