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
15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 | |