listTrafficPolicyInstancesByHostedZone method
Gets information about the traffic policy instances that you created in a
specified hosted zone.
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 NoSuchHostedZone.
Parameter hostedZoneId
:
The ID of the hosted zone that you want to list traffic policy instances
for.
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 is true,
you have more traffic policy instances. To get more traffic policy
instances, submit another ListTrafficPolicyInstances
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 in the
next group of traffic policy instances.
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 is true,
you have more traffic policy instances. To get more traffic policy
instances, submit another ListTrafficPolicyInstances
request.
For the value of trafficpolicyinstancetype
, specify the value
of TrafficPolicyInstanceTypeMarker
from the previous
response, which is the type of the first traffic policy instance in the
next group of traffic policy instances.
If the value of IsTruncated
in the previous response was
false
, there are no more traffic policy instances to get.
Implementation
Future<ListTrafficPolicyInstancesByHostedZoneResponse>
listTrafficPolicyInstancesByHostedZone({
required String hostedZoneId,
String? maxItems,
String? trafficPolicyInstanceNameMarker,
RRType? trafficPolicyInstanceTypeMarker,
}) async {
ArgumentError.checkNotNull(hostedZoneId, 'hostedZoneId');
_s.validateStringLength(
'hostedZoneId',
hostedZoneId,
0,
32,
isRequired: true,
);
_s.validateStringLength(
'trafficPolicyInstanceNameMarker',
trafficPolicyInstanceNameMarker,
0,
1024,
);
final $query = <String, List<String>>{
'id': [hostedZoneId],
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/hostedzone',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListTrafficPolicyInstancesByHostedZoneResponse.fromXml($result.body);
}