Changing DB Instance Specifications
Function
This API is used to change DB instance specifications.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
Services will be interrupted for 5 to 10 minutes when you change DB instance specifications. Exercise caution when performing this operation.
Constraints
- The new DB instance specifications must be different from the original DB instance specifications.
- The instance class can be modified only for DB instances whose status is Available.
- The specifications of a DB instance can be changed only to the specifications of the same DB instance type. (For example, the specifications of a single DB instance cannot be changed to those of primary/standby DB instances.)
- The exclusive instance class of MySQL DB instances using local disks cannot be scaled down.
URI
- URI format
POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/action
- Example
https://rds.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/action
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Specifies the project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
instance_id
Yes
Specifies the DB instance ID.
Request
- Parameter description
Table 2 Parameter description Name
Mandatory
Type
Description
resize_flavor
Yes
Object
For details, see Table 3.
Table 3 resize_flavor field data structure description Name
Mandatory
Type
Description
spec_code
Yes
String
Specifies the resource specification code. Use rds.mysql.m1.xlarge as an example. rds indicates RDS, mysql indicates the DB engine, and m1.xlarge indicates the performance specification (large-memory). The parameter containing rr indicates the read replica specifications. The parameter not containing rr indicates the single or primary/standby DB instance specifications.
is_auto_pay
No
Boolean
Specifies whether the order will be automatically paid when the specifications of yearly/monthly DB instances are changed.
- true: indicates the order will be automatically paid.
- false: indicates the order will be manually paid. The default value is false.
- Request example
{ "resize_flavor": { "spec_code": "rds.mysql.m1.xlarge", "is_auto_pay": true } }PostgreSQL:
{ "resize_flavor": { "spec_code": "rds.pg.c2.medium.ha", "is_auto_pay": true } }Microsoft SQL Server:
{ "resize_flavor": { "spec_code": "rds.mssql.2014.se.s3.large.2", "is_auto_pay": true } }
Response
- Pay-per-use
- Normal response
Table 4 Parameter description Name
Type
Description
job_id
String
Indicates the task ID.
- Example normal response
{ "job_id": "2b414788a6004883a02390e2eb0ea227" } - Abnormal response
For details, see Abnormal Request Results.
- Normal response
- Yearly/Monthly
- Normal response
Table 5 Parameter description Name
Type
Description
order_id
String
Indicates the order ID.
- Example normal response
{ "order_id": "CS2009151216NO2U1" } - Abnormal response
For details, see Abnormal Request Results.
- Normal response
Status Code
For details, see Status Codes.
Error Code
For details, see Error Codes.
Last Article: Modifying a Private Domain Name
Next Article: Scaling Up Storage Space of a DB Instance
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.