Deleting Shards
Function
This API is used to delete shards. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
Constraints
- There must be at least one shard in a DB instance.
- The DB instance is in the Available status.
- The DB instance is in the distributed independent deployment.
- Read/write permissions cannot be changed when the instance is in any of the following statuses: creating, changing instance class, frozen, or abnormal.
Debugging
You can debug this API in API Explorer.
URI
DELETE /v3/{project_id}/instances/{instance_id}/sharding
| Parameter | Mandatory | Type | Description | 
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain the value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are allowed. Default Value N/A | 
| instance_id | Yes | String | Definition Instance ID, which uniquely identifies an instance. Constraints N/A Range The value can contain 36 characters. Only letters and digits are allowed. Default Value N/A | 
Request Parameters
| Parameter | Mandatory | Type | Description | 
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. You can obtain the token by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the token value. Constraints N/A Range N/A Default Value N/A | 
| X-Language | No | String | Definition Language. Constraints N/A Range 
 Default Value en-us | 
| Parameter | Mandatory | Type | Description | 
|---|---|---|---|
| contraction_num | Yes | Integer | Definition Number of shards to be deleted. Constraints The number of shards to be deleted must be greater than 0, and there must be at least one shard in a DB instance. Range N/A Default Value N/A | 
Response Parameters
| Parameter | Type | Description | 
|---|---|---|
| job_id | String | Definition Job ID. This parameter is returned only when your instance is billed at a pay-per-use basis. Range N/A | 
| order_id | String | Definition Order ID. This parameter is returned only when your instance is billed at a yearly/monthly basis. Range N/A | 
Example Request
DELETE https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/sharding
{
    "contraction_num": 1
}
  Example Response
- Shard of a pay-per-use DB instance deleted.
    { "job_id": "2b414788a6004883a02390e2eb0ea227" }
- Shard of a yearly/monthly DB instance deleted.
    { "order_id": "CS2309261009R2TI7" }
Status Code
- Normal
- Abnormal
    For details, see Status Codes. 
Error Codes
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 
    