For a blue/green deployment, starts the process of rerouting traffic from instances in the original environment to instances in the replacement environment without waiting for a specified wait time to elapse. (Traffic rerouting, which is achieved by registering instances in the replacement environment with the load balancer, can start as soon as all instances have a status of Ready.)
Parameters:
-
deployment_id
(Optional[DeploymentId], default:
None
)
–
The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.
-
deployment_wait_type
(Optional[DeploymentWaitType], default:
None
)
–
The status of the deployment's waiting period. READY_WAIT indicates that the deployment is ready to start shifting traffic. TERMINATION_WAIT indicates that the traffic is shifted, but the original target is not terminated.
Raises:
Source code in docs_src/capo_codedeploy/_services/code_deploy.py
| def continue_deployment(
self,
*,
config_overrides: Optional[CodeDeployClientConfig] = None,
deployment_id: Optional[
"capo_codedeploy.types.deployment_id.DeploymentId"
] = None,
deployment_wait_type: Optional[
"capo_codedeploy.types.deployment_wait_type.DeploymentWaitType"
] = None,
) -> None:
"""<p>For a blue/green deployment, starts the process of rerouting traffic from instances in the original environment to instances in the replacement environment without waiting for a specified wait time to elapse. (Traffic rerouting, which is achieved by registering instances in the replacement environment with the load balancer, can start as soon as all instances have a status of Ready.) </p>
Args:
deployment_id: <p> The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment. </p>
deployment_wait_type: <p> The status of the deployment's waiting period. <code>READY_WAIT</code> indicates that the deployment is ready to start shifting traffic. <code>TERMINATION_WAIT</code> indicates that the traffic is shifted, but the original target is not terminated. </p>
Raises:
capo_codedeploy.errors.deployment_already_completed_exception.DeploymentAlreadyCompletedException: <p>The deployment is already complete.</p>
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_is_not_in_ready_state_exception.DeploymentIsNotInReadyStateException: <p>The deployment does not have a status of Ready and can't continue yet.</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_status_exception.InvalidDeploymentStatusException: <p>The specified deployment status doesn't exist or cannot be determined.</p>
capo_codedeploy.errors.invalid_deployment_wait_type_exception.InvalidDeploymentWaitTypeException: <p> The wait type is invalid. </p>
capo_codedeploy.errors.unsupported_action_for_deployment_type_exception.UnsupportedActionForDeploymentTypeException: <p>A call was submitted that is not supported for the specified deployment type.</p>
capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codedeploy.types.continue_deployment_input.ContinueDeploymentInput]",
) -> OperationResponse[None]:
import capo_codedeploy._operations.code_deploy_20141006.continue_deployment
output, http_response = (
capo_codedeploy._operations.code_deploy_20141006.continue_deployment.continue_deployment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ContinueDeployment")
)
input_: capo_codedeploy.types.continue_deployment_input.ContinueDeploymentInput = {}
if deployment_id is not None:
input_["deployment_id"] = deployment_id
if deployment_wait_type is not None:
input_["deployment_wait_type"] = deployment_wait_type
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|