This API is used to query the list of flavors that a cluster can be changed to. A maximum of 20 flavors can be returned.
Constraints
If cluster_id is not specified, all flavors that a cluster can be changed to are returned. However, some flavors may be sold out and cannot be used due to quota reasons.
If cluster_id is specified, the flavors with sufficient quotas in the AZ where the cluster is located are automatically returned.
For details, see Calling APIs.
GET /v1/{project_id}/flavors/{flavor_id}/target-flavors
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
flavor_id |
Yes |
String |
Definition Current flavor ID of the cluster. Constraints N/A Range N/A Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
cluster_id |
No |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints If this parameter is not specified, all flavors that a cluster can be changed to are returned. However, some flavors may be sold out and cannot be used due to quota reasons. If cluster_id is specified, the flavors with sufficient quotas in the AZ where the cluster is located are automatically returned. Range N/A Default Value null |
None
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
count |
Integer |
Definition Number of flavors. Range N/A |
flavors |
Array of FlavorInfoResponse objects |
Definition List of flavor details. A maximum of 20 flavors can be returned. Range N/A |
Query the list of flavors whose ID is b5c45780-1006-49e3-b2d5-b3229975bbc7.
get https://{Endpoint}/v1/89cd04f168b84af6be287f71730fdb4b/flavors/b5c45780-1006-49e3-b2d5-b3229975bbc7/target-flavors
Status code: 200
Query succeeded.
{
"flavors" : [ {
"id" : "4e26f8d5-d64f-458e-80e7-26680b46cd58",
"name" : "dwsx2.xlarge",
"vcpus" : "4",
"ram" : "32",
"is_current_flavor" : false
} ],
"count" : 1
}
Status Code |
Description |
|---|---|
200 |
Query succeeded. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal server error. |
503 |
Service unavailable. |