listTrafficPolicies method
Gets information about the latest version for every traffic policy that is associated with the current AWS 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.
May throw InvalidInput.
Parameter maxItems
:
(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
MaxItems
traffic policies, the value of
IsTruncated
in the response is true
, and the
value of TrafficPolicyIdMarker
is the ID of the first traffic
policy that Route 53 will return if you submit another request.
Parameter trafficPolicyIdMarker
:
(Conditional) For your first request to ListTrafficPolicies
,
don't include the TrafficPolicyIdMarker
parameter.
If you have more traffic policies than the value of MaxItems
,
ListTrafficPolicies
returns only the first
MaxItems
traffic policies. To get the next group of policies,
submit another request to ListTrafficPolicies
. For the value
of TrafficPolicyIdMarker
, specify the value of
TrafficPolicyIdMarker
that was returned in the previous
response.
Implementation
Future<ListTrafficPoliciesResponse> listTrafficPolicies({
String? maxItems,
String? trafficPolicyIdMarker,
}) async {
_s.validateStringLength(
'trafficPolicyIdMarker',
trafficPolicyIdMarker,
1,
36,
);
final $query = <String, List<String>>{
if (maxItems != null) 'maxitems': [maxItems],
if (trafficPolicyIdMarker != null)
'trafficpolicyid': [trafficPolicyIdMarker],
};
final $result = await _protocol.send(
method: 'GET',
requestUri: '/2013-04-01/trafficpolicies',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListTrafficPoliciesResponse.fromXml($result.body);
}