Gets a deployment. Deployments define the components that run on Greengrass core devices.
Parameters:
Raises:
-
AccessDeniedException
–
You don't have permission to perform the action.
-
InternalServerException
–
IoT Greengrass can't process your request right now. Try again later.
-
ResourceNotFoundException
–
The requested resource can't be found.
-
ThrottlingException
–
Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.
-
ValidationException
–
The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_greengrassv2/_services/greengrass_v2.py
| def get_deployment(
self,
deployment_id: "capo_greengrassv2.types.non_empty_string.NonEmptyString",
*,
config_overrides: Optional[GreengrassV2ClientConfig] = None,
) -> "capo_greengrassv2.types.get_deployment_response.GetDeploymentResponse":
"""<p>Gets a deployment. Deployments define the components that run on Greengrass core devices.</p>
Args:
deployment_id: <p>The ID of the deployment.</p>
Raises:
capo_greengrassv2.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
capo_greengrassv2.errors.internal_server_exception.InternalServerException: <p>IoT Greengrass can't process your request right now. Try again later.</p>
capo_greengrassv2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
capo_greengrassv2.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.</p>
capo_greengrassv2.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
capo_greengrassv2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_greengrassv2.types.get_deployment_request.GetDeploymentRequest]",
) -> OperationResponse[
"capo_greengrassv2.types.get_deployment_response.GetDeploymentResponse"
]:
import capo_greengrassv2._operations.greengrass_v2.get_deployment
output, http_response = (
capo_greengrassv2._operations.greengrass_v2.get_deployment.get_deployment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDeployment")
)
input_: capo_greengrassv2.types.get_deployment_request.GetDeploymentRequest = {
"deployment_id": deployment_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|