Querying Available Instance Classes for a DB Instance
Function
This API is used to query available instance classes for a DB instance.
- Before calling an API, you need to understand the API in Authentication.
Constraints
This API is available to RDS for PostgreSQL only.
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
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
Instance ID.
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 |
List of available instance classes. For details, see Table 3.
|
Parameter |
Type |
Description |
---|---|---|
group_type |
String |
Instance class. Its value can be any of the following: normal: general-enhanced normal2: general-enhanced II armFlavors: Kunpeng general-enhanced dedicicateNormal (dedicatedNormalLocalssd): exclusive x86 armLocalssd: standard Kunpeng normalLocalssd: standard x86 general: general-purpose dedicated: dedicated for the PostgreSQL DB engine |
compute_flavors |
Object |
List of compute specifications. For details, see Table 4. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specification ID, which is unique. |
code |
String |
Resource specification code. Example: rds.pg.m1.xlarge.rr For more specifications, see Querying Database Specifications.
|
vcpus |
String |
Number of vCPUs. For example, the value 1 indicates one vCPU. |
ram |
String |
Memory size in GB. |
az_status |
Map<String,String> |
Status of the specification in the AZ. The value can be any of the following:
|
- 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