Skip to content

list_devices async

list_devices(
    *,
    config_overrides: Optional[AsyncSnowDeviceManagementClientConfig] = None,
    job_id: Optional[JobId] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListDevicesOutput

Returns a list of all devices on your Amazon Web Services account that have Amazon Web Services Snow Device Management enabled in the Amazon Web Services Region where the command is run.

Parameters:

  • job_id (Optional[JobId], default: None ) –

    The ID of the job used to order the device.

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

    The maximum number of devices to list per page.

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

    A pagination token to continue to the next page of results.

Raises:

Source code in docs_src/capo_snow_device_management/_services/async_snow_device_management.py
async def list_devices(
    self,
    *,
    config_overrides: Optional[AsyncSnowDeviceManagementClientConfig] = None,
    job_id: Optional["capo_snow_device_management.types.job_id.JobId"] = None,
    max_results: Optional[
        "capo_snow_device_management.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_snow_device_management.types.next_token.NextToken"
    ] = None,
) -> "capo_snow_device_management.types.list_devices_output.ListDevicesOutput":
    """<p>Returns a list of all devices on your Amazon Web Services account that have Amazon Web Services Snow Device Management enabled in the Amazon Web Services Region where the command is run.</p>

    Args:
        job_id: <p>The ID of the job used to order the device.</p>
        max_results: <p>The maximum number of devices to list per page.</p>
        next_token: <p>A pagination token to continue to the next page of results.</p>

    Raises:
        capo_snow_device_management.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_snow_device_management.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing the request.</p>
        capo_snow_device_management.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_snow_device_management.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_snow_device_management.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_snow_device_management.types.list_devices_input.ListDevicesInput]",
    ) -> AsyncOperationResponse[
        "capo_snow_device_management.types.list_devices_output.ListDevicesOutput"
    ]:
        import capo_snow_device_management._operations.snow_device_management.list_devices

        (
            output,
            http_response,
        ) = await capo_snow_device_management._operations.snow_device_management.list_devices.async_list_devices(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDevices")
    )
    input_: capo_snow_device_management.types.list_devices_input.ListDevicesInput = {}
    if job_id is not None:
        input_["job_id"] = job_id
    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