listTrafficPolicyVersions method
Gets information about all of the versions for a specified traffic policy.
Traffic policy versions are listed in numerical order by
VersionNumber
.
May throw InvalidInput. May throw NoSuchTrafficPolicy.
Parameter id
:
Specify the value of Id
of the traffic policy for which you
want to list all versions.
Parameter maxItems
:
The maximum number of traffic policy versions that you want Amazon Route
53 to include in the response body for this request. If the specified
traffic policy has more than MaxItems
versions, the value of
IsTruncated
in the response is true
, and the
value of the TrafficPolicyVersionMarker
element is the ID of
the first version that Route 53 will return if you submit another request.
Parameter trafficPolicyVersionMarker
:
For your first request to ListTrafficPolicyVersions
, don't
include the TrafficPolicyVersionMarker
parameter.
If you have more traffic policy versions than the value of
MaxItems
, ListTrafficPolicyVersions
returns only
the first group of MaxItems
versions. To get more traffic
policy versions, submit another ListTrafficPolicyVersions
request. For the value of TrafficPolicyVersionMarker
, specify
the value of TrafficPolicyVersionMarker
in the previous
response.
Implementation
Future<ListTrafficPolicyVersionsResponse> listTrafficPolicyVersions({
required String id,
String? maxItems,
String? trafficPolicyVersionMarker,
}) async {
ArgumentError.checkNotNull(id, 'id');
_s.validateStringLength(
'id',
id,
1,
36,
isRequired: true,
);
_s.validateStringLength(
'trafficPolicyVersionMarker',
trafficPolicyVersionMarker,
0,
4,
);
final $query = <String, List<String>>{
if (maxItems != null) 'maxitems': [maxItems],
if (trafficPolicyVersionMarker != null)
'trafficpolicyversion': [trafficPolicyVersionMarker],
};
final $result = await _protocol.send(
method: 'GET',
requestUri:
'/2013-04-01/trafficpolicies/${Uri.encodeComponent(id)}/versions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListTrafficPolicyVersionsResponse.fromXml($result.body);
}