All Products
Search
Document Center

ApsaraVideo VOD:DescribeVodDomainUsageData

Last Updated:Nov 09, 2022

Queries the traffic or bandwidth data for one or more domain names for CDN.

Operation Description

Note
  • This operation is available only in the China (Shanghai) region.
  • You can specify a maximum of 100 domain names for CDN at a time. Separate them with commas (,). If you do not specify a domain name for CDN, the data of all domain names for CDN within your Alibaba Cloud account is returned.
  • You can query data for the past one year at most and query data for a maximum of three months per request. If you query data for one to three days, the system returns the statistics collected on an hourly basis. If you query data for four days or more, the system returns the statistics collected on a daily basis.
  • Authorization information

    The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

    • 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 keyword: refers to the condition keyword defined by the cloud product itself.
    • 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.
    Operateaccess levelResource typeconditional keywordAssociation operation
    vod:DescribeVodDomainUsageDataRead
    • VOD
      acs:vod:*:{#accountId}:*
      without
    without

    Request parameters

    ParameterTypeRequiredDescriptionExample
    DomainNamestringNo

    The domain name for CDN. If you do not specify this parameter, the merged data of all your domain names for CDN is returned. You can specify multiple domain names. Separate them with commas (,).

    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-10T10:20:00Z
    EndTimestringYes

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

    2015-12-10T12:20:00Z
    TypestringNo

    The type of the content based on which the data is generated. Valid values:

    • static
    • dynamic
    • all
    static
    AreastringNo

    The region where the data is queried. The default value is CN, which indicates mainland China. Valid values:

    • CN: mainland China.
    • OverSeas: outside mainland China.
    CN
    FieldstringYes

    The type of the data to be queried. Valid values:

    • bps: bandwidth.
    • traf: traffic.
    bps

    Response parameters

    ParameterTypeDescriptionExample
    object
    EndTimestring

    The end of the time range in which 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-10T12:20:00Z
    Typestring

    The type of the content based on which the data is generated. Valid values:

    • static
    • dynamic
    • all
    static
    StartTimestring

    The beginning of the time range in which 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-10T10:20:00Z
    RequestIdstring

    The ID of the request.

    B955107D-E658-4E77-****-E0AC3D31693E
    Areastring

    The region where the data was queried.

    CN
    DomainNamestring

    The domain name for CDN.

    example.com
    DataIntervalstring

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

    300
    UsageDataPerIntervalarray

    The details of traffic or bandwidth data.

    object
    Valuestring

    The traffic or bandwidth data. The unit of bandwidth is bit/s.

    2592.3920000000003
    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-10T10:00:00Z

    Example

    Normal return example

    JSONFormat

    {
      "EndTime": "2015-12-10T12:20:00Z",
      "Type": "static",
      "StartTime": "2015-12-10T10:20:00Z",
      "RequestId": "B955107D-E658-4E77-****-E0AC3D31693E",
      "Area": "CN",
      "DomainName": "example.com",
      "DataInterval": "300",
      "UsageDataPerInterval": [
        {
          "Value": "2592.3920000000003",
          "TimeStamp": "2015-12-10T10:00:00Z"
        }
      ]
    }

    Error codes

    For a list of error codes, visit the API error center.

    Common errors

    The following table describes the common errors that this operation can return.

    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 CDN service yet.403The error message returned because Alibaba Cloud CDN has not been activated for your Alibaba Cloud account.
    OperationDeniedYour CDN service is suspended.403The error message returned because Alibaba Cloud CDN has been suspended for your Alibaba Cloud account.
    InvalidDomain.NotFoundThe domain provided does not belong to you.404The error message returned because the specified CDN domain does not exist or does not belong to you.
    InvalidDomain.OfflineThe domain provided is offline.404The error message returned because the domain name has been 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 system failed to configure the domain name.
    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.