Updated on 2022-02-22 GMT+08:00

Querying the Storage Type of a Database

Function

This API is used to query the storage type of a specified DB engine version.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/storage-type/{database_name}?version_name={version_name}&ha_mode={ha_mode}

  • Example
  • 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

    Yes

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

    ha_mode

    No

    Specifies the HA mode. The value options are as follows:

    • single
    • ha
    • replica

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    storage_type

    Array of objects

    Indicates the DB instance specifications information list.

    For details, see Table 3.

    Table 3 storage_type field data structure description

    Name

    Type

    Description

    name

    String

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

    • ULTRAHIGH: indicates the SSD type.

    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
    {
    	"storage_type": [{
    			"name": "COMMON",
    			"az_status": {
    				"az1": "normal",
    				"az2": "normal"
    			}
    		},
    		{
    			"name": "ULTRAHIGH",
    			"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.