You can call this operation to delete a shard or mongos in a sharded cluster instance of ApsaraDB for MongoDB.
Before you call this operation, make sure that the following requirements are met:
- The instance is in the running state.
- The instance type is sharded cluster.
- The billing method of the instance is pay-as-you-go.
- The number of shards or mongos in the instance must be greater than two.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteNode |
The operation that you want to perform. Set the value to DeleteNode. |
DBInstanceId | String | Yes | dds-bpxxxxxxxx |
The ID of the instance. |
NodeId | String | Yes | s-bpxxxxxxxx |
The ID of the shard or mongos to be deleted. You can call the DescribeDBInstanceAttribute operation to query the ID. |
ClientToken | String | No | ETnLKlblzczshOTUbOCzxxxxxxxxxx |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. |
RegionId | String | No | cn-hangzhou |
The ID of the region where the instance is deployed. You can call the DescribeRegions operation to query the region ID. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
OrderId | String | 111111111111111 |
The ID of the order. |
RequestId | String | 9F9BDE64-BF30-41F3-BD29-C19CE4AB3404 |
The ID of the request. |
TaskId | Integer | 111111111 |
The ID of the task. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/? Action=DeleteNode
&NodeId=s-bpxxxxxxxx
&DBInstanceId=dds-bpxxxxxxxx
&<Common request parameters>
Sample success responses
XML
format
<TaskId>111111111</TaskId>
<RequestId>04BDBD93-3B59-496C-8B5E-7FF158E10C5C</RequestId>
<OrderId>111111111111111</OrderId>
JSON
format
{
"TaskId": 111111111,
"RequestId": "04BDBD93-3B59-496C-8B5E-7FF158E10C5C",
"OrderId": "111111111111111"
}
Error codes
For a list of error codes, visit the API Error Center.