gaussdb-mysql/api-ref/source/apis_unavailable_soon/querying_database_specifications.rst
proposalbot fe5dbb94c5 Changes to gaussdb_mysql_api-ref from docs/doc-exports#546 (gaussdb API 20221230
Reviewed-by: Drobnak, David <david.drobnak@t-systems.com>
Co-authored-by: proposalbot <proposalbot@otc-service.com>
Co-committed-by: proposalbot <proposalbot@otc-service.com>
2023-06-12 09:45:17 +00:00

12 KiB

original_name

gaussdb_11_0002.html

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 <gaussdb_03_0001> it.
  • Obtain the required region and endpoint <gaussdb_00_0003>.

URI

  • URI format

    GET https://{endpoint}/mysql/v3/{project_id}/flavors/{database_name}?version_name={version_name}&spec_code={spec_code}&availability_zone_mode={availability_zone_mode}

  • Example

    GET https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/0483b6b16e954cb88930a360d2c4e663/flavors/gaussdb-mysql

  • Parameter description

    Table 1 Parameter description
    Name Mandatory Type Description
    project_id Yes String

    Project ID of a tenant in a region.

    To obtain this value, see Obtaining a Project ID <gaussdb_10_0004>.

    database_name Yes String

    DB engine. Its value is case-insensitive and can be:

    gaussdb-mysql

    version_name No String

    DB version number. To obtain this value, see Querying Version Information About a DB Engine <gaussdb_11_0001>.

    Currently, only MySQL 8.0 is supported.

    availability_zone_mode Yes String AZ mode. Its value can be single or multi and is case-insensitive.
    spec_code No String Specification code.

Request Parameters

Table 2 Request header parameters
Parameter Mandatory Type Description
X-Auth-Token Yes String User token.
X-Language No String Language.
Content-Type Yes String MIME type of the request body. You are advised to use the default value application/json. For APIs used to upload objects or images, the value can vary depending on the flow type.

Response Parameters

Status code: 202

Table 3 Response body parameter
Parameter Type Description
flavors Array of MysqlFlavorsInfo <gaussdb_11_0002__en-us_topic_0000001181244182_response_mysqlflavorsinfo> objects Instance specifications.
Table 4 MysqlFlavorsInfo
Parameter Type Description
vcpus String Number of vCPUs. For example, the value 1 indicates 1 vCPU.
ram String Memory size in GB.
type String Specification type. The value can be arm.
id String Specification ID. The value must be unique.
spec_code String

Resource specification code. Its value is same as the value of flavor_ref.

For example, gaussdb.mysql.4xlarge.arm.8

version_name String DB version number.
instance_mode String DB instance type. Its value is Cluster.
az_status Map<String,String>

Status of the AZ where the specification belongs. Its value can be any of the following:

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

Status code: 400

Table 5 Response body parameters
Parameter Type Description
error_code String Error code.
error_msg String Error message.

Status code: 500

Table 6 Response body parameters
Parameter Type Description
error_code String Error code.
error_msg String Error message.

Example Request

GET https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/0483b6b16e954cb88930a360d2c4e663/flavors/gaussdb-mysql

Example Response

Status code: 202

Success.

{
  "flavors" : [ {
    "vcpus" : "16",
    "ram" : "128",
    "type" : "arm",
    "id" : "3169caaf-6c2f-41d5-aadd-c8fc3d83597e",
    "spec_code" : "gaussdb.mysql.4xlarge.arm.8",
    "instance_mode" : "Cluster",
    "version_name" : "8.0",
    "az_status" : {
      "az1" : "normal"
    }
  } ]
}

Status Code

For details, see Status Codes <gaussdb_10_0002>.

Error Code

For details, see Error Codes <gaussdb_10_0003>.