Skip to content

describe_device async

describe_device(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    next_token: Optional[NextToken] = None,
    device_name: Optional[EntityName] = None,
    device_fleet_name: Optional[EntityName] = None,
) -> DescribeDeviceResponse

Describes the device.

Parameters:

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

    Next token of device description.

  • device_name (Optional[EntityName], default: None ) –

    The unique ID of the device.

  • device_fleet_name (Optional[EntityName], default: None ) –

    The name of the fleet the devices belong to.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def describe_device(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    device_name: Optional["capo_sagemaker.types.entity_name.EntityName"] = None,
    device_fleet_name: Optional[
        "capo_sagemaker.types.entity_name.EntityName"
    ] = None,
) -> "capo_sagemaker.types.describe_device_response.DescribeDeviceResponse":
    """<p>Describes the device.</p>

    Args:
        next_token: <p>Next token of device description.</p>
        device_name: <p>The unique ID of the device.</p>
        device_fleet_name: <p>The name of the fleet the devices belong to.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.describe_device_request.DescribeDeviceRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.describe_device_response.DescribeDeviceResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.describe_device

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.describe_device.async_describe_device(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDevice")
    )
    input_: capo_sagemaker.types.describe_device_request.DescribeDeviceRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if device_name is not None:
        input_["device_name"] = device_name
    if device_fleet_name is not None:
        input_["device_fleet_name"] = device_fleet_name

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