Stopping an Instance
Function
This API is used to stop a pay-per-use DB instance.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
- 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.
- 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
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
instance_id
Yes
Instance ID.
Request
None
Example Request
Stop an instance.
{} Response
- Normal response
Table 2 Parameters Parameter
Type
Description
job_id
String
Task ID.
- Example normal response
{ "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.