All Products
Search
Document Center

ApsaraVideo Live:DescribeDomainUsageData

Last Updated:Dec 12, 2024

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

Operation description

  • You can query the resource usage data of up to 100 domain names at a time. Separate multiple 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 granularityMaximum time range per queryHistorical data availableData delay
5 minutes3 days93 days15 minutes
1 hour31 days186 days4 hours
1 day90 days366 days04: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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
live:DescribeDomainUsageDataget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringNo

The domain name.

  • You can query one or more domain names. If you specify multiple domain names, separate them with commas (,).
  • If you leave this parameter empty, the data of all domain names within your Alibaba Cloud account is returned.
example.com
StartTimestringYes

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.

2015-12-10T20:00:00Z
EndTimestringYes

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 you can specify is 31 days.

2015-12-10T21:00:00Z
TypestringNo

The type of the resource usage data to query.

Valid values if you set Field 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 Field to req_traf or req_bps:

  • push: stream ingest bandwidth or traffic
  • push_proxy: stream relay bandwidth or traffic
Enumeration Value:
  • static
  • dynamic
  • quic
  • rts
  • push
  • normal
  • all
  • push_proxy
all
FieldstringYes

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 Type to push, or stream relay traffic if you set Type to push_proxy
  • req_bps: stream ingest bandwidth if you set Type to push, or stream relay bandwidth if you set Type to push_proxy
traf
AreastringNo

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.
CN
DataProtocolstringNo

The protocol of the data to query. Valid values:

  • http: HTTP
  • https: HTTPS
  • quic: QUIC
  • all (default): HTTP, HTTPS, and QUIC
all
IntervalstringNo

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

300
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

ParameterTypeDescriptionExample
object
EndTimestring

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

2015-12-10T21:00Z
Typestring

The type of the resource usage data.

all
StartTimestring

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

2015-12-10T20:00Z
RequestIdstring

The ID of the request.

B955107D-E658-4E77-B913-E0AC3D31693E
Areastring

The billable region where the resource usage data was generated.

CN
DomainNamestring

The domain name.

example.com
DataIntervalstring

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

300
UsageDataPerIntervalarray<object>

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

DataModuleobject
Valuestring

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.
423304182
TimeStampstring

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

2015-12-10T20:00:00Z

Special error codes

Error codeError messageHTTP status codeDescription
ThrottlingRequest was denied due to request throttling.503The error message returned because the request was denied due to throttling.
IllegalOperationIllegal domain, operation is not permitted.403The error message returned because the domain name is invalid.
OperationDeniedYour account does not open Live service yet.403The error message returned because ApsaraVideo Live is not activated.
OperationDeniedYour Live service is suspended.403The error message returned because ApsaraVideo Live is suspended.
InvalidDomain.NotFoundThe domain provided does not belong to you.404The error message returned because the domain name does not exist or does not belong to your account.
InvalidDomain.OfflineThe domain provided is offline.404The error message returned because the domain name is disabled.
ServiceBusyThe specified Domain is configuring, please retry later.403The error message returned because the domain name is being configured. Try again later.
InvalidDomain.Configure_failedFailed to configure the provided domain.500The error message returned because the domain name failed to be configured.
InvalidParameterInvalid Parameter.400The error message returned because one or more parameters are invalid.
InvalidParameterProductInvalid Parameter Product.400The error message returned because the value of the Product parameter is invalid.
InvalidParameterAreaInvalid Parameter Area.400The error message returned because the value of the Area parameter is invalid.
InvalidParameterFieldInvalid Parameter Field.400The error message returned because the value of the Field parameter is invalid.
InvalidParameterStartTimeInvalid Parameter StartTime.400The error message returned because the value of the StartTime parameter is invalid.
InvalidParameterEndTimeInvalid Parameter EndTime.400The error message returned because the value of the EndTime parameter is invalid.
InvalidTimeRangeStartTime and EndTime range should less than 1 month.400The error message returned because the time range that is specified by the StartTime and EndTime parameters exceeds 31 days.
InvalidParameterIntervalInvalid Parameter Interval.400The error message returned because the value of the Interval parameter is invalid.

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvaildParameterInvalid ParameterInvalid request parameter.
400InvalidStartTime.MalformedSpecified StartTime is malformed.-
400InvalidEndTime.MalformedSpecified EndTime is malformed.-
400InvalidStartTime.ValueNotSupportedThe specified value of parameter StartTime is not supported.The value specified for the StartTime parameter is invalid.
400InvalidTime.MalformedSpecified Time is malformed.Invalid time. Check whether the time that you specified is correct.
400InvalidParameterFieldThe specified Field is invalid.The Field parameter is set to an invalid value.
400InvalidParameterTypeThe specified Type is invalid.The Type parameter is set to an invalid value.
400InvalidEndTime.MismatchSpecified end time does not math the specified start time.The end time does not match the start time. Make sure that the start and end times match.
400InvalidTimeSpanThe time span exceeds the limit.The time span exceeds the limit. Please refer to the API documentation to specify a reasonable time span.

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

Change history

Change timeSummary of changesOperation
2024-09-29API Description Update. The Error code has changedView Change Details
2023-07-27The Error code has changedView Change Details