Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Storage Management/ Querying the Disk Type of a DB Instance
Updated on 2024-08-20 GMT+08:00

Querying the Disk Type of a DB Instance

Function

This API is used to query the disk type of a DB instance. Before calling this API:

URI

GET https://{Endpoint}/v3/{project_id}/storage-type?version={version}&ha_mode={ha_mode}
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region.

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

Restrictions:

None

Value range:

The value can contain 32 characters. Only letters and digits are allowed.

Default value:

None

version

Yes

String

Explanation:

DB version number. To obtain the DB version number, see Querying DB Engine Versions.

Value range:

None

ha_mode

No

String

Explanation:

Instance mode.

The value is case-insensitive.

Value range:

  • enterprise (distributed)
  • centralization_standard (primary/standby)

Request Parameters

None

Response Parameters

Table 2 Response parameters

Parameter

Type

Description

storage_type

Array of objects

Explanation:

Storage type information.

For details, see Table 3.

Table 3 storage_type field data structure description

Parameter

Type

Description

name

String

Explanation: disk type name.

Value range:

  • ULTRAHIGH: indicates the SSD.
  • ESSD: indicates the extreme SSD.

az_status

map<String, String>

Explanation:

key indicates the AZ ID, and value indicates the specification status in the AZ.

Value range:

  • normal: on sale.
  • unsupported: not supported.
  • sellout: sold out.

support_compute_group_type

List<String>

Explanation:

Performance specifications.

Value range:

  • normal: dedicated (1:8)
  • normal2: dedicated (1:4)
  • armFlavors: Kunpeng dedicated (1:8)
  • armFlavors2: Kunpeng dedicated (1:4)
  • armFlavors2Shared: Kunpeng general computing-plus II (shared)
  • general: General-purpose (1:4)
  • exclusive: Dedicated (1:4) It is only suitable for primary/standby instances of the basic edition.
  • armExclusive: Kunpeng dedicated (1:4) It is only suitable for primary/standby instances of the basic edition.
  • economical: Favored (1:4)
  • economical2: Favored (1:8)

Example Request

  • Querying the disk type of a distributed instance
    GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/storage-type?version=2.1&ha_mode=enterprise
  • Querying the disk type of a primary/standby instance
    https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/storage-type?version=2.1&ha_mode=centralization_standard

Example Response

Disk types of the instances queried.

	
{
    "storage_type": [
        {
            "name": "ULTRAHIGH",
            "az_status": {
                "aaa": "normal",
                "bbb": "normal",
                "ccc": "normal"
            },
            "support_compute_group_type": [
                "normal",
                "armFlavors",
                "armFlavors2Shared",
                "normal2"
            ]
        },
        {
            "name": "ESSD",
            "az_status": {
                "az2xahz": "normal",
                "az1xahz": "normal",
                "az3xahz": "normal"
            },
            "support_compute_group_type": [
                "normal",
                "armFlavors",
                "armFlavors2Shared",
                "normal2"
            ]
        }
    ]
}

Status Code

Error Code

For details, see Error Codes.