Skip to content

get_deployments async

get_deployments(
    *,
    config_overrides: Optional[AsyncSagemakerEdgeClientConfig] = None,
    device_name: Optional[DeviceName] = None,
    device_fleet_name: Optional[DeviceFleetName] = None,
) -> GetDeploymentsResult

Use to get the active deployments from a device.

Parameters:

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

    The unique name of the device you want to get the configuration of active deployments 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/async_sagemaker_edge.py
async def get_deployments(
    self,
    *,
    config_overrides: Optional[AsyncSagemakerEdgeClientConfig] = 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_deployments_result.GetDeploymentsResult":
    """<p>Use to get the active deployments from a device.</p>

    Args:
        device_name: <p>The unique name of the device you want to get the configuration of active deployments 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker_edge.types.get_deployments_request.GetDeploymentsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker_edge.types.get_deployments_result.GetDeploymentsResult"
    ]:
        import capo_sagemaker_edge._operations.amazon_sage_maker_edge.get_deployments

        (
            output,
            http_response,
        ) = await capo_sagemaker_edge._operations.amazon_sage_maker_edge.get_deployments.async_get_deployments(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDeployments")
    )
    input_: capo_sagemaker_edge.types.get_deployments_request.GetDeploymentsRequest = {}
    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