switchoverBlueGreenDeployment method
Switches over a blue/green deployment.
Before you switch over, production traffic is routed to the databases in the blue environment. After you switch over, production traffic is routed to the databases in the green environment.
For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.
May throw BlueGreenDeploymentNotFoundFault.
May throw InvalidBlueGreenDeploymentStateFault.
Parameter blueGreenDeploymentIdentifier :
The resource ID of the blue/green deployment.
Constraints:
- Must match an existing blue/green deployment resource ID.
Parameter switchoverTimeout :
The amount of time, in seconds, for the switchover to complete.
Default: 300
If the switchover takes longer than the specified duration, then any changes are rolled back, and no changes are made to the environments.
Implementation
Future<SwitchoverBlueGreenDeploymentResponse> switchoverBlueGreenDeployment({
required String blueGreenDeploymentIdentifier,
int? switchoverTimeout,
}) async {
_s.validateNumRange(
'switchoverTimeout',
switchoverTimeout,
30,
1152921504606846976,
);
final $request = <String, String>{
'BlueGreenDeploymentIdentifier': blueGreenDeploymentIdentifier,
if (switchoverTimeout != null)
'SwitchoverTimeout': switchoverTimeout.toString(),
};
final $result = await _protocol.send(
$request,
action: 'SwitchoverBlueGreenDeployment',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'SwitchoverBlueGreenDeploymentResult',
);
return SwitchoverBlueGreenDeploymentResponse.fromXml($result);
}