All Products
Search
Document Center

Dynamic Content Delivery Network:DescribeDcdnWafUsageData

Last Updated:Apr 11, 2024

Queries the usage data of Web Application Firewall (WAF).

Operation description

  • You can call this operation up to 10 times per second per account.
  • The minimum time granularity for a query is 5 minutes. The maximum time span for a query is 31 days. The time period within which historical data is available for a query is 90 days.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
dcdn:DescribeDcdnWafUsageDataRead
  • Domain
    acs:dcdn:*:{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringNo

The timestamp of the data returned.

example.com
StartTimestringNo

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2018-09-30T16:00:00Z
EndTimestringNo

The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note The end time must be later than the start time.
2018-10-01T16:00:00Z
IntervalstringNo

The number of used SeCUs.

300
SplitBystringNo

The WAF information about the accelerated domain name.

domain

Response parameters

ParameterTypeDescriptionExample
object
EndTimestring

The operation that you want to perform. Set the value to DescribeDcdnWafUsageData.

2018-10-01T16:00:00Z
StartTimestring

The accelerated domain name.

2018-09-30T16:00:00Z",
RequestIdstring

Specifies how query results are grouped. By default, this parameter is empty. Valid values:

  • domain: Query results are grouped by accelerated domain name.
  • An empty string: Query results are not grouped.
CB1A380B-09F0-41BB-802B-72F8FD6DA2FE
WafUsageDataobject []

The number of monitored requests.

ObserveCntlong

The end of the time range during which data was queried.

300
Domainstring

The domain name that you want to query. If you do not specify an accelerated domain name, all accelerated domain names are queried by default.

example.com
BlockCntlong

The number of allowed requests.

300
AccessCntlong

The number of blocked requests.

600
TimeStampstring

The beginning of the time range during which data was queried.

2018-09-30T16:00:00Z
SecCulong

The time granularity for a query. Unit: seconds.

The time granularity varies with the maximum time range per query. Valid values: 300 (5 minutes), 3600 (1 hour), and 86400 (1 day).

50

Examples

Sample success responses

JSONformat

{
  "EndTime": "2018-10-01T16:00:00Z",
  "StartTime": "2018-09-30T16:00:00Z\",",
  "RequestId": "CB1A380B-09F0-41BB-802B-72F8FD6DA2FE",
  "WafUsageData": {
    "WafUsageDataItem": [
      {
        "ObserveCnt": 300,
        "Domain": "example.com",
        "BlockCnt": 300,
        "AccessCnt": 600,
        "TimeStamp": "2018-09-30T16:00:00Z",
        "SecCu": 50
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingTimeParameterThe StartTime and EndTime must be both specified.You must set both the start time and the end time.
400InvalidStartTime.MalformedThe specified StartTime parameter is invalid.The format of the specified start time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
400InvalidEndTime.MalformedThe specified EndTime is invalid.The format of the specified end time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
400InvalidTime.MalformedSpecified StartTime or EndTime is malformed.The format of the specified start time or end time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
400InvalidEndTime.MismatchThe specified EndTime is earlier than the StartTime.The end time is earlier than the start time.
400InvalidTimeSpanThe time span exceeds the limit.The time span exceeds the limit. Configure a valid time span as described in API documentation.
400InvalidStartTime.ValueNotSupportedThe specified StartTime is invalid.The specified start time is invalid.

For a list of error codes, visit the Service error codes.