Gets information about a deployment.
The content property of the appSpecContent object in the returned revision is always null. Use GetApplicationRevision and the sha256 property of the returned appSpecContent object to get the content of the deployment’s AppSpec file.
Parameters:
-
deployment_id
(DeploymentId)
–
The unique ID of a deployment associated with the user or Amazon Web Services account.
Raises:
Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
| async def get_deployment(
self,
deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
*,
config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> "capo_codedeploy.types.get_deployment_output.GetDeploymentOutput":
"""<p>Gets information about a deployment.</p> <note> <p> The <code>content</code> property of the <code>appSpecContent</code> object in the returned revision is always null. Use <code>GetApplicationRevision</code> and the <code>sha256</code> property of the returned <code>appSpecContent</code> object to get the content of the deployment’s AppSpec file. </p> </note>
Args:
deployment_id: <p> The unique ID of a deployment associated with the user or Amazon Web Services account. </p>
Raises:
capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_codedeploy.types.get_deployment_input.GetDeploymentInput]",
) -> AsyncOperationResponse[
"capo_codedeploy.types.get_deployment_output.GetDeploymentOutput"
]:
import capo_codedeploy._operations.code_deploy_20141006.get_deployment
(
output,
http_response,
) = await capo_codedeploy._operations.code_deploy_20141006.get_deployment.async_get_deployment(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDeployment")
)
input_: capo_codedeploy.types.get_deployment_input.GetDeploymentInput = {
"deployment_id": deployment_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|