Querying Available Instance Classes for a DB Instance
Function
This API is used to query available instance classes for a DB instance.
- 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:listFlavors |
read |
- |
- |
rds:instance:list |
- |
Constraints
This API is available to RDS for MySQL and RDS for PostgreSQL only.
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
Constraints
The value cannot be empty.
Range
To obtain the value, see Obtaining a Project ID.
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
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
Request
None
Example Request
Query available instance classes for a DB instance.
GET https://{Endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/d674b54d5e0241c49eeb50c82ef3efe0in03/flavors-resize
Response
|
Parameter |
Type |
Description |
|---|---|---|
|
flavor_groups |
Array of objects |
Definition List of available instance classes. For details, see Table 3. |
|
Parameter |
Type |
Description |
|---|---|---|
|
group_type |
String |
Definition Instance specifications. Range
|
|
compute_flavors |
Array of objects |
Definition List of compute specifications. For details, see Table 4. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition Specification ID, which is unique. Range N/A |
|
code |
String |
Definition Resource specification code. Example: rds.pg.m1.xlarge.rr For more specifications, see Querying Database Specifications.
Range N/A |
|
vcpus |
String |
Definition Number of vCPUs. For example, the value 1 indicates one vCPU. Range N/A |
|
ram |
String |
Definition Memory size in GB. Range N/A |
|
az_status |
Map<String,String> |
Definition Specification status in an AZ. Range
|
- Example normal response
{ "flavor_groups" : [ { "group_type" : "general", "compute_flavors" : [ { "id" : "400fd0df-0502-34f1-99be-ccf2a04241ae", "code" : "rds.pg.n1.medium.2", "vcpus" : "1", "ram" : "2", "az_status" : { "cn-southwest-244b" : "normal" } }, { "id" : "b7adc282-7efb-37d3-9e34-afb8279b5436", "code" : "rds.pg.n1.large.2", "vcpus" : "2", "ram" : "4", "az_status" : { "cn-southwest-244b" : "normal" } }, { "id" : "42a4a62c-5fa8-3cd8-9856-51ebcca6e2a8", "code" : "rds.pg.n1.large.4", "vcpus" : "2", "ram" : "8", "az_status" : { "cn-southwest-244b" : "normal" } }, { "id" : "9cbf4c9f-413b-3d07-bd4c-3b9432c0e662", "code" : "rds.pg.n1.xlarge.2", "vcpus" : "4", "ram" : "8", "az_status" : { "cn-southwest-244b" : "normal" } }, { "id" : "4937f920-ba42-37a8-a375-ab46ef030814", "code" : "rds.pg.n1.xlarge.4", "vcpus" : "4", "ram" : "16", "az_status" : { "cn-southwest-244b" : "normal" } }, { "id" : "32a8aa95-72cc-34c7-873b-827e23f3ccec", "code" : "rds.pg.n1.2xlarge.2", "vcpus" : "8", "ram" : "16", "az_status" : { "cn-southwest-244b" : "normal" } }, { "id" : "98c033ca-a0f2-34be-8b27-c5dda5e6bee1", "code" : "rds.pg.n1.2xlarge.4", "vcpus" : "8", "ram" : "32", "az_status" : { "cn-southwest-244b" : "normal" } } ] } ] } - 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