Skip to content

skip_wait_time_for_instance_termination async

skip_wait_time_for_instance_termination(
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
    deployment_id: Optional[DeploymentId] = None,
) -> None

In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.

Parameters:

  • deployment_id (Optional[DeploymentId], default: None ) –

    The unique ID of a blue/green deployment for which you want to skip the instance termination wait time.

Raises:

Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
async def skip_wait_time_for_instance_termination(
    self,
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
    deployment_id: Optional[
        "capo_codedeploy.types.deployment_id.DeploymentId"
    ] = None,
) -> None:
    """<p>In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.</p>

    Args:
        deployment_id: <p> The unique ID of a blue/green deployment for which you want to skip the instance termination wait time. </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_not_started_exception.DeploymentNotStartedException: <p>The specified deployment has not started.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codedeploy.types.skip_wait_time_for_instance_termination_input.SkipWaitTimeForInstanceTerminationInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_codedeploy._operations.code_deploy_20141006.skip_wait_time_for_instance_termination

        (
            output,
            http_response,
        ) = await capo_codedeploy._operations.code_deploy_20141006.skip_wait_time_for_instance_termination.async_skip_wait_time_for_instance_termination(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SkipWaitTimeForInstanceTermination")
    )
    input_: capo_codedeploy.types.skip_wait_time_for_instance_termination_input.SkipWaitTimeForInstanceTerminationInput = {}
    if deployment_id is not None:
        input_["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