Help Center/ Huawei Cloud Flexus_Huawei Cloud Flexus L Instance/ API Reference/ API/ General O&M APIs/ Querying the Remaining Traffic of the Data Package in a FlexusL Instance
Updated on 2025-12-04 GMT+08:00

Querying the Remaining Traffic of the Data Package in a FlexusL Instance

Function

This API is used to query the remaining traffic of the data package in a FlexusL instance. This section lists the key information about API usage. For more information, see Viewing Resource Package Usage.

Constraints

This API can be called only by the customer AK/SK or token.

If a data package has expired for more than 18 months, its information cannot be queried.

Debugging

You can debug this API in API Explorer.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. For details about the required permissions, see Permissions and Supported Actions.

URI

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

Request

Table 1 Request parameters

Parameter

Mandatory

Type

Value Range

Description

free_resource_ids

Yes

List<string>

A maximum of 100 records

List of data package IDs of FlexusL instances. Each ID can contain a maximum of 64 bytes.

You can obtain the data package IDs by calling the API for querying a created FlexusL instance based on the logical_resource_type value that is huaweicloudinternal_cbc_freeresource.

Example Request

Query the remaining traffic of the data package whose ID is 828e2c7c-3c8c-45a2-bebc-98cb3e77d06e.

{
 "free_resource_ids": [
  "828e2c7c-3c8c-45a2-bebc-98cb3e77d06e"
 ]
}

Example Response

{
 "free_resources": [
  {
   "free_resource_id": "828e2c7c-3c8c-45a2-bebc-98cb3e77d06e",
   "free_resource_type_name": "Lightweight BGP data package",
   "quota_reuse_cycle": 4,
   "quota_reuse_cycle_type": 2,
   "usage_type_name": "Uplink traffic",
   "start_time": "2024-12-25T08:00:00Z",
   "end_time": "2025-01-25T16:00:00Z",
   "amount": 180,   //Remaining traffic
   "original_amount": 200, //Original traffic amount
   "measure_id": 10
  }
 ]
}