continueDeployment method

Future<void> continueDeployment({
  1. String? deploymentId,
  2. DeploymentWaitType? deploymentWaitType,
})

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.)

May throw DeploymentIdRequiredException. May throw DeploymentDoesNotExistException. May throw DeploymentAlreadyCompletedException. May throw InvalidDeploymentIdException. May throw DeploymentIsNotInReadyStateException. May throw UnsupportedActionForDeploymentTypeException. May throw InvalidDeploymentWaitTypeException. May throw InvalidDeploymentStatusException.

Parameter deploymentId : The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.

Parameter deploymentWaitType : 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.

Implementation

Future<void> continueDeployment({
  String? deploymentId,
  DeploymentWaitType? deploymentWaitType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeDeploy_20141006.ContinueDeployment'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (deploymentId != null) 'deploymentId': deploymentId,
      if (deploymentWaitType != null)
        'deploymentWaitType': deploymentWaitType.toValue(),
    },
  );
}