Skip to content

list_traffic_policy_instances async

list_traffic_policy_instances(
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    hosted_zone_id_marker: Optional[ResourceId] = None,
    traffic_policy_instance_name_marker: Optional[DNSName] = None,
    traffic_policy_instance_type_marker: Optional[RRType] = None,
    max_items: Optional[int] = None,
) -> ListTrafficPolicyInstancesResponse

Gets information about the traffic policy instances that you created by using the current Amazon Web Services account.

After you submit an UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53 creates the resource record sets that are specified in the traffic policy definition. For more information, see the State response element.

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.

Parameters:

  • hosted_zone_id_marker (Optional[ResourceId], default: None ) –

    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.

  • traffic_policy_instance_name_marker (Optional[DNSName], default: None ) –

    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.

  • traffic_policy_instance_type_marker (Optional[RRType], default: None ) –

    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.

  • max_items (Optional[int], default: None ) –

    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.

Raises:

Source code in docs_src/capo_route_53/_services/async_route53.py
async def list_traffic_policy_instances(
    self,
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    hosted_zone_id_marker: Optional[
        "capo_route_53.types.resource_id.ResourceId"
    ] = None,
    traffic_policy_instance_name_marker: Optional[
        "capo_route_53.types.dns_name.DNSName"
    ] = None,
    traffic_policy_instance_type_marker: Optional[
        "capo_route_53.types.rr_type.RRType"
    ] = None,
    max_items: Optional[int] = None,
) -> "capo_route_53.types.list_traffic_policy_instances_response.ListTrafficPolicyInstancesResponse":
    """<p>Gets information about the traffic policy instances that you created by using the current Amazon Web Services account.</p> <note> <p>After you submit an <code>UpdateTrafficPolicyInstance</code> request, there's a brief delay while Amazon Route 53 creates the resource record sets that are specified in the traffic policy definition. For more information, see the <code>State</code> response element.</p> </note> <p>Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policy instances, you can use the <code>MaxItems</code> parameter to list them in groups of up to 100.</p>

    Args:
        hosted_zone_id_marker: <p>If the value of <code>IsTruncated</code> in the previous response was <code>true</code>, you have more traffic policy instances. To get more traffic policy instances, submit another <code>ListTrafficPolicyInstances</code> request. For the value of <code>HostedZoneId</code>, specify the value of <code>HostedZoneIdMarker</code> from the previous response, which is the hosted zone ID of the first traffic policy instance in the next group of traffic policy instances.</p> <p>If the value of <code>IsTruncated</code> in the previous response was <code>false</code>, there are no more traffic policy instances to get.</p>
        traffic_policy_instance_name_marker: <p>If the value of <code>IsTruncated</code> in the previous response was <code>true</code>, you have more traffic policy instances. To get more traffic policy instances, submit another <code>ListTrafficPolicyInstances</code> request. For the value of <code>trafficpolicyinstancename</code>, specify the value of <code>TrafficPolicyInstanceNameMarker</code> from the previous response, which is the name of the first traffic policy instance in the next group of traffic policy instances.</p> <p>If the value of <code>IsTruncated</code> in the previous response was <code>false</code>, there are no more traffic policy instances to get.</p>
        traffic_policy_instance_type_marker: <p>If the value of <code>IsTruncated</code> in the previous response was <code>true</code>, you have more traffic policy instances. To get more traffic policy instances, submit another <code>ListTrafficPolicyInstances</code> request. For the value of <code>trafficpolicyinstancetype</code>, specify the value of <code>TrafficPolicyInstanceTypeMarker</code> from the previous response, which is the type of the first traffic policy instance in the next group of traffic policy instances.</p> <p>If the value of <code>IsTruncated</code> in the previous response was <code>false</code>, there are no more traffic policy instances to get.</p>
        max_items: <p>The maximum number of traffic policy instances that you want Amazon Route 53 to return in response to a <code>ListTrafficPolicyInstances</code> request. If you have more than <code>MaxItems</code> traffic policy instances, the value of the <code>IsTruncated</code> element in the response is <code>true</code>, and the values of <code>HostedZoneIdMarker</code>, <code>TrafficPolicyInstanceNameMarker</code>, and <code>TrafficPolicyInstanceTypeMarker</code> represent the first traffic policy instance in the next group of <code>MaxItems</code> traffic policy instances.</p>

    Raises:
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.no_such_traffic_policy_instance.NoSuchTrafficPolicyInstance: <p>No traffic policy instance exists with the specified ID.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53.types.list_traffic_policy_instances_request.ListTrafficPolicyInstancesRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53.types.list_traffic_policy_instances_response.ListTrafficPolicyInstancesResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.list_traffic_policy_instances

        (
            output,
            http_response,
        ) = await capo_route_53._operations.aws_dns_v20130401.list_traffic_policy_instances.async_list_traffic_policy_instances(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTrafficPolicyInstances")
    )
    input_: capo_route_53.types.list_traffic_policy_instances_request.ListTrafficPolicyInstancesRequest = {}
    if hosted_zone_id_marker is not None:
        input_["hosted_zone_id_marker"] = hosted_zone_id_marker
    if traffic_policy_instance_name_marker is not None:
        input_["traffic_policy_instance_name_marker"] = (
            traffic_policy_instance_name_marker
        )
    if traffic_policy_instance_type_marker is not None:
        input_["traffic_policy_instance_type_marker"] = (
            traffic_policy_instance_type_marker
        )
    if max_items is not None:
        input_["max_items"] = max_items

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output