Querying Recommended AZs for a Flavor
Function
This API is used to query recommended AZs for a flavor.
Debugging
You can debug this API in API Explorer.
Authorization
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permissions listed below are required.
| Action | Access Level | Resource Type (*: required) | Condition Key | Alias | Dependencies |
|---|---|---|---|---|---|
| ecs:cloudServerFlavors:get | read | - | - | - | - |
URI
GET /v1/{project_id}/cloudservers/flavors/{flavor_id}/resources
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Definition Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| flavor_id | Yes | Definition Specifies the flavor ID. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| region_ids | No | String | Definition Regions where the flavor to be queried is located. Use commas (,) to separate multiple region IDs. Constraints N/A Range N/A Default Value N/A |
Request
None
Response
Table 3 describes the response parameter.
| Parameter | Type | Description |
|---|---|---|
| resources | Array of objects | Definition Recommended AZs for a flavor. For details, see Table 4. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| region_id | String | Definition Specifies the ID of the region that the flavor belongs to. Range N/A |
| availability_zone | String | Definition Specifies the AZ that the flavor belongs to. Range N/A |
| prefer | Boolean | Definition Specifies whether the current AZ is the recommended AZ for a flavor. Range
|
Example Request
Query recommended AZs for a flavor.
GET https://{endpoint}/v1/{project_id}/cloudservers/flavors/{flavor_id}/resources Example Response
{
"resources": [{
"region_id": "region_01",
"availability_zone": "az1",
"prefer": false
}]
} Returned Values
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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