Skip to content

list_pickup_locations async

list_pickup_locations(
    *,
    config_overrides: Optional[AsyncSnowballClientConfig] = None,
    max_results: Optional[ListLimit] = None,
    next_token: Optional[String] = None,
) -> ListPickupLocationsResult

A list of locations from which the customer can choose to pickup a device.

Parameters:

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

    The maximum number of locations to list per page.

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

    HTTP requests are stateless. To identify what object comes "next" in the list of ListPickupLocationsRequest objects, you have the option of specifying NextToken as the starting point for your returned list.

Raises:

  • InvalidResourceException –

    The specified resource can't be found. Check the information you provided in your last request, and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To get a list of locations from which the customer can choose to pickup a device. Returns a specified number of Address objects. Each Address is a pickup location address for Snow Family devices.

>>> await client.list_pickup_locations()
Source code in docs_src/capo_snowball/_services/async_snowball.py
async def list_pickup_locations(
    self,
    *,
    config_overrides: Optional[AsyncSnowballClientConfig] = None,
    max_results: Optional["capo_snowball.types.list_limit.ListLimit"] = None,
    next_token: Optional["capo_snowball.types.string.String"] = None,
) -> "capo_snowball.types.list_pickup_locations_result.ListPickupLocationsResult":
    """<p>A list of locations from which the customer can choose to pickup a device.</p>

    Args:
        max_results: <p>The maximum number of locations to list per page.</p>
        next_token: <p>HTTP requests are stateless. To identify what object comes "next" in the list of <code>ListPickupLocationsRequest</code> objects, you have the option of specifying <code>NextToken</code> as the starting point for your returned list.</p>

    Raises:
        capo_snowball.errors.invalid_resource_exception.InvalidResourceException: <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
        capo_snowball.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get a list of locations from which the customer can choose to pickup a device.
        Returns a specified number of Address objects. Each Address is a pickup location address for Snow Family devices.

        >>> await client.list_pickup_locations()
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_snowball.types.list_pickup_locations_request.ListPickupLocationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_snowball.types.list_pickup_locations_result.ListPickupLocationsResult"
    ]:
        import capo_snowball._operations.awsie_snowball_job_management_service.list_pickup_locations

        (
            output,
            http_response,
        ) = await capo_snowball._operations.awsie_snowball_job_management_service.list_pickup_locations.async_list_pickup_locations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPickupLocations")
    )
    input_: capo_snowball.types.list_pickup_locations_request.ListPickupLocationsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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