Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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
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 the Package Usage (Old)

Updated on 2024-09-26 GMT+08:00

Function

A customer can query the package usage on the self-built platform.

NOTE:

This API will be taken offline. For details about the new API for querying the usage in a package, see Querying Resource Packages and Querying the Package Usage.

Constraints

This API can be invoked only using the AK/SK or token of the customer.

URI

POST /v2/payments/free-resources/usages/query

Table 1 Header parameter

Parameter

Mandatory

Value Range

Description

X-Language

No

A maximum of 8 characters

Language.

  • zh_CN: Chinese
  • en_US: English

If this parameter is not included in the request parameters or is left empty, the value en_US is used. This parameter cannot be set to "" or null.

Request

Request Parameters

N/A

Example Request

POST https://bss-intl.myhuaweicloud.com/v2/payments/free-resources/usages/query HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ 

Response

Response Parameters

Parameter

Type

Value Range

Description

error_code

String

A maximum of 20 characters

Error code. For details, see Returned Values. This parameter is returned only when the query failed.

error_msg

String

A maximum of 1000 characters

Error description. This parameter is returned only when the query failed.

package_usage_infos

list<PackageUsageInfo>

-

Package usage. For details, see Table 2.

Table 2 Package usage information

Parameter

Type

Value Range

Description

order_instance_id

String

A maximum of 255 characters

Identifier of a subscribed resource package.

resource_type_name

String

A maximum of 255 characters

Resource type.

quota_reuse_mode

Integer

-

Use model. The options are as follows:

  • 1: Resettable

    Indicates that the usage of the purchased pay-per-use resource package can be restored based on a specified period. For example, if you purchase a 1-year 40 GB pay-per-use resource package with quota_reuse_mode set to 1 and quota_reuse_cycle to 4, then the resource package will be reset each month (you will get 40 GB resource each month) within the year.

  • 2: Not resettable

    Indicates that the usage of the purchased pay-per-use package will not be restored. For example, if you purchase a 1-year 40 GB pay-per-use resource package with quota_reuse_mode set to 2, the resource package will not be reset, and you will get 40 GB resource within the year.

quota_reuse_cycle

Integer

-

Reset period. This parameter is valid only when quota_reuse_mode is set to 1 (Resettable).

  • 1: Hour
  • 2: Day
  • 3: Week
  • 4: Month
  • 5: Year

quota_reuse_cycle_type

Integer

-

Reset period type. This field is valid only when quota_reuse_mode is set to 1 (Resettable).

If quota_reuse_mode is set to resettable and the value of quota_reuse_cycle_type is null, the quota is reset by calendar period by default.

  • 1: Reset by calendar period

    Indicates that the resource package is reset by calendar month or calendar year. For example, if you set quota_reuse_cycle to 4 (month) and quota_reuse_cycle_type to 1, the resource package is reset on the first day of each month.

  • 2: Reset by order period

    Indicates that the resource package is reset by order period. For example, if you set quota_reuse_cycle to 4 (month), and quota_reuse_cycle_type to 2, and you purchase this resource package on the 15th day of the month, then the resource package will be reset on the 15th day of each month.

start_time

String

A maximum of 64 characters

Start time. The value is in UTC format.

  • If quota_reuse_mode is set to 1, the value is the start time of the reset period for the current time.
  • If quota_reuse_mode is set to 2, the value is the time when the purchased instance takes effect.

end_time

String

A maximum of 64 characters

End time. The value is in UTC format.

  • If quota_reuse_mode is set to 1, the value is the end time of the reset period for the current time.
  • If quota_reuse_mode is set to 2, the value is the time when the purchased instance becomes invalid.

balance

Number

-

Remaining resources in a package.

total

Number

-

Total number of resources in a package.

measurement_name

String

A maximum of 255 characters

Measurement unit name of a package resource.

region_code

String

A maximum of 255 characters

Cloud service region code, for example, ap-southeast-1. Obtain the value from the Region column in Regions and Endpoints.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time 
{
    "package_usage_infos": [
        {
            "order_instance_id": "01154-119701448-0",
            "resource_type_name": "cdn.cdn.flow",
            "quota_reuse_mode": 1,
            "quota_reuse_cycle": 1,
            "quota_reuse_cycle_type": 1,
            "start_time": "2019-12-26T02:00:00Z",
            "end_time": "2019-12-26T02:24:11Z",
            "balance": 100,
            "total": 100,
            "measurement_name": "Byte",
            "region_code": "global-cbc-1"
        }   ]
}

Returned Values

NOTE:
  • 4xx: This class of HTTP status code is intended for situations in which the error seems to have been caused by the client, for example, the request contains bad syntax or incorrect parameters. You must ensure the request is correct.
  • 5xx: This class of HTTP status code is intended for cases in which the Huawei Cloud server is aware that it has encountered an error or is otherwise incapable of performing the request. In this case, contact Huawei Cloud customer service.

HTTP Status Code

Error Code

Description

500

CBC.0999

Other errors.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback