switchover_blue_green_deployment
async
¶
switchover_blue_green_deployment(
*,
config_overrides: Optional[AsyncRDSClientConfig] = 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.
>>> await 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.
>>> await client.switchover_blue_green_deployment(blue_green_deployment_identifier='bgd-wi89nwzglccsfake', switchover_timeout=300)
Source code in docs_src/capo_rds/_services/async_rds.py
16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 | |