Call the SwitchDBBlueGreen interface to switch the blue-green deployment.
Asynchronous request.
Name | Type | Required | Example | Description |
|---|---|---|---|---|
InstanceId | String | Yes | mysql-f83edc2e**** | The ID of the blue instance in the blue-green deployment. |
Endpoints | Object[] | No | Please refer to the request example. | Connection information of the instance |
OriginEndpointId | String | Yes | mysql-f83edc2e****-cluster | The connection terminal ID of the blue instance. |
TargetEndpointId | String | Yes | mysql-06c7db72****-cluster | The connection terminal ID of the green instance. |
SwitchType | String | No | MaintainTime | Execution time, values:
tip
|
SpecifiedSwitchStartTime | String | No | 2024-12-25T14:00:00Z | The start time of the time period when executed in a specified time period. The time format is tip It is only valid when the value of SwitchType is SpecifiedTime. |
SpecifiedSwitchEndTime | String | No | 2024-12-25T15:59:00Z | The end time of the time period when executed in a specified time period. The time format is tip The shortest duration of the specified time period is one hour and fifty-nine minutes. |
null
POST /?Action=SwitchDBBlueGreen&Version=2022-01-01 HTTP/1.1 Content-Type: application/json Host: rds-mysql.cn-beijing.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "mysql-f83edc2e****", "Endpoints": [ { "OriginEndpointId": "mysql-f83edc2e****-cluster", "TargetEndpointId": "mysql-06c7db72****-cluster" } ], "SwitchType": "Immediate" }
{ "ResponseMetadata": { "RequestId": "2025072419542973B0F32A7EF77611C384-1b83a0", "Action": "SwitchDBBlueGreen", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-guangzhou" }, "Result": {} }
For more details, refer to Error codes.