- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListTrafficPoliciesCommand
Gets information about the latest version for every traffic policy that is associated with the current Amazon Web Services account. Policies are listed in the order that they were created in.
For information about how of deleting a traffic policy affects the response from ListTrafficPolicies
, see DeleteTrafficPolicy .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Route53Client, ListTrafficPoliciesCommand } from "@aws-sdk/client-route-53"; // ES Modules import
// const { Route53Client, ListTrafficPoliciesCommand } = require("@aws-sdk/client-route-53"); // CommonJS import
const client = new Route53Client(config);
const input = { // ListTrafficPoliciesRequest
TrafficPolicyIdMarker: "STRING_VALUE",
MaxItems: Number("int"),
};
const command = new ListTrafficPoliciesCommand(input);
const response = await client.send(command);
// { // ListTrafficPoliciesResponse
// TrafficPolicySummaries: [ // TrafficPolicySummaries // required
// { // TrafficPolicySummary
// Id: "STRING_VALUE", // required
// Name: "STRING_VALUE", // required
// Type: "SOA" || "A" || "TXT" || "NS" || "CNAME" || "MX" || "NAPTR" || "PTR" || "SRV" || "SPF" || "AAAA" || "CAA" || "DS" || "TLSA" || "SSHFP" || "SVCB" || "HTTPS", // required
// LatestVersion: Number("int"), // required
// TrafficPolicyCount: Number("int"), // required
// },
// ],
// IsTruncated: true || false, // required
// TrafficPolicyIdMarker: "STRING_VALUE", // required
// MaxItems: Number("int"), // required
// };
ListTrafficPoliciesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxItems | number | undefined | (Optional) The maximum number of traffic policies that you want Amazon Route 53 to return in response to this request. If you have more than |
TrafficPolicyIdMarker | string | undefined | (Conditional) For your first request to If you have more traffic policies than the value of |
ListTrafficPoliciesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
IsTruncated Required | boolean | undefined | A flag that indicates whether there are more traffic policies to be listed. If the response was truncated, you can get the next group of traffic policies by submitting another |
MaxItems Required | number | undefined | The value that you specified for the |
TrafficPolicyIdMarker Required | string | undefined | If the value of |
TrafficPolicySummaries Required | TrafficPolicySummary[] | undefined | A list that contains one |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidInput | client | The input is not valid. |
Route53ServiceException | Base exception class for all service exceptions from Route53 service. |