Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying Flavor Sales Policies

Updated on 2024-12-19 GMT+08:00

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}

Table 1 describes the parameters in the URI.
Table 1 Path parameters

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the ID, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

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:

  • available: indicates that the flavor is available.
  • sellout: indicates that the flavor has been sold out.

sell_mode

No

String

Specifies the billing mode.

Options:

  • postPaid: indicates the pay-per-use billing mode, which is not supported currently.
  • prePaid: indicates the yearly/monthly billing mode, which is not supported currently.
  • spot: indicates the spot pricing billing mode.
  • ri: indicates the reserved instance, which is not supported currently.

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:

  • immediate: Resources are released immediately.
  • delay: The release of resources is delayed.

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

Table 3 describes the response parameters.
Table 3 Response parameters

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.

Table 4 sell_policies field description

Parameter

Type

Description

id

Integer

Specifies the index of the ECS flavor.

flavor_id

String

Specifies the ECS flavor ID.

sell_status

String

Specifies the sales status of the ECS flavor.

  • sellout: indicates that the flavor has been sold out.
  • available: indicates that the flavor is available.

availability_zone_id

String

Specifies the AZ of the ECS flavor.

sell_mode

String

Specifies the billing mode of the ECS flavor.

  • postPaid: indicates the pay-per-use billing mode.
  • prePaid: indicates the yearly/monthly billing mode.
  • spot: indicates the spot pricing billing mode.
  • ri: indicates the reserved instance.

spot_options

object

Specifies the sales policy details of the spot ECS flavor. For details, see Table 5.

Table 5 spot_options field description

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.

  • immediate: Resources are released immediately.
  • delay: The release of resources is delayed.

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"
            }
        }
    ]
}


Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback