Forcibly Promoting a Secondary Node to Primary
API Description
This API is used to promote a secondary node of a replica set, shard node, or config node to primary.
Constraints
If the primary to secondary synchronization delay is long, this operation may fail.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies 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
dds:instance:switchover
write
instance
-
-
URI
- URI format
POST /v3/{project_id}/instances/{instance_id}/nodes/{node_id}/primary
- URI example
https://dds.ap-southeast-1.myhuaweicloud.com/v3/2900b7b8d03e4619b8db8d43bc6234ee/instances/b54ea2b393034728b8582e1c4b5b4c88in02/nodes/639371286e95457394914f734e1ed6feno02/primary
Table 1 Request Parameters Parameter
Mandatory
Type
Description
X-Auth-Token
Yes
String
User token obtained from IAM. For details, see Authentication.
project_id
Yes
String
Project ID of a tenant in a region.
instance_id
Yes
String
Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.
node_id
Yes
String
ID of the secondary node.
Status Code
For more information, see Status Code.
Error Code
For more information, see Error Code.
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