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
15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 | |