All Products
Search
Document Center

Cloud Firewall:DescribePostpayBill

Last Updated:Jul 17, 2026

Queries pay-as-you-go 2.0 bills.

Operation description

For pay-as-you-go users, the bill details are accurate to the specific resource instance granularity. For subscription users, only overall queries are supported.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-cloudfirewall:DescribePostpayBill

get

*All Resource

*

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Lang

string

No

The language. This is an enumeration value. Default value: zh. Valid value: en.

zh

PageSize

integer

No

The maximum number of entries per page in a paged query. Default value: 10.

10

CurrentPage

integer

No

The page number of the current page in a paged query.

1

StartTime

string

Yes

The start time of the bill query, expressed as a second-level UNIX timestamp.

1656664560

EndTime

string

Yes

The end time of the bill query, expressed as a second-level UNIX timestamp. The value must be later than StartTime.

1646063922

Interval

integer

Yes

Specifies the time interval for querying data. This is an enumeration value. This parameter is required. If this parameter is not specified, ERR_PARAMS_INVALID is returned. Valid values:

  • 3600: queries hourly data.

  • 86400: queries daily data.

Valid values:

  • 3600 :

    hour.

  • 86400 :

    day.

60

Response elements

Element

Type

Description

Example

object

Schema of Response

TotalCount

integer

The total number of entries.

132

RequestId

string

The ID of the request.

133173B9-8010-5DF5-8B93-********

AggregateInternetTraffic

number

The aggregated Internet traffic, in GB.

10

AggregateNatTraffic

number

The aggregated NAT traffic, in GB.

10

AggregateVpcTraffic

number

The aggregated VPC traffic, in GB.

10

AggregateSdlTraffic

number

The aggregated sensitive data detection traffic, in GB.

10

AggregateTotalTraffic

number

The aggregated total traffic, in GB.

40

BillList

array<object>

The bill list.

object

InternetTraffic

number

The Internet traffic, in GB.

10

NatInstanceCnt

integer

The number of NAT instances.

2

EndTime

integer

The end time, expressed as a second-level UNIX timestamp. The value is on the hour or on the day.

1733710015

SdlTraffic

number

The sensitive data detection traffic, in GB.

1

InternetInstanceCnt

integer

The number of Internet instances.

3

StartTime

integer

The start time, expressed as a second-level UNIX timestamp. The value is on the hour or on the day.

1710206070000

LogStorage

integer

The log service usage duration, in T × h.

24

NatTraffic

number

The NAT traffic, in GB.

2

VpcInstanceCnt

integer

The number of VPC instances.

2

ThreatIntelligence

integer

The threat intelligence usage duration, in hours.

1

IsDerated

integer

Indicates whether the bill is deducted. A value of 0 indicates that the bill is not deducted. Any value greater than 0 indicates that the bill is deducted. If the bill is deducted, it is not charged.

Note

This field is meaningful only when you query hourly data.

0

Sdl

integer

The data leak detection usage duration, in hours.

0

VpcTraffic

number

The VPC traffic, in GB.

4

Examples

Success response

JSON format

{
  "TotalCount": 132,
  "RequestId": "133173B9-8010-5DF5-8B93-********",
  "AggregateInternetTraffic": 10,
  "AggregateNatTraffic": 10,
  "AggregateVpcTraffic": 10,
  "AggregateSdlTraffic": 10,
  "AggregateTotalTraffic": 40,
  "BillList": [
    {
      "InternetTraffic": 10,
      "NatInstanceCnt": 2,
      "EndTime": 1733710015,
      "SdlTraffic": 1,
      "InternetInstanceCnt": 3,
      "StartTime": 1710206070000,
      "LogStorage": 24,
      "NatTraffic": 2,
      "VpcInstanceCnt": 2,
      "ThreatIntelligence": 1,
      "IsDerated": 0,
      "Sdl": 0,
      "VpcTraffic": 4
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorAliUid The aliuid is invalid. The aliuid is invalid.
400 ErrorNotPostpayUser not Postpay User. Non-pay-as-you-go Users.
400 ErrorTimeError The time is invalid. The time is invalid.
400 ErrorPageNo Either page number or page size is invalid. Either page number or page size is invalid.
400 ErrorDBSelectError A database select error occurred. The error message returned because an internal error has occurred in querying the database.
400 ErrorMarshalJSON internal error. Internal error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.