Querying Database Specifications
Function
This API is used to query the database specifications of a specified DB engine version.
- Before calling an API, you need to understand the API in Authentication.
URI
- URI format
GET /v3/{project_id}/flavors/{database_name}?version_name={version_name}&spec_code={spec_code}&is_serverless={is_serverless}
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Explanation:
Project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
Constraints:
N/A
Value range:
N/A
Default value:
N/A
database_name
Yes
Explanation:
DB engine name.
Constraints:
N/A
Value range:
- MySQL
- PostgreSQL
- SQLServer
Default value:
N/A
version_name
No
Explanation:
Database version. For details about how to obtain the database version, see section Querying Version Information About a DB Engine. (The minor version is supported.)
Constraints:
N/A
Value range:
N/A
Default value:
N/A
is_serverless
No
Explanation:
Whether to query serverless specifications.
Constraints:
N/A
Value range:
- true: Serverless specifications are queried.
- false (default value): Non-serverless specifications are queried.
Default value:
N/A
spec_code
No
Explanation:
Specification code.
Constraints:
N/A
Value range:
N/A
Default value:
N/A
Request
Response
- Normal response
Table 2 Parameter description Name
Type
Description
flavors
Array of objects
Explanation:
Indicates the DB instance specifications information list.
For details, see Table 3.
Table 3 flavors field data structure description Name
Type
Description
vcpus
String
Explanation:
Indicates the CPU size. For example, the value 1 indicates 1 vCPU.
Value range:
N/A
ram
Integer
Explanation:
Indicates the memory size in GB.
Value range:
N/A
id
String
Explanation:
Indicates the specification ID, which is unique.
Value range:
N/A
spec_code
String
Explanation:
Indicates the resource specification code. Use rds.mysql.m1.xlarge.rr as an example.
For more information, see Instance Class.
- rds: indicates the RDS product.
- mysql: indicates the DB engine.
- m1.xlarge: indicates the high memory performance specifications.
- rr: indicates read replicas (.ha indicates primary/standby DB instances).
- rha.rr indicates HA read replicas. Example specification code: rds.mysql.n1.large.4.rha.rr.
- HA read replicas are available only for users with the open beta test (OBT) permission. You can contact customer service to apply for the permission.
- For details about HA read replicas, see Introducing HA Read Replicas.
Value range:
N/A
version_name
Array
Explanation:
Indicates the database version.
Example value for the MySQL DB engine: ["5.6","5.7","8.0"]
instance_mode
String
Explanation:
Indicates the instance type.
Value range:
- ha: indicates primary/standby instances.
- replica: indicates read replicas.
- single: indicates single DB instances.
az_status
Map<String, String>
Explanation:
Indicates the specification status in an AZ.
Value range:
- normal: indicates that the specifications in the AZ are available.
- unsupported: indicates that the specifications are not supported by the AZ.
- sellout: indicates that the specifications in the AZ are sold out.
az_desc
Map<String, String>
Explanation:
Indicates the description of the AZ to which the specifications belong.
Value range:
N/A
group_type
String
Explanation:
Indicates instance specifications.
Value range:
- 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:
- For the MySQL DB engine: dedicated
- For PostgreSQL and SQL Server DB engines: dedicated, which is only supported for cloud SSDs
- rapid:
- For the MySQL DB engine: dedicated (offline)
- For PostgreSQL and SQL Server DB engines: dedicated, which is only supported for extreme SSDs
- bigmem: large-memory
- highPerformancePrivilegeEdition: ultra-high I/O (advanced)
- Example normal response
{ "flavors": [{ "vcpus": "1", "ram": 2, "id":"2988b9cc-2aac-3a94-898c-14666702f129", "spec_code": "rds.mysql.c2.medium.rr", "version_name": ["5.6","5.7","8.0"], "instance_mode": "ha", "az_status": { "az1": "normal", "az2": "normal" }, "az_desc": { "az1": "az1", "az2": "az2" }, "group_type": "normal" }, { "vcpus": "1", "ram": 2, "id":"2988b9cc-2aac-3a94-898c-14666702f130", "spec_code": "rds.mysql.c2.medium.rr", "version_name": ["5.6","5.7","8.0"], "instance_mode": "replica", "az_status": { "az1": "normal", "az2": "normal" }, "az_desc": { "az1": "az1", "az2": "az2" }, "group_type": "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