All Products
Search
Document Center

:DescribeDomainUsageData

Last Updated:Oct 09, 2024

Queries the resource usage data of specific domain names in a specified billable region.

Usage notes

  • You can query the resource usage data of up to 100 domain names at a time. Separate domain names with commas (,). If you do not specify the DomainName parameter, the resource usage data of all domain names within your Alibaba Cloud account is returned.
  • The resource usage data includes network traffic that is measured in bytes, bandwidth that is measured in bit/s, and the number of requests.
  • If you do not specify the Interval parameter, you can query the resource usage data in the last 12 months that spans a period of up to 31 days per call. If you specify a time range of 1 to 3 days in a call, the time interval between the entries that are returned is 1 hour. If you specify a time range of more than 3 days in a call, the time interval between the entries that are returned is 1 day.
  • The following table describes the maximum time range per query, the time period within which historical data is available, and the data delay if you specify the Interval parameter.

Time granularity

Maximum time range per query

Historical data available

Data delay

5 minutes

3 days

93 days

15 minutes

1 hour

31 days

186 days

4 hours

1 day

90 days

366 days

04:00 on the next day

QPS limit

You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeDomainUsageData

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

DomainName String No example.com

The domain name.

  • You can specify multiple domain names by separating them with commas (,).
  • If you do not specify this parameter, the resource usage data of all domain names within your Alibaba Cloud account is returned.
StartTime String Yes 2015-12-10T20:00:00Z

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.

EndTime String Yes 2015-12-10T21:00:00Z

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.

The end time must be later than the start time. The maximum time range that can be specified is 31 days.

Type String No all

The type of the resource usage data to query.

Valid values if you set the Field parameter to bps or traf:

  • rts: bandwidth or traffic for Real-Time Streaming (RTS)
  • quic: bandwidth or traffic for QUIC
  • all: all bandwidth or traffic

Valid values if you set the Field parameter to req_traf or req_bps:

  • push: stream ingest bandwidth or traffic
  • push_proxy: stream relay bandwidth or traffic
Field String Yes traf

The category of the resource usage data to query. Valid values:

  • bps: streaming bandwidth
  • traf: streaming traffic
  • req_traf: stream ingest traffic if you set the Type parameter to push, or stream relay traffic if you set the Type parameter to push_proxy
  • req_bps: stream ingest bandwidth if you set the Type parameter to push, or stream relay bandwidth if you set the Type parameter to push_proxy
Area String No CN

The billable region. Valid values:

  • CN: Chinese mainland
  • OverSeas: outside the Chinese mainland
  • AP1: Asia Pacific 1
  • AP2: Asia Pacific 2
  • AP3: Asia Pacific 3
  • NA: North America
  • SA: South America
  • EU: Europe
  • MEAA: Middle East and Africa
  • all: all regions
Note

If you do not specify this parameter, the default value CN is used. Alibaba Cloud supports the following countries and regions outside the Chinese mainland:

  • Asia Pacific 1: Hong Kong (China), Macao (China), Taiwan (China), Japan, and Southeast Asia excluding Vietnam and Indonesia.
  • Asia Pacific 2: Indonesia, South Korea, and Vietnam.
  • Asia Pacific 3: Australia and New Zealand. North America: US and Canada.
  • South America: Brazil.
  • Europe: Ukraine, UK, France, Netherlands, Spain, Italy, Sweden, and Germany.
  • Middle East and Africa: South Africa, Oman, UAE, and Kuwait.
DataProtocol String No all

The protocol of the data to query. Valid values:

  • http: HTTP
  • https: HTTPS
  • quic: QUIC
  • all (default): HTTP, HTTPS, and QUIC
Interval String No 300

The time interval between the data entries to return. Unit: seconds. Valid values: 300 (5 minutes), 3600 (1 hour), and 86400 (1 day).

Note

Stable resource usage data at a specific point in time (T) can be queried at and after the point in time of T+N. N is 2 hours.

For example, at 15:00:00 on December 21, you can retrieve the stable resource usage data at and before 13:00:00 on December 21.

Response parameters

Parameter

Type

Example

Description

EndTime String 2015-12-10T21:00Z

The end of the time range during which the data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

Type String all

The type of the resource usage data.

StartTime String 2015-12-10T20:00Z

The beginning of the time range during which the data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

RequestId String B955107D-E658-4E77-B913-E0AC3D31693E

The request ID.

Area String CN

The billable region where the resource usage data was generated.

DomainName String example.com

The domain name.

DataInterval String 300

The time interval between the entries returned. Unit: seconds.

UsageDataPerInterval Array of DataModule

The resource usage data that was collected for each time interval.

DataModule
Value String 423304182

The amount of resource usage.

  • If the value of the Field parameter is traf or req_traf, the returned data is measured in bytes.
  • If the value of the Field parameter is bps or req_bps, the returned data is measured in bit/s.
  • If the value of the Field parameter is acc, the returned data is measured by count.
TimeStamp String 2015-12-10T20:00:00Z

The timestamp of the data returned. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Examples

Sample requests

http://live.aliyuncs.com/?Action=DescribeDomainUsageData&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T21:00:00Z
&Type=all
&Area=CN
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDomainUsageDataResponse>
    <DomainName>example.com</DomainName>
    <DataInterval>300</DataInterval>
    <UsageDataPerInterval>
        <DataModule>
            <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
            <Value>423304182</Value>
        </DataModule>
        <DataModule>
            <TimeStamp>2015-12-10T20:05:00Z</TimeStamp>
            <Value>454680793</Value>
        </DataModule>
        <DataModule>
            <TimeStamp>2015-12-10T20:10:00Z</TimeStamp>
            <Value>501718342</Value>
        </DataModule>
        <DataModule>
            <TimeStamp>2015-12-10T20:15:00Z</TimeStamp>
            <Value>434816025</Value>
        </DataModule>
    </UsageDataPerInterval>
    <RequestId>B955107D-E658-4E77-B913-E0AC3D31693E</RequestId>
    <StartTime>2015-12-10T20:00Z</StartTime>
    <EndTime>2015-12-10T21:00Z</EndTime>
    <Area>CN</Area>
    <Type>all</Type>
</DescribeDomainUsageDataResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DomainName" : "example.com",
  "DataInterval" : "300",
  "UsageDataPerInterval" : {
    "DataModule" : [ {
      "TimeStamp" : "2015-12-10T20:00:00Z",
      "Value" : "423304182"
    }, {
      "TimeStamp" : "2015-12-10T20:05:00Z",
      "Value" : "454680793"
    }, {
      "TimeStamp" : "2015-12-10T20:10:00Z",
      "Value" : "501718342"
    }, {
      "TimeStamp" : "2015-12-10T20:15:00Z",
      "Value" : "434816025"
    } ]
  },
  "RequestId" : "B955107D-E658-4E77-B913-E0AC3D31693E",
  "StartTime" : "2015-12-10T20:00Z",
  "EndTime" : "2015-12-10T21:00Z",
  "Area" : "CN",
  "Type" : "all"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvaildParameter Invalid Parameter One or more request parameters are invalid.
400 InvalidStartTime.Malformed Specified StartTime is malformed. The format of the start time is invalid. Check whether the value of the StartTime parameter is valid.
400 InvalidEndTime.Malformed Specified EndTime is malformed. The format of the end time is invalid. Check whether the value of the EndTime parameter is valid.
400 InvalidStartTime.ValueNotSupported The specified value of parameter StartTime is not supported. The value specified for the StartTime parameter is invalid.
400 InvalidTime.Malformed Specified Time is malformed. The format of the specified time is invalid. Check whether the specified time is valid.
400 InvalidParameterField The specified Field is invalid. The value of the Field parameter is invalid. Specify a valid value.
400 InvalidParameterType The specified Type is invalid. The value of the Type parameter is invalid. Specify a valid value.
400 InvalidEndTime.Mismatch Specified end time does not math the specified start time. The end time does not match the start time. Check whether the value of the EndTime parameter matches.
400 InvalidTimeSpan The time span exceeds the limit. The time range exceeds the limit. Configure a valid time range to query.

For a list of error codes, see Service error codes.

Special error codes

Error code

Error message

HTTP status code

Description

Throttling

Request was denied due to request throttling.

503

The request was denied due to traffic throttling.

IllegalOperation

Illegal domain, operation is not permitted.

403

The domain name is invalid.

OperationDenied

Your account does not open Live service yet.

403

ApsaraVideo Live is not activated.

OperationDenied

Your Live service is suspended.

403

ApsaraVideo Live is suspended.

InvalidDomain.NotFound

The domain provided does not belong to you.

404

The domain name does not exist or does not belong to your account.

InvalidDomain.Offline

The domain provided is offline.

404

The domain name is disabled.

ServiceBusy

The specified Domain is configuring, please retry later.

403

The domain name is being configured. Try again later.

InvalidDomain.Configure_failed

Failed to configure the provided domain.

500

The domain name failed to be configured.

InvalidParameter

Invalid Parameter.

400

One or more parameters are invalid.

InvalidParameterProduct

Invalid Parameter Product.

400

The value of the Product parameter is invalid.

InvalidParameterArea

Invalid Parameter Area.

400

The value of the Area parameter is invalid.

InvalidParameterField

Invalid Parameter Field.

400

The value of the Field parameter is invalid.

InvalidParameterStartTime

Invalid Parameter StartTime.

400

The value of the StartTime parameter is invalid.

InvalidParameterEndTime

Invalid Parameter EndTime.

400

The value of the EndTime parameter is invalid.

InvalidTimeRange

StartTime and EndTime range should less than 1 month.

400

The time range that is specified by the StartTime and EndTime parameters exceeds 31 days.

InvalidParameterInterval

Invalid Parameter Interval.

400

The value of the Interval parameter is invalid.