Updated on 2024-09-04 GMT+08:00

Querying Database Specifications

Function

This API is used to query the database specifications of a specified DB engine version.

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

    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.

    Constraints:

    N/A

    Value range:

    MySQL (case-insensitive)

    Default value:

    N/A

    version_name

    No

    Explanation:

    DB engine version. You can enter a minor version number.

    Constraints:

    N/A

    Value range:

    N/A

    Default value:

    N/A

    is_flexus

    Yes

    Explanation:

    Whether to query FlexusRDS instance specifications.

    Constraints:

    N/A

    Value range:

    • true: Query FlexusRDS instance specifications.
    • false (default value): Query instance specifications other than FlexusRDS.

    Default value:

    false

    spec_code

    No

    Explanation:

    Specification code.

    Constraints:

    N/A

    Value range:

    • Single-node instance:

      rds.mysql.y1.medium.2

      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.2.ha

      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

    Explanation:

    Instance specifications. For details, see Table 3.

    Table 3 flavors field data structure description

    Parameter

    Type

    Description

    vcpus

    String

    Explanation:

    Number of vCPUs. For example, the value 1 indicates 1 vCPU.

    Value range:

    N/A

    ram

    Integer

    Explanation:

    Memory size in GB.

    Value range:

    N/A

    id

    String

    Explanation:

    Specification ID, which is unique.

    Value range:

    N/A

    spec_code

    String

    Explanation:

    Resource specification code, for example, rds.mysql.y1.xlarge.2.ha.

    Value range:

    • rds: indicates the RDS product.
    • mysql: indicates the DB engine.
    • y1.xlarge: indicates the performance specifications, which are lightweight specifications.
    • ha: indicates primary/standby instances.

    version_name

    Array

    Explanation:

    DB engine version.

    instance_mode

    String

    Explanation:

    Instance type.

    Value range:

    • ha: indicates primary/standby instances.
    • single: indicates single-node instances.

    az_status

    Map<String, String>

    Explanation:

    Specification status in an AZ.

    Value 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>

    Explanation:

    Description of the AZ to which the specification belongs.

    Value range:

    N/A

    group_type

    String

    Explanation:

    FlexusRDS performance specifications.

    Value 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