Updated on 2022-12-07 GMT+08:00

Querying the Quota of Classes Available in Each AZ

Function

This API is used to query the quota of available classes of DDM in each AZ.

Constraints

None

URI

GET /v2/{project_id}/flavors?engine_id={engine_id}
Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

engine_id

Yes

String

Engine ID, which can be obtained by calling the API for querying DDM engine information.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

computeFlavorGroups

Array of ComputeFlavorGroupsInfo objects

Compute flavor information

volumeFlavors

Object

Storage flavor information

Table 4 ComputeFlavorGroupsInfo

Parameter

Type

Description

groupType

String

Compute resource architecture type. The value can be x86 or ARM.

computeFlavors

Array of ComputeFlavors objects

Details of compute flavors

total

Integer

Total number of compute flavors

Table 5 ComputeFlavors

Parameter

Type

Description

id

String

Flavor ID

typeCode

String

Resource type code

code

String

VM flavor types recorded in DDM

iaasCode

String

VM flavor types recorded by the IaaS layer

cpu

String

Number of CPUs

mem

String

Memory size, in GB

maxConnections

String

Maximum number of connections

serverType

String

Compute resource type, for example, KVM

architecture

String

Compute resource architecture type. The value can be x86 or ARM.

azStatus

Object

AZ status

regionStatus

String

Region status

groupType

String

Compute resource architecture type. The value can be x86 or ARM.

dbType

String

Database engine type

extendFields

Object

Extension field for storing AZ information

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Example Request

GET https://{endpoint}/v2/{project_id}/flavors?engine_id={engine_id}

Example Response

Status code: 200

OK

{
    "computeFlavorGroups": [
        {
            "groupType": "X86",
            "computeFlavors": [  
                {
                    "id": "eb88535e-ae5b-3b4e-95d2-77a12f65b825",
                    "typeCode": "test.resource.type.ddm",
                    "code": "ddm.s2.8xlarge.2",
                    "iaasCode": "c3.8xlarge.2",
                    "cpu": "32",
                    "mem": "64",
                    "maxConnections": null,
                    "serverType": "KVM",
                    "architecture": "X86",
                    "azStatus": {
                        "az2.dc0": "unsupported",
                        "az3xahz": "normal",
                        "az2xahz": "normal",
                        "az1xahz": "normal"
                    },
                    "regionStatus": "normal",
                    "groupType": null,
                    "dbType": "DDM",
                    "extendFields": {
                        "azCode": "az2.dc0,az3xahz,az2xahz,az1xahz",
                        "azDescription": "az2.dc0,az3xahz,az2xahz,az1xahz"
                    }
                }
            ],
            "total": 1
        },
        {
            "groupType": "ARM",
            "computeFlavors": [
                {
                    "id": "8b7efc22-0362-3778-97e1-66700d0ea388",
                    "typeCode": "test.resource.type.ddm",
                    "code": "ddm.kc1.3xlarge.2",
                    "iaasCode": "kc1.3xlarge.2",
                    "cpu": "12",
                    "mem": "24",
                    "maxConnections": null,
                    "serverType": "KVM",
                    "architecture": "ARM",
                    "azStatus": {
                        "az2.dc0": "unsupported",
                        "az3xahz": "normal",
                        "az2xahz": "normal",
                        "az1xahz": "normal"
                    },
                    "regionStatus": "normal",
                    "groupType": null,
                    "dbType": "DDM",
                    "extendFields": {
                        "azCode": "az2.dc0,az3xahz,az2xahz,az1xahz",
                        "azDescription": "az2.dc0,az3xahz,az2xahz,az1xahz"
                    }
                }
            ],
            "total": 1
        }
    ],
    "volumeFlavors": []
}

Status code: 400

bad request

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

Status code: 500

server error

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

Status Codes

Status Code

Description

200

OK

400

bad request

500

server error

Error Codes

For details, see Error Codes.