switchover_blue_green_deployment
¶
switchover_blue_green_deployment(
*,
config_overrides: Optional[RDSClientConfig] = None,
blue_green_deployment_identifier: Optional[BlueGreenDeploymentIdentifier] = None,
switchover_timeout: Optional[SwitchoverTimeout] = None,
) -> SwitchoverBlueGreenDeploymentResponse
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.
Parameters:
-
blue_green_deployment_identifier(Optional[BlueGreenDeploymentIdentifier], default:None) –The resource ID of the blue/green deployment.
Constraints:
-
Must match an existing blue/green deployment resource ID.
-
-
switchover_timeout(Optional[SwitchoverTimeout], default:None) –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.
Raises:
-
BlueGreenDeploymentNotFoundFault–BlueGreenDeploymentIdentifierdoesn't refer to an existing blue/green deployment. -
InvalidBlueGreenDeploymentStateFault–The blue/green deployment can't be switched over or deleted because there is an invalid configuration in the green environment.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To switch a blue/green deployment for an RDS DB instance The following example promotes the specified green environment as the new production environment.
>>> client.switchover_blue_green_deployment(blue_green_deployment_identifier='bgd-wi89nwzglccsfake', switchover_timeout=300)
To promote a blue/green deployment for an Aurora MySQL DB cluster
The following example promotes the specified green environment as the new production environment.
>>> client.switchover_blue_green_deployment(blue_green_deployment_identifier='bgd-wi89nwzglccsfake', switchover_timeout=300)
Source code in docs_src/capo_rds/_services/rds.py
16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 | |