1
0
forked from docs/doc-exports
doc-exports/docs/opengauss/api-ref/opengauss_newapi_0007.html
Ru, Li Yi d97aea4dd2 opengauss_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-06 09:04:21 +00:00

23 KiB

Querying Instance Specifications

Function

This API is used to query instance specifications. Before calling this API:

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/flavors?limit={limit}&offset={offset}&ha_mode={ha_mode}&version={version}&spec_code={spec_code}

  • Example

    https://gaussdb.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/flavors?offset=0&limit=10&ha_mode=centralization_standard&version=2.3&spec_code=gaussdb.opengauss.ee.dn.m4.2xlarge.8.in

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

    version

    No

    String

    DB version number. You can query the specifications supported by a specified DB version, for example, 1.4.

    spec_code

    No

    String

    Specification code.

    ha_mode

    No

    String

    Instance type. You can query the specifications supported by a specified instance type.

    Primary/standby: centralization_standard

    Distributed: enterprise

    limit

    No

    Integer

    Number of records to be queried. The default value is 100. The value cannot be a negative number. The minimum value is 1 and the maximum value is 100. For example, if this parameter is set to 10, a maximum of 10 records can be displayed.

    offset

    No

    Integer

    Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The default value is 0, indicating that the query starts from the first piece of data. The value cannot be a negative number. For example, if this parameter is set to 1 and limit is set to 10, only the 2nd to 11th records are displayed.

Request

  • Example request

    None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    flavors

    Array of objects

    Specification details.

    For details, see Table 3.

    total

    integer

    Total number of records.

    Table 3 flavors description

    Name

    Type

    Description

    vcpus

    string

    Number of vCPUs.

    ram

    string

    Memory size in GB.

    spec_code

    string

    Resource specification code. For details, see DB Instance Specifications.

    availability_zone

    Array of strings

    AZ supported by the specifications.

    az_status

    Map<String,String>

    key indicates the AZ ID, and value indicates the specification status in the AZ. Its value can be any of the following:

    • normal: available.
    • unsupported: indicates that the specifications are not supported by the AZ.
    • sellout: indicates that the specifications in the AZ are sold out.

    version

    string

    DB engine version supported by the specifications.

    name

    string

    DB engine.

    group_type

    string

    Performance specifications. Its value can be any of the following:

    • normal: general-enhanced
    • normal2: general-enhanced II
    • armFlavors: Kunpeng general-enhanced
  • Example normal response
    {
      "flavors": [
        {
          "vcpus": "2",
          "ram": "16",
          "availability_zone": [
            "eu-de-01",
            "eu-de-02",
            "eu-de-03"
          ],
          "version": "1.4",
          "name": "GaussDB",
          "spec_code": "gaussdb.opengauss.ee.dn.m4.large.8.in",
          "az_status": {
            "eu-de-01": "normal",
            "eu-de-02": "normal",
            "eu-de-03": "normal"
          },
          "group_type": "normal2"
        }
      ],
      "total": 1
    }

Status Code

Error Code

For details, see Error Codes.