Querying Flavor Sales Policies
Function
This API is used to query the flavor sales policies of spot pricing ECSs and IES instances.
Constraints
This API is used only to query the sales policies of spot ECS flavors.
URI
GET /v1/{project_id}/cloudservers/flavor-sell-policies?flavor_id={flavor_id}
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Data Type |
Description |
---|---|---|---|
flavor_id |
No |
String |
Specifies the flavor ID of the ECS. For details about the specifications that have been brought online, see ECS Types.
NOTE:
This field supports fuzzy search (prefix match) and exact search. |
sell_status |
No |
String |
Specifies the sales status of the ECS system flavor. Options:
|
sell_mode |
No |
String |
Specifies the billing mode. Options:
|
availability_zone_id |
No |
String |
Specifies the AZ. You need to obtain the AZ by referring to Regions and Endpoints. |
longest_spot_duration_hours_gt |
No |
Integer |
Queries the policy of a spot ECS whose predefined duration is greater than the configured value. |
largest_spot_duration_count_gt |
No |
Integer |
Queries the policy of a spot ECS with the number of durations greater than the configured value. |
longest_spot_duration_hours |
No |
Integer |
Queries the policy of a spot ECS whose predefined duration is equal to the configured value. |
largest_spot_duration_count |
No |
Integer |
Queries the policy of a spot ECS with the number of durations equal to the configured value. |
interruption_policy |
No |
String |
Specifies the interruption policy. Options:
|
limit |
No |
Integer |
Specifies the maximum number of policies that can be displayed per page. The default value is 1,000. |
marker |
No |
String |
Specifies the ID of the last flavor on each page as the paging marker. |
Request
None
Response
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Specifies the number of ECS flavor sales policies. |
sell_policies |
Array of objects |
For details about ECS flavor sales policies, see Table 4. |
Parameter |
Type |
Description |
---|---|---|
id |
Integer |
Specifies the ID of ECS flavor. |
flavor_id |
String |
Specifies the ECS flavor ID. |
sell_status |
String |
Specifies the sales status of the ECS flavor.
|
availability_zone_id |
String |
Specifies the AZ of the ECS flavor. |
sell_mode |
String |
Specifies the billing mode of the ECS flavor.
|
spot_options |
object |
Specifies the sales policy details of the spot ECS flavor. For details, see Table 5. |
Parameter |
Type |
Description |
---|---|---|
longest_spot_duration_hours |
Integer |
Specifies the predefined duration of the spot ECS. |
largest_spot_duration_count |
Integer |
Specifies the number of durations. |
interruption_policy |
String |
Specifies the interruption policy of the spot ECS.
|
Example Request
Query the sales policy list of ECS flavor s3.small.1.
GET https://{endpoint}/v1/{project_id}/cloudservers/flavor-sell-policies?flavor_id=s3.small.1
Example Response
{ "count":2, "sell_policies":[ { "id":1, "flavor_id":"s3.small.1", "sell_status":"available", "availability_zone_id":"az1", "sell_mode":"spot", "spot_options":{ "longest_spot_duration_hours":6, "largest_spot_duration_count":1, "interruption_policy":"immediate" } }, { "id":2, "flavor_id":"s3.small.1", "sell_status":"available", "availability_zone_id":"az1", "sell_mode":"spot", "spot_options":{ "longest_spot_duration_hours":6, "largest_spot_duration_count":1, "interruption_policy":"immediate" } } ] }
Returned Value
Error Codes
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