Querying DDM Node Classes Available in Each AZ (a V3 API)
Function
This V3 API is used to query DDM node classes available in an AZ.
Constraints
None
URI
- URL format
GET /v3/{project_id}/flavors?engine_id={engine_id}&offset={offset}&limit={limit}&engine_version={engine_version}&available_zones={available_zones}
- Parameter description
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| engine_id | No | String | Engine ID, which can be obtained by calling the API for querying DDM engine information. At least one of engine_id and engine_version must be specified. |
| engine_version | No | String | Engine version, which can be obtained by calling the API for querying DDM engine information. At least one of engine_id and engine_version must be specified. |
| available_zones | No | String | AZs. Use commas (,) to separate multiple AZs, for example, cn-southwest-244a,cn-southwest-244b. The value cannot be empty. For details, see Regions and Endpoints. |
| offset | No | Integer | Index offset. The query starts from the next piece of data indexed by this parameter. The value is 0 by default. The value must be a non-negative number. |
| limit | No | Integer | Maximum records to be queried. Value range: 1 to 128. If the parameter value is not specified, 10 records are obtained by default. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. You can obtain the token by calling the IAM API used to obtain a user token. |
Example Request
Querying DDM node classes available in an AZ
GET https://{endpoint}/v3/{project_id}/flavors?engine_id=xxxxxx-xxxx-xxxx-f7ab-100f2cd33008&engine_version=3.x.x.x&available_zones=cn-north-1a,cn-north-1b&offset=0&limit=10 Response
- Normal response
| Parameter | Type | Description |
|---|---|---|
| flavor_groups | Array of FlavorGroupInfo objects | List of node classes. |
| Parameter | Type | Description |
|---|---|---|
| flavors | Array of Flavor objects | Node class information. |
| group_type | String | Compute resource architecture type. The value can be x86 or ARM. |
| offset | Integer | Which page the server starts returning items |
| limit | Integer | Number of records displayed on each page |
| total | Integer | Number of engine versions |
| Parameter | Type | Description |
|---|---|---|
| az_infos | Array of AvailableZone objects | AZ information. The value can be: normal: indicates that the node classes in the AZ are available. unsupported: indicates that the node classes are not supported by the AZ. sellout: indicates that the node classes in the AZ are sold out. |
| id | String | Specification ID. |
| spec_code | String | Resource specification code. |
| vcpus | String | Number of vCPUs. For example, the value 1 indicates 1 vCPU. |
| ram | String | Memory size in GB. |
- Normal response example
{ "flavor_groups": [ { "offset": 0, "limit": 1, "total": 4, "group_type": "X86", "flavors": [ { "id": "xxxxx-xxxx-xxxx-xxxx-xxxxxxxx", "spec_code": "ddm.c6.xlarge.2", "vcpus": "4", "ram": "8", "az_infos": [ { "code": "cn-north-7a", "status": "normal", "description":"AZ 1" "support_ipv6": true } ] } ] }, { "offset": 0, "limit": 1, "total": 5, "group_type": "ARM", "flavors": [ { "id": "xxxxx-xxxx-xxxx-xxxx-xxxxxxxx", "spec_code": "ddm.kc1.large.2", "vcpus": "2", "ram": "4", "az_infos": [ { "code": "cn-north-7a", "status": "normal", "description":"AZ 1" "support_ipv6": true } ] } ] } ] }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
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