Replacing a Read Replica with a Standby Node (RDS for SQL Server)
Function
This API is used to replace a read replica with a standby node.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
rds:instance:update |
write |
instance |
- g:EnterpriseProjectId - g:ResourceTag/<tag-key> |
rds:instance:modify |
- |
Constraints
- If a read replica is faulty, the floating IP address of the read replica is temporarily assigned to the standby node to provide services. After the read replica recovers, you can choose to switch the IP address back to the read replica.
- Only the floating IP address of the read replica is assigned to the standby node. Due to the differences in the specifications, parameter settings, and replication latency between the standby node and the read replica, performance differences and data transition may occur. Operations such as switching between primary and standby nodes, changing specifications, and changing ports are not allowed. During the node replacement or switchback, workloads are briefly interrupted. This function is available only for RDS for SQL Server instances.
- To use this function, submit a service ticket to request required permissions.
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Read replica ID.
Constraints
N/A
Range
N/A
Default Value
N/A
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instance_id |
Yes |
String |
Definition Read replica ID. Constraints N/A Range You can obtain the read replica ID from Table 4. Default Value N/A |
|
node_id |
Yes |
String |
Definition Node ID of the read replica. Constraints N/A Range You can obtain the node ID of the read replica from Table 9. Default Value N/A |
|
replace_action |
Yes |
String |
Definition Replacement action. Constraints N/A Range
Default Value N/A |
Example Request
- Replace a read replica with a standby node.
POST https://{Endpoint}/v3/5a7a69c429aa41b8a565c9a4995afea0/instances/02a202cf9fdd4561b80036337c9732f8in04/replace-node { "instance_id" : "02a202cf9fdd4561b80036337c9732f8in04", "node_id" : "bfafde30219f4ac5a820c7748e4dc106no04", "replace_action" : "REPLACE" } - Switch back to the read replica.
{ "instance_id" : "02a202cf9fdd4561b80036337c9732f8in04", "node_id" : "bfafde30219f4ac5a820c7748e4dc106no04", "replace_action" : "REPLACE_ROLLBACK" }
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
job_id
String
Definition
Task flow ID.
Range
N/A
- Example normal response
{ "job_id": "5a7a69c429aa41b8a565c9a4995afea0" } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot