Querying Database Specifications
Function
This API is used to query the database specifications of a specified DB engine version.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- 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
-
-
-
-
URI
- URI format
GET /v3/{project_id}/flavors/{database_name}?version_name={version_name}&spec_code={spec_code}&is_flexus={is_flexus}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
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
Range
N/A
Default Value
N/A
database_name
Yes
Definition
DB engine.
Constraints
N/A
Range
MySQL (case-insensitive)
Default Value
N/A
version_name
No
Definition
DB engine version. You can enter a minor version number.
Constraints
N/A
Range
N/A
Default Value
N/A
is_flexus
Yes
Definition
Whether to query FlexusRDS instance specifications.
Constraints
N/A
Range
- true: Query FlexusRDS instance specifications.
- false (default value): Query instance specifications other than FlexusRDS.
Default Value
false
spec_code
No
Definition
Specification code.
Constraints
N/A
Range
- Single-node instance:
rds.mysql.y1.large.2
rds.mysql.y1.large.4
rds.mysql.y1.xlarge.2
rds.mysql.y1.xlarge.4
- Primary/standby instance:
rds.mysql.y1.large.4.ha
rds.mysql.y1.xlarge.2.ha
rds.mysql.y1.xlarge.4.ha
Default Value
N/A
Request Parameters
None
Example Request
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/flavors/mysql?version_name=5.7&spec_code=rds.mysql.y1.xlarge.2
Response
- Normal response
Table 2 Parameters Parameter
Type
Description
flavors
Array of objects
Definition
Instance specifications. For details, see Table 3.
Table 3 flavors field data structure description Parameter
Type
Description
vcpus
String
Definition
Number of vCPUs. For example, the value 1 indicates 1 vCPU.
Range
N/A
ram
Integer
Definition
Memory size in GB.
Range
N/A
id
String
Definition
Specification ID, which is unique.
Range
N/A
spec_code
String
Definition
Resource specification code, for example, rds.mysql.y1.xlarge.2.ha.
Range
- rds: RDS product
- mysql: DB engine
- y1.xlarge: performance specifications, which are lightweight specifications
- ha: primary/standby instances
version_name
Array
Definition
DB engine version.
instance_mode
String
Definition
Instance type.
Range
- ha: indicates primary/standby instances.
- single: indicates single-node instances.
az_status
Map<String, String>
Definition
Specification status in an AZ.
Range
- normal: indicates that the specification is available in the AZ.
- unsupported: indicates that the specification is not supported by the AZ.
- sellout: indicates that the specification is sold out in the AZ.
az_desc
Map<String, String>
Definition
Description of the AZ to which the specification belongs.
Range
N/A
group_type
String
Definition
FlexusRDS performance specifications.
Range
yunyao: lightweight Flexus
- Example normal response
{ "flavors": [{ "vcpus": "1", "ram": 2, "id":"2988b9cc-2aac-3a94-898c-14666702f129", "spec_code": "rds.mysql.y1.xlarge.2.ha", "version_name": ["5.7","8.0"], "instance_mode": "ha", "az_status": { "az1": "normal", "az2": "normal" }, "az_desc": { "az1": "az1", "az2": "az2" }, "group_type": "yunyao" } ] }
Status Code
- Normal
- Abnormal
For details, see Status 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