Querying the Storage Type of a Database
Function
This API is used to query the storage type of a specified DB engine version.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
URI
- URI format
GET /v3/{project_id}/storage-type/{database_name}?version_name={version_name}&ha_mode={ha_mode}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, 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
The value can be any of the following and is case-insensitive:
- MySQL
- PostgreSQL
- SQLServer
Default Value
N/A
version_name
Yes
Definition
DB engine version.
Constraints
N/A
Range
For details about how to obtain the DB engine version, see Querying Version Information About a DB Engine.
For the MySQL DB engine, the parameter indicates a major version, for example, 5.6, 5.7, or 8.0.
Default Value
N/A
ha_mode
No
Definition
Primary/standby mode.
Constraints
N/A
Range
- single
- ha
- replica
Default Value
N/A
Request
Response
- Normal response
Table 2 Parameters Parameter
Type
Description
storage_type
Array of objects
Definition
Instance specifications.
For details, see Table 3.
dsspool_info
Array of objects
Definition
DSS pool specifications.
For details, see Table 4.
NOTE:Only Dedicated Cloud (DeC) users are supported.
Table 3 storage_type field data structure description Parameter
Type
Description
name
String
Definition
Storage type.
Range
- ULTRAHIGH: ultra-high I/O storage.
- CLOUDSSD: cloud SSD storage. This storage type is supported only with general-purpose and dedicated instances.
- ESSD: extreme SSD storage.
az_status
Map<String, String>
Definition
Specification status in an AZ.
Range
- normal: indicates that the specifications in the AZ are available.
- unsupported: indicates that the specifications are not supported by the AZ.
- sellout: indicates that the specifications in the AZ are sold out.
support_compute_group_type
List<String>
Definition
Instance specifications.
Range
- normal: general-enhanced
- normal2: general-enhanced II
- armFlavors: Kunpeng general-enhanced
- dedicicateNormal: exclusive x86
- armLocalssd: standard Kunpeng
- normalLocalssd: standard x86
- general: general-purpose
- dedicated:
- For the MySQL DB engine: dedicated
- For PostgreSQL and SQL Server DB engines: dedicated, which is only supported for cloud SSDs
- rapid:
- For the MySQL DB engine: dedicated (offline)
- For PostgreSQL and SQL Server DB engines: dedicated, which is only supported for extreme SSDs
- bigmem: large-memory
Table 4 dsspool_info field data structure description Parameter
Type
Description
az_name
String
Definition
Name of the AZ where the DSS pool is located.
Range
N/A
free_capacity_gb
String
Definition
Available capacity of the DSS pool.
Range
N/A
dsspool_volume_type
String
Definition
Disk type of the DSS pool.
Range
N/A
dsspool_id
String
Definition
ID of the DSS pool.
Range
N/A
dsspool_status
String
Definition
DSS pool status.
Range
- available
- deploying
- enlarging
- frozen
- sellout
- Example normal response
{ "storage_type": [{ "name": "COMMON", "az_status": { "az1": "normal", "az2": "normal" }, "support_compute_group_type": [ "normal", "normal2", "armFlavors" ] }, { "name": "ULTRAHIGH", "az_status": { "az1": "normal", "az2": "normal" }, "support_compute_group_type": [ "normal", "normal2", "armFlavors" ] } ], "dsspool_info": [] }
DeC user query response example
{ "storage_type": [ { "name": "COMMON", "az_status": { "az1xahz": "normal", "az3xahz": "normal" }, "support_compute_group_type": [ "normal", "normal2" ] }, { "name": "ULTRAHIGH", "az_status": { "az1xahz": "normal", "az3xahz": "normal" }, "support_compute_group_type": [ "normal", "normal2" ] } ], "dsspool_info": [ { "az_name": "az1xahz", "free_capacity_gb": "8656", "dsspool_volume_type": "ULTRAHIGH", "dsspool_id": "f5f84ed7-6f19-4bd4-99d7-b450ad6cc4dd", "dsspool_status": "available" } ] }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error 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