Skip to content

list_sites async

list_sites(
    *,
    config_overrides: Optional[AsyncOutpostsClientConfig] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[MaxResults1000] = None,
    operating_address_country_code_filter: Optional[CountryCodeList] = None,
    operating_address_state_or_region_filter: Optional[StateOrRegionList] = None,
    operating_address_city_filter: Optional[CityList] = None,
) -> ListSitesOutput

Lists the Outpost sites for your Amazon Web Services account. Use filters to return specific results.

Use filters to return specific results. If you specify multiple filters, the results include only the resources that match all of the specified filters. For a filter where you can specify multiple values, the results include items that match any of the values that you specify for the filter.

Parameters:

  • operating_address_country_code_filter (Optional[CountryCodeList], default: None ) –

    Filters the results by country code.

  • operating_address_state_or_region_filter (Optional[StateOrRegionList], default: None ) –

    Filters the results by state or region.

  • operating_address_city_filter (Optional[CityList], default: None ) –

    Filters the results by city.

Raises:

Source code in docs_src/capo_outposts/_services/async_outposts.py
async def list_sites(
    self,
    *,
    config_overrides: Optional[AsyncOutpostsClientConfig] = None,
    next_token: Optional["capo_outposts.types.token.Token"] = None,
    max_results: Optional[
        "capo_outposts.types.max_results1000.MaxResults1000"
    ] = None,
    operating_address_country_code_filter: Optional[
        "capo_outposts.types.country_code_list.CountryCodeList"
    ] = None,
    operating_address_state_or_region_filter: Optional[
        "capo_outposts.types.state_or_region_list.StateOrRegionList"
    ] = None,
    operating_address_city_filter: Optional[
        "capo_outposts.types.city_list.CityList"
    ] = None,
) -> "capo_outposts.types.list_sites_output.ListSitesOutput":
    """<p>Lists the Outpost sites for your Amazon Web Services account. Use filters to return specific results.</p> <p>Use filters to return specific results. If you specify multiple filters, the results include only the resources that match all of the specified filters. For a filter where you can specify multiple values, the results include items that match any of the values that you specify for the filter.</p>

    Args:
        operating_address_country_code_filter: <p>Filters the results by country code.</p>
        operating_address_state_or_region_filter: <p>Filters the results by state or region.</p>
        operating_address_city_filter: <p>Filters the results by city.</p>

    Raises:
        capo_outposts.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this operation.</p>
        capo_outposts.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_outposts.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
        capo_outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_outposts.types.list_sites_input.ListSitesInput]",
    ) -> AsyncOperationResponse[
        "capo_outposts.types.list_sites_output.ListSitesOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.list_sites

        (
            output,
            http_response,
        ) = await capo_outposts._operations.outposts_olaf_service.list_sites.async_list_sites(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListSites")
    )
    input_: capo_outposts.types.list_sites_input.ListSitesInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if operating_address_country_code_filter is not None:
        input_["operating_address_country_code_filter"] = (
            operating_address_country_code_filter
        )
    if operating_address_state_or_region_filter is not None:
        input_["operating_address_state_or_region_filter"] = (
            operating_address_state_or_region_filter
        )
    if operating_address_city_filter is not None:
        input_["operating_address_city_filter"] = operating_address_city_filter

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