listTrafficPolicyInstances method

Future<ListTrafficPolicyInstancesResponse> listTrafficPolicyInstances({
  1. String? hostedZoneIdMarker,
  2. String? maxItems,
  3. String? trafficPolicyInstanceNameMarker,
  4. RRType? trafficPolicyInstanceTypeMarker,
})

Gets information about the traffic policy instances that you created by using the current AWS account. 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.

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 ListTrafficPolicyInstances 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 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 maxItems : The maximum number of traffic policy instances that you want Amazon Route 53 to return in response to a ListTrafficPolicyInstances 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 in the next group of MaxItems traffic policy instances.

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 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 was 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<ListTrafficPolicyInstancesResponse> listTrafficPolicyInstances({
  String? hostedZoneIdMarker,
  String? maxItems,
  String? trafficPolicyInstanceNameMarker,
  RRType? trafficPolicyInstanceTypeMarker,
}) async {
  _s.validateStringLength(
    'hostedZoneIdMarker',
    hostedZoneIdMarker,
    0,
    32,
  );
  _s.validateStringLength(
    'trafficPolicyInstanceNameMarker',
    trafficPolicyInstanceNameMarker,
    0,
    1024,
  );
  final $query = <String, List<String>>{
    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',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListTrafficPolicyInstancesResponse.fromXml($result.body);
}