Batch Stopping DB Instances
Function
This API is used to batch stop pay-per-use DB instances.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the 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:stop | write | - | - | rds:instance:operateServer | - |
Constraints
- A maximum of 50 instances can be stopped at a time.
- This API is supported for RDS for MySQL only.
- Only ultra-high I/O, cloud SSD, and extreme SSD pay-per-use instances can be stopped. RDS instances in a DCC cannot be stopped.
- A stopped instance will not be moved to the recycle bin after being deleted.
- If you stop a primary instance, read replicas (if there are any) will also be stopped. You cannot stop a read replica without stopping the primary instance.
- If you do not manually start your DB instance within 15 days after it is stopped, the instance will automatically start during the next maintenance window.
- After a DB instance is stopped, the VM where the DB instance is located is no longer billed. Other resources, including EIPs, storage resources, and backups, are still billed.
- An instance cannot be stopped if it is in any of the following statuses:
Creating, rebooting, scaling up, changing instance class, restoring, and changing port.
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
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| instance_ids | Yes | List<String> | Definition Instance IDs. Constraints The value cannot be empty. Range You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances. Default Value N/A |
Example Request
POST https://{endpoint}/v3/054ea741f700d4a32f1bc00f5c80dd4c/instances/batch/action/shutdown
{
"instance_ids" : [
"5b409baece064984a1b3eef6addae50cin01"
]
} Response
- Normal response
Table 3 Parameters Parameter
Type
Description
records
List
Definition
Result records.
For details, see Table 4.
- Example normal response
{ "records": [ { "instance_id": "5b409baece064984a1b3eef6addae50cin01", "job_id": "2b414788a6004883a02390e2eb0ea227" } ] }
- 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