Skip to content

get_device_registration

get_device_registration(
    *,
    config_overrides: Optional[SagemakerEdgeClientConfig] = None,
    device_name: Optional[DeviceName] = None,
    device_fleet_name: Optional[DeviceFleetName] = None,
) -> GetDeviceRegistrationResult

Use to check if a device is registered with SageMaker Edge Manager.

Parameters:

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

    The unique name of the device you want to get the registration status from.

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

    The name of the fleet that the device belongs to.

Raises:

  • InternalServiceException –

    An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker_edge/_services/sagemaker_edge.py
def get_device_registration(
    self,
    *,
    config_overrides: Optional[SagemakerEdgeClientConfig] = None,
    device_name: Optional[
        "capo_sagemaker_edge.types.device_name.DeviceName"
    ] = None,
    device_fleet_name: Optional[
        "capo_sagemaker_edge.types.device_fleet_name.DeviceFleetName"
    ] = None,
) -> "capo_sagemaker_edge.types.get_device_registration_result.GetDeviceRegistrationResult":
    """<p>Use to check if a device is registered with SageMaker Edge Manager.</p>

    Args:
        device_name: <p>The unique name of the device you want to get the registration status from.</p>
        device_fleet_name: <p>The name of the fleet that the device belongs to.</p>

    Raises:
        capo_sagemaker_edge.errors.internal_service_exception.InternalServiceException: <p>An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support.</p>
        capo_sagemaker_edge.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker_edge.types.get_device_registration_request.GetDeviceRegistrationRequest]",
    ) -> OperationResponse[
        "capo_sagemaker_edge.types.get_device_registration_result.GetDeviceRegistrationResult"
    ]:
        import capo_sagemaker_edge._operations.amazon_sage_maker_edge.get_device_registration

        output, http_response = (
            capo_sagemaker_edge._operations.amazon_sage_maker_edge.get_device_registration.get_device_registration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDeviceRegistration")
    )
    input_: capo_sagemaker_edge.types.get_device_registration_request.GetDeviceRegistrationRequest = {}
    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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output