listTrafficPolicyInstancesByPolicy method
Gets information about the traffic policy instances that you created by
using a specify traffic policy version.
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.
May throw InvalidInput. May throw NoSuchTrafficPolicyInstance. May throw NoSuchTrafficPolicy.
Parameter trafficPolicyId
:
The ID of the traffic policy for which you want to list traffic policy
instances.
Parameter trafficPolicyVersion
:
The version of the traffic policy for which you want to list traffic
policy instances. The version must be associated with the traffic policy
that is specified by TrafficPolicyId
.
Parameter hostedZoneIdMarker
:
If the value of IsTruncated
in the previous response was
true
, you have more traffic policy instances. To get more
traffic policy instances, submit another
ListTrafficPolicyInstancesByPolicy
request.
For the value of hostedzoneid
, specify the value of
HostedZoneIdMarker
from the previous response, which is the
hosted zone ID of the first traffic policy instance that Amazon Route 53
will return if you submit another request.
If the value of IsTruncated
in the previous response was
false
, there are no more traffic policy instances to get.
Parameter maxItems
:
The maximum number of traffic policy instances to be included in the
response body for this request. If you have more than
MaxItems
traffic policy instances, the value of the
IsTruncated
element in the response is true
, and
the values of HostedZoneIdMarker
,
TrafficPolicyInstanceNameMarker
, and
TrafficPolicyInstanceTypeMarker
represent the first traffic
policy instance that Amazon Route 53 will return if you submit another
request.
Parameter trafficPolicyInstanceNameMarker
:
If the value of IsTruncated
in the previous response was
true
, you have more traffic policy instances. To get more
traffic policy instances, submit another
ListTrafficPolicyInstancesByPolicy
request.
For the value of trafficpolicyinstancename
, specify the value
of TrafficPolicyInstanceNameMarker
from the previous
response, which is the name of the first traffic policy instance that
Amazon Route 53 will return if you submit another request.
If the value of IsTruncated
in the previous response was
false
, there are no more traffic policy instances to get.
Parameter trafficPolicyInstanceTypeMarker
:
If the value of IsTruncated
in the previous response was
true
, you have more traffic policy instances. To get more
traffic policy instances, submit another
ListTrafficPolicyInstancesByPolicy
request.
For the value of trafficpolicyinstancetype
, specify the value
of TrafficPolicyInstanceTypeMarker
from the previous
response, which is the name of the first traffic policy instance that
Amazon Route 53 will return if you submit another request.
If the value of IsTruncated
in the previous response was
false
, there are no more traffic policy instances to get.
Implementation
Future<ListTrafficPolicyInstancesByPolicyResponse>
listTrafficPolicyInstancesByPolicy({
required String trafficPolicyId,
required int trafficPolicyVersion,
String? hostedZoneIdMarker,
String? maxItems,
String? trafficPolicyInstanceNameMarker,
RRType? trafficPolicyInstanceTypeMarker,
}) async {
ArgumentError.checkNotNull(trafficPolicyId, 'trafficPolicyId');
_s.validateStringLength(
'trafficPolicyId',
trafficPolicyId,
1,
36,
isRequired: true,
);
ArgumentError.checkNotNull(trafficPolicyVersion, 'trafficPolicyVersion');
_s.validateNumRange(
'trafficPolicyVersion',
trafficPolicyVersion,
1,
1000,
isRequired: true,
);
_s.validateStringLength(
'hostedZoneIdMarker',
hostedZoneIdMarker,
0,
32,
);
_s.validateStringLength(
'trafficPolicyInstanceNameMarker',
trafficPolicyInstanceNameMarker,
0,
1024,
);
final $query = <String, List<String>>{
'id': [trafficPolicyId],
'version': [trafficPolicyVersion.toString()],
if (hostedZoneIdMarker != null) 'hostedzoneid': [hostedZoneIdMarker],
if (maxItems != null) 'maxitems': [maxItems],
if (trafficPolicyInstanceNameMarker != null)
'trafficpolicyinstancename': [trafficPolicyInstanceNameMarker],
if (trafficPolicyInstanceTypeMarker != null)
'trafficpolicyinstancetype': [
trafficPolicyInstanceTypeMarker.toValue()
],
};
final $result = await _protocol.send(
method: 'GET',
requestUri: '/2013-04-01/trafficpolicyinstances/trafficpolicy',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListTrafficPolicyInstancesByPolicyResponse.fromXml($result.body);
}