Querying Database Specifications
Function
This API is used to query the database specifications of a specified DB engine version. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/flavors/{database_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
database_name |
Yes |
String |
Explanation: DB engine name. Constraints: None Value range: gaussdb-mysql Default value: None |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
availability_zone_mode |
Yes |
String |
Explanation: AZ type. Constraints: None Value range:
Default value: single |
version_name |
No |
String |
Explanation: DB version number. Constraints: Currently, only MySQL 8.0 is supported. Value range: 8.0 Default value: 8.0 |
spec_code |
No |
String |
Explanation: Resource specification code. Example: gaussdb.mysql.xlarge.x86.4
For more information, see Instance Specifications. Constraints: None Value range: None Default value: None |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the token value. Constraints: None Value range: None Default value: None |
X-Language |
No |
String |
Explanation: Request language type. Constraints: None Value range:
Default value: en-us |
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
flavors |
Array of MysqlFlavorsInfo objects |
Explanation: Instance specifications. |
Parameter |
Type |
Description |
---|---|---|
vcpus |
String |
Explanation: Number of vCPUs. For example, the value 1 indicates 1 vCPU. Value range: None |
ram |
String |
Explanation: Memory size in GB. Value range: None |
type |
String |
Explanation: CPU architecture. Value range:
|
id |
String |
Explanation: Specification ID, which uniquely identifies a specification. Value range: None |
spec_code |
String |
Explanation: Resource specification code. Its value is same as the value of spec_code. Example: gaussdb.mysql.xlarge.x86.4
For more information, see Instance Specifications. Value range: None |
version_name |
String |
Explanation: DB version number. Value range: 8.0 |
instance_mode |
String |
Explanation: Instance type. Currently, only the cluster type is supported. Value range: Cluster |
az_status |
Map<String,String> |
Explanation: Status of the specification in the AZ. Value range:
|
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying specific specifications of a GaussDB(for MySQL) instance
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/flavors/gaussdb-mysql?version_name=8.0&spec_code=gaussdb.mysql.xlarge.x86.4&availability_zone_mode=single
Example Response
Status code: 202
Success.
{ "flavors" : [ { "vcpus" : "4", "ram" : "16", "type" : "x86", "id" : "3169caaf-6c2f-41d5-aadd-c8fc3d83597e", "spec_code" : "gaussdb.mysql.xlarge.x86.4", "instance_mode" : "Cluster", "version_name" : "8.0", "az_status" : { "az1" : "normal", "az2" : "normal" } } ] }
Status Code
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