Skip to content

list_geo_locations async

list_geo_locations(
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    start_continent_code: Optional[GeoLocationContinentCode] = None,
    start_country_code: Optional[GeoLocationCountryCode] = None,
    start_subdivision_code: Optional[GeoLocationSubdivisionCode] = None,
    max_items: Optional[int] = None,
) -> ListGeoLocationsResponse

Retrieves a list of supported geographic locations.

Countries are listed first, and continents are listed last. If Amazon Route 53 supports subdivisions for a country (for example, states or provinces), the subdivisions for that country are listed in alphabetical order immediately after the corresponding country.

Route 53 does not perform authorization for this API because it retrieves information that is already available to the public.

For a list of supported geolocation codes, see the GeoLocation data type.

Parameters:

  • start_continent_code (Optional[GeoLocationContinentCode], default: None ) –

    The code for the continent with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Route 53 has already returned a page or more of results, if IsTruncated is true, and if NextContinentCode from the previous response has a value, enter that value in startcontinentcode to return the next page of results.

    Include startcontinentcode only if you want to list continents. Don't include startcontinentcode when you're listing countries or countries with their subdivisions.

  • start_country_code (Optional[GeoLocationCountryCode], default: None ) –

    The code for the country with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Route 53 has already returned a page or more of results, if IsTruncated is true, and if NextCountryCode from the previous response has a value, enter that value in startcountrycode to return the next page of results.

  • start_subdivision_code (Optional[GeoLocationSubdivisionCode], default: None ) –

    The code for the state of the United States with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Route 53 has already returned a page or more of results, if IsTruncated is true, and if NextSubdivisionCode from the previous response has a value, enter that value in startsubdivisioncode to return the next page of results.

    To list subdivisions (U.S. states), you must include both startcountrycode and startsubdivisioncode.

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

    (Optional) The maximum number of geolocations to be included in the response body for this request. If more than maxitems geolocations remain to be listed, then the value of the IsTruncated element in the response is true.

Raises:

Source code in docs_src/capo_route_53/_services/async_route53.py
async def list_geo_locations(
    self,
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    start_continent_code: Optional[
        "capo_route_53.types.geo_location_continent_code.GeoLocationContinentCode"
    ] = None,
    start_country_code: Optional[
        "capo_route_53.types.geo_location_country_code.GeoLocationCountryCode"
    ] = None,
    start_subdivision_code: Optional[
        "capo_route_53.types.geo_location_subdivision_code.GeoLocationSubdivisionCode"
    ] = None,
    max_items: Optional[int] = None,
) -> "capo_route_53.types.list_geo_locations_response.ListGeoLocationsResponse":
    """<p>Retrieves a list of supported geographic locations.</p> <p>Countries are listed first, and continents are listed last. If Amazon Route 53 supports subdivisions for a country (for example, states or provinces), the subdivisions for that country are listed in alphabetical order immediately after the corresponding country.</p> <p>Route 53 does not perform authorization for this API because it retrieves information that is already available to the public.</p> <p>For a list of supported geolocation codes, see the <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html">GeoLocation</a> data type.</p>

    Args:
        start_continent_code: <p>The code for the continent with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Route 53 has already returned a page or more of results, if <code>IsTruncated</code> is true, and if <code>NextContinentCode</code> from the previous response has a value, enter that value in <code>startcontinentcode</code> to return the next page of results.</p> <p>Include <code>startcontinentcode</code> only if you want to list continents. Don't include <code>startcontinentcode</code> when you're listing countries or countries with their subdivisions.</p>
        start_country_code: <p>The code for the country with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Route 53 has already returned a page or more of results, if <code>IsTruncated</code> is <code>true</code>, and if <code>NextCountryCode</code> from the previous response has a value, enter that value in <code>startcountrycode</code> to return the next page of results.</p>
        start_subdivision_code: <p>The code for the state of the United States with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Route 53 has already returned a page or more of results, if <code>IsTruncated</code> is <code>true</code>, and if <code>NextSubdivisionCode</code> from the previous response has a value, enter that value in <code>startsubdivisioncode</code> to return the next page of results.</p> <p>To list subdivisions (U.S. states), you must include both <code>startcountrycode</code> and <code>startsubdivisioncode</code>.</p>
        max_items: <p>(Optional) The maximum number of geolocations to be included in the response body for this request. If more than <code>maxitems</code> geolocations remain to be listed, then the value of the <code>IsTruncated</code> element in the response is <code>true</code>.</p>

    Raises:
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</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_geo_locations_request.ListGeoLocationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53.types.list_geo_locations_response.ListGeoLocationsResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.list_geo_locations

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListGeoLocations")
    )
    input_: capo_route_53.types.list_geo_locations_request.ListGeoLocationsRequest = {}
    if start_continent_code is not None:
        input_["start_continent_code"] = start_continent_code
    if start_country_code is not None:
        input_["start_country_code"] = start_country_code
    if start_subdivision_code is not None:
        input_["start_subdivision_code"] = start_subdivision_code
    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