Skip to content

list_device_resources

list_device_resources(
    managed_device_id: ManagedDeviceId,
    *,
    config_overrides: Optional[SnowDeviceManagementClientConfig] = None,
    type: Optional[str] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListDeviceResourcesOutput

Returns a list of the Amazon Web Services resources available for a device. Currently, Amazon EC2 instances are the only supported resource type.

Parameters:

  • managed_device_id (ManagedDeviceId) –

    The ID of the managed device that you are listing the resources of.

  • type (Optional[str], default: None ) –

    A structure used to filter the results by type of resource.

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

    The maximum number of resources 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/snow_device_management.py
def list_device_resources(
    self,
    managed_device_id: "capo_snow_device_management.types.managed_device_id.ManagedDeviceId",
    *,
    config_overrides: Optional[SnowDeviceManagementClientConfig] = None,
    type: Optional[str] = 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_device_resources_output.ListDeviceResourcesOutput":
    """<p>Returns a list of the Amazon Web Services resources available for a device. Currently, Amazon EC2 instances are the only supported resource type.</p>

    Args:
        managed_device_id: <p>The ID of the managed device that you are listing the resources of.</p>
        type: <p>A structure used to filter the results by type of resource.</p>
        max_results: <p>The maximum number of resources 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.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that doesn't exist.</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.
    """

    def _handler(
        req: "OperationRequest[capo_snow_device_management.types.list_device_resources_input.ListDeviceResourcesInput]",
    ) -> OperationResponse[
        "capo_snow_device_management.types.list_device_resources_output.ListDeviceResourcesOutput"
    ]:
        import capo_snow_device_management._operations.snow_device_management.list_device_resources

        output, http_response = (
            capo_snow_device_management._operations.snow_device_management.list_device_resources.list_device_resources(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDeviceResources")
    )
    input_: capo_snow_device_management.types.list_device_resources_input.ListDeviceResourcesInput = {
        "managed_device_id": managed_device_id
    }
    if type is not None:
        input_["type"] = type
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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