Skip to content

list_cidr_locations

list_cidr_locations(
    collection_id: UUID,
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[int] = None,
) -> ListCidrLocationsResponse

Returns a paginated list of CIDR locations for the given collection (metadata only, does not include CIDR blocks).

Parameters:

  • collection_id (UUID) –

    The CIDR collection ID.

  • next_token (Optional[PaginationToken], default: None ) –

    An opaque pagination token to indicate where the service is to begin enumerating results.

    If no value is provided, the listing of results starts from the beginning.

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

    The maximum number of CIDR collection locations to return in the response.

Raises:

Source code in docs_src/capo_route_53/_services/route53.py
def list_cidr_locations(
    self,
    collection_id: "capo_route_53.types.uuid.UUID",
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
    next_token: Optional[
        "capo_route_53.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_route_53.types.list_cidr_locations_response.ListCidrLocationsResponse":
    """<p>Returns a paginated list of CIDR locations for the given collection (metadata only, does not include CIDR blocks).</p>

    Args:
        collection_id: <p>The CIDR collection ID.</p>
        next_token: <p>An opaque pagination token to indicate where the service is to begin enumerating results.</p> <p>If no value is provided, the listing of results starts from the beginning.</p>
        max_results: <p>The maximum number of CIDR collection locations to return in the response.</p>

    Raises:
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.no_such_cidr_collection_exception.NoSuchCidrCollectionException: <p>The CIDR collection you specified, doesn't exist.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route_53.types.list_cidr_locations_request.ListCidrLocationsRequest]",
    ) -> OperationResponse[
        "capo_route_53.types.list_cidr_locations_response.ListCidrLocationsResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.list_cidr_locations

        output, http_response = (
            capo_route_53._operations.aws_dns_v20130401.list_cidr_locations.list_cidr_locations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCidrLocations")
    )
    input_: capo_route_53.types.list_cidr_locations_request.ListCidrLocationsRequest = {
        "collection_id": collection_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output