Returns information about a deployment target.
Parameters:
-
deployment_id
(DeploymentId)
–
The unique ID of a deployment.
-
target_id
(TargetId)
–
The unique ID of a deployment target.
Raises:
Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
| async def get_deployment_target(
self,
deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
target_id: "capo_codedeploy.types.target_id.TargetId",
*,
config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> "capo_codedeploy.types.get_deployment_target_output.GetDeploymentTargetOutput":
"""<p> Returns information about a deployment target. </p>
Args:
deployment_id: <p> The unique ID of a deployment. </p>
target_id: <p> The unique ID of a deployment target. </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.deployment_not_started_exception.DeploymentNotStartedException: <p>The specified deployment has not started.</p>
capo_codedeploy.errors.deployment_target_does_not_exist_exception.DeploymentTargetDoesNotExistException: <p> The provided target ID does not belong to the attempted deployment. </p>
capo_codedeploy.errors.deployment_target_id_required_exception.DeploymentTargetIdRequiredException: <p> A deployment target ID was not provided. </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.invalid_deployment_target_id_exception.InvalidDeploymentTargetIdException: <p> The target ID provided was not valid. </p>
capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name 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_target_input.GetDeploymentTargetInput]",
) -> AsyncOperationResponse[
"capo_codedeploy.types.get_deployment_target_output.GetDeploymentTargetOutput"
]:
import capo_codedeploy._operations.code_deploy_20141006.get_deployment_target
(
output,
http_response,
) = await capo_codedeploy._operations.code_deploy_20141006.get_deployment_target.async_get_deployment_target(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDeploymentTarget")
)
input_: capo_codedeploy.types.get_deployment_target_input.GetDeploymentTargetInput = {
"deployment_id": deployment_id,
"target_id": target_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|