Queries the details of traffic billed based on the pay-as-you-go billing method.
Operation description
If you use Cloud Firewall that uses the pay-as-you-go billing method, you can call this operation to query traffic details accurate to the granularity of specific resource instances. If you use Cloud Firewall that uses the subscription billing method, you can call this operation to query the overall traffic details.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-cloudfirewall:DescribePostpayTrafficDetail | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language of the content within the request and response. Valid values:
| zh |
PageSize | long | No | The number of entries per page. Default value: 10. Maximum value: 50. | 10 |
CurrentPage | long | No | The page number. Default value: 1. | 1 |
StartTime | string | Yes | The beginning of the time range to query. Specify a value in the YYYYMMDD format. | 20230101 |
EndTime | string | Yes | The end of the time range to query. Specify a value in the YYYYMMDD format. | 20230130 |
SearchItem | string | No | The instance ID or the IP address of the asset. | 192.0.XX.XX |
TrafficType | string | Yes | The traffic type. This parameter is required. Valid values:
| EIP_TRAFFIC |
Order | string | No | The field based on which you want to sort the query results. Valid values:
| resourceId |
RegionNo | string | No | The region ID. | cn-beijing |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-24 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2024-08-29 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |
2024-08-08 | The response structure of the API has changed | View Change Details |