- 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.
ListTrafficPolicyInstancesCommand
Gets information about the traffic policy instances that you created by using the current Amazon Web Services account.
After you submit an UpdateTrafficPolicyInstance
request, there's a brief delay while Amazon Route 53 creates the resource record sets that are specified in the traffic policy definition. For more information, see the State
response element.
Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policy instances, you can use the MaxItems
parameter to list them in groups of up to 100.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Route53Client, ListTrafficPolicyInstancesCommand } from "@aws-sdk/client-route-53"; // ES Modules import
// const { Route53Client, ListTrafficPolicyInstancesCommand } = require("@aws-sdk/client-route-53"); // CommonJS import
const client = new Route53Client(config);
const input = { // ListTrafficPolicyInstancesRequest
HostedZoneIdMarker: "STRING_VALUE",
TrafficPolicyInstanceNameMarker: "STRING_VALUE",
TrafficPolicyInstanceTypeMarker: "SOA" || "A" || "TXT" || "NS" || "CNAME" || "MX" || "NAPTR" || "PTR" || "SRV" || "SPF" || "AAAA" || "CAA" || "DS" || "TLSA" || "SSHFP" || "SVCB" || "HTTPS",
MaxItems: Number("int"),
};
const command = new ListTrafficPolicyInstancesCommand(input);
const response = await client.send(command);
// { // ListTrafficPolicyInstancesResponse
// TrafficPolicyInstances: [ // TrafficPolicyInstances // required
// { // TrafficPolicyInstance
// Id: "STRING_VALUE", // required
// HostedZoneId: "STRING_VALUE", // required
// Name: "STRING_VALUE", // required
// TTL: Number("long"), // required
// State: "STRING_VALUE", // required
// Message: "STRING_VALUE", // required
// TrafficPolicyId: "STRING_VALUE", // required
// TrafficPolicyVersion: Number("int"), // required
// TrafficPolicyType: "SOA" || "A" || "TXT" || "NS" || "CNAME" || "MX" || "NAPTR" || "PTR" || "SRV" || "SPF" || "AAAA" || "CAA" || "DS" || "TLSA" || "SSHFP" || "SVCB" || "HTTPS", // required
// },
// ],
// HostedZoneIdMarker: "STRING_VALUE",
// TrafficPolicyInstanceNameMarker: "STRING_VALUE",
// TrafficPolicyInstanceTypeMarker: "SOA" || "A" || "TXT" || "NS" || "CNAME" || "MX" || "NAPTR" || "PTR" || "SRV" || "SPF" || "AAAA" || "CAA" || "DS" || "TLSA" || "SSHFP" || "SVCB" || "HTTPS",
// IsTruncated: true || false, // required
// MaxItems: Number("int"), // required
// };
ListTrafficPolicyInstancesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
HostedZoneIdMarker | string | undefined | If the value of If the value of |
MaxItems | number | undefined | The maximum number of traffic policy instances that you want Amazon Route 53 to return in response to a |
TrafficPolicyInstanceNameMarker | string | undefined | If the value of If the value of |
TrafficPolicyInstanceTypeMarker | RRType | undefined | If the value of If the value of |
ListTrafficPolicyInstancesCommand 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 policy instances to be listed. If the response was truncated, you can get more traffic policy instances by calling |
MaxItems Required | number | undefined | The value that you specified for the |
TrafficPolicyInstances Required | TrafficPolicyInstance[] | undefined | A list that contains one |
HostedZoneIdMarker | string | undefined | If |
TrafficPolicyInstanceNameMarker | string | undefined | If |
TrafficPolicyInstanceTypeMarker | RRType | undefined | If |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidInput | client | The input is not valid. |
NoSuchTrafficPolicyInstance | client | No traffic policy instance exists with the specified ID. |
Route53ServiceException | Base exception class for all service exceptions from Route53 service. |