doc-exports/docs/rds/api-ref/rds_06_0002.html
Wang , Deng Ke 5208dcae7b RDS API 20221104 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-10 09:55:48 +00:00

15 KiB

Querying Database Specifications

Function

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

URI

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    database_name

    Yes

    Specifies the DB engine name. Its value can be any of the following and is case-insensitive:

    • MySQL
    • PostgreSQL
    • SQLServer

    version_name

    No

    Specifies the database version. For details about how to obtain the database version, see section Querying Version Information About a DB Engine.

    spec_code

    No

    Specifies the specification code.

    NOTICE:

    Only DB instances running Microsoft SQL Server 2017 EE support the creation of read replicas. Microsoft SQL Server 2017 EE does not support the creation of single DB instances.

    The format of the specification code is: {spec code}{instance mode}.

    • spec code can be obtained from Table 1.
    • instance mode can be any of the following:
      • For single DB instances, the value is null. Example spe_code: rds.mysql.s1.xlarge
      • For primary/standby DB instances, the value is .ha. Example spe_code: rds.mysql.s1.xlarge.ha
      • For read replicas, the value is .rr. Example spe_code: rds.mysql.s1.xlarge.rr

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    flavors

    Array of objects

    Indicates the DB instance specifications information list.

    For details, see Table 3.

    Table 3 flavors field data structure description

    Name

    Type

    Description

    vcpus

    String

    Indicates the CPU size. For example, the value 1 indicates 1 vCPU.

    ram

    Integer

    Indicates the memory size in GB.

    spec_code

    String

    Indicates the resource specification code. Use rds.mysql.m1.xlarge.rr as an example.

    • rds: indicates the RDS product.
    • mysql: indicates the DB engine.
    • m1.xlarge: indicates the high memory performance specifications.
    • rr: indicates the read replica (.ha indicates primary/standby DB instances).

    instance_mode

    String

    Indicates the DB instance type. Its value can be any of the following:

    • ha: indicates primary/standby DB instances.
    • replica: indicates read replicas.
    • single: indicates single DB instances.

    az_status

    Map<String, String>

    Indicates the status of the AZ to which the DB instance specifications belong. Its value can be any of the following:

    • normal: indicates that the AZ is on sale.
    • unsupported: indicates that the DB instance specifications are not supported by the AZ.
    • sellout: indicates that the DB instance specifications are sold out.
  • Example normal response
    {
    	"flavors": [{
    		"vcpus": "1",
    		"ram": 2,
    		"spec_code": "rds.mysql.c2.medium.ha",
    		"instance_mode": "ha",
    		"az_status": {
    			"az1": "normal",
    			"az2": "normal"
    		}
    	}, {
    		"vcpus": "1",
    		"ram": 2,
    		"spec_code": "rds.mysql.c2.medium.rr",
    		"instance_mode": "replica",
    		"az_status": {
    			"az1": "normal",
    			"az2": "normal"
    		}
    	}]
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.