All Products
Search
Document Center

Cloud Firewall:DescribePostpayTrafficDetail

Last Updated:Jun 18, 2026

Queries the details of pay-as-you-go billing traffic.

Operation description

For pay-as-you-go users, the details are accurate to the specific resource instance level. 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:DescribePostpayTrafficDetail

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Lang

string

No

The language of the request and response. Valid values:

  • zh (default): Chinese

  • en: English.

zh

PageSize

integer

No

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

10

CurrentPage

integer

No

The page number in a paged query. Default value: 1.

1

StartTime

string

Yes

The start time of the query. Specify the value in the YYYYMMDD format.

20240101

EndTime

string

Yes

The end time of the query. Specify the value in the YYYYMMDD format.

20240131

SearchItem

string

No

The IP address or instance ID of the asset.

192.0.XX.XX

TrafficType

string

Yes

The type of traffic boundary for statistics. This parameter is required. Valid values:

  • EIP_TRAFFIC: Internet border traffic.

  • NatGateway_TRAFFIC: NAT border traffic.

  • VPC_TRAFFIC: VPC border traffic.

VPC_TRAFFIC

Order

string

No

The field by which to sort the results. Valid values:

  • resourceId: resource ID.

  • trafficDay: date.

resourceId

RegionNo

string

No

The region information.

cn-beijing

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of traffic statistics entries.

132

RequestId

string

The request ID.

0525EADE-C112-5702-A5BC-0E2F6F94DB23

TrafficList

array<object>

The traffic statistics list.

object

The traffic statistics information.

TrafficDay

string

The date of the traffic statistics.

20231001

TrafficType

string

The type of traffic boundary for statistics. Valid values:

  • EIP_TRAFFIC: Internet border traffic.

  • NatGateway_TRAFFIC: NAT border traffic.

  • VPC_TRAFFIC: VPC border traffic.

EIP_TRAFFIC

InstanceId

string

The ID of the asset instance.

i-8vb2d7c9mtn0bo9qcraq

ResourceId

string

The resource ID. For Internet border traffic, this is the public IP address of the asset. For NAT border traffic, this is the firewall instance ID of the asset.

39.106.146.214

InstanceType

string

The asset type. This value takes effect only for Internet border traffic.

EcsPublicIP

TotalBytes

integer

The total network throughput in both inbound and outbound directions (total bytes sent and received). Unit: bytes.

1215096939

InBytes

integer

The inbound network throughput (total bytes). Unit: bytes.

1115096939

OutBytes

integer

The outbound network throughput (total bytes). Unit: bytes.

100000000

ProtectionDuration

integer

The protection duration. Unit: hours.

20

RegionNo

string

The region ID.

cn-beijing

Examples

Success response

JSON format

{
  "TotalCount": 132,
  "RequestId": "0525EADE-C112-5702-A5BC-0E2F6F94DB23",
  "TrafficList": [
    {
      "TrafficDay": "20231001",
      "TrafficType": "EIP_TRAFFIC",
      "InstanceId": "i-8vb2d7c9mtn0bo9qcraq",
      "ResourceId": "39.106.146.214",
      "InstanceType": "EcsPublicIP",
      "TotalBytes": 1215096939,
      "InBytes": 1115096939,
      "OutBytes": 100000000,
      "ProtectionDuration": 20,
      "RegionNo": "cn-beijing"
    }
  ]
}

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.