This topic describes how to call QueryUserOmsData to query Object Storage Service (OSS) billing data generated on an hourly basis.

Request parameters

Parameter Type Required Example Description
Table String Yes OSS The type of report that contains billable items. Valid values:
  • OSS: the OSS billing report that contains basic OSS billable items.
  • OssDataReplication: the OSS billing report that contains billable items that are related to cross-region replication (CRR).
DataType String Yes Hour The unit in which billing data is generated. Unit: hours.
StartTime String Yes 2021-01-22T09:12:43.083Z The start time of the request. Specify the time in the yyyy-mm-ddThh:mm:ssZ format. The time must be in UTC.
EndTime String Yes 2021-01-22T10:12:43.083Z The end time of the request. Specify the time in the yyyy-mm-ddThh:mm:ssZ format. The time must be in UTC.
Maker String No test Specifies the marker after which the returned list begins. By default, if this parameter is not specified, all results are returned.
PageSize Integer No 50 Specifies the number of rows on each returned page for paginating query results.

Valid values: 1 to 200.

Default value: 100.

Response parameters

  • Response parameters in the billing report that contains basic OSS billable items
    Parameter Type Example Description
    HostId String cn The site to which the user belongs. cn indicates the China site (aliyun.com), and intl indicates the International site (alibabacloud.com).
    LessthanMonthDatasize Integer 180 The storage fees charged for the storage usage for Infrequent Access (IA) and Archive objects that are stored for less than the minimum storage duration.
    • Storage usage of IA objects that are stored for less than the minimum storage duration

      If an IA locally redundant storage (LRS) object is deleted after it is stored for less than 30 days (720 hours), the storage fees for the object are charged as it is stored for 30 days, including the remaining duration (720 hours - Actual storage duration).

    • Storage usage of Archive objects that are stored for less than the minimum storage duration

      If an Archive LRS object is deleted after it is stored for less than 60 days (1,440 hours), the storage fees for the object are charged as it is stored for 60 days, including the remaining duration (1,440 hours - Actual storage duration).

    ChargedDatasize Intege 200 The storage usage that is billed based on IA and Archive objects.
    RetrievalData Integer 200 The retrieval of IA data and Archive data.
    • Retrieved IA data

      Fees are charged when IA objects are accessed and billed based on the size of retrieved data.

    • Retrieved Archive data

      Fees are charged when Archive objects are restored and billed based on the size of restored object.

    Bucket String examplebucket The name of the bucket.
    NetworkIn Integer 2000 The traffic generated by the data transmission from the client to OSS over the Internet within the duration of the request. Unit: bytes.
    NetworkOut Integer 2000 The traffic generated by the data transmission from OSS to the client over the Internet within the duration of the request. Unit: bytes.
    PutRequest Integer 1000 The fees charged for the number of PUT requests generated by calling OSS API operations of the PUT type within the duration of the request.
    GetRequest Integer 2000 The fees charged for the number of GET requests generated by calling OSS API operations to send GET requests within the duration of the request.
    ProcessImgSize Integer 200 The fees charged for the size of processed original image. Unit: bytes.
    Storage Integer 2000 The storage usage. Unit: bytes.
    StorageType String Standard The storage class. Valid values:
    • Standard: This storage class is suitable for data that is frequently accessed.
    • IA: This storage class is suitable for long-term storage of data that is infrequently accessed (once or twice each month). Objects of the IA storage class have a minimum storage period of 30 days and a minimum billable size of 64 KB.
    • Archive: This storage class applies to scenarios that store data for a long period of time. Objects of the Archive storage class have a minimum storage period of 60 days and a minimum billable size of 64 KB. You must restore an Archive object before you can access it. The restoration takes about a minute, and you are charged for data retrieval fees.
    • ColdArchive: This storage class is suitable for long-term storage of data that is barely accessed. Objects of the Cold Archive storage class have a minimum storage period of 180 days and a minimum billable size of 64 KB. You must restore an object of the Cold Archive storage class before you can access it. The time required to restore a Cold Archive object depends on the object size and the restore mode. You are charged for data retrieval fees when you restore Cold Archive objects.

    For more information about storage classes, see Overview.

    CAStdRetrievalData Integer 65536 The amount of data retrieved when the restoration of Cold Archive data is complete between 2 and 5 hours based on the standard priority. Unit: bytes.
    CABulkRetrievalData Integer 65536 The amount of data retrieved when the Cold Archive data is restored between 5 and 12 hours based on the bulk priority. Unit: bytes.
    CAHighPriorRetrievalData Integer 65536 The amount of data retrieved when the restoration of Cold Archive data is complete within 1 hour based on the expedited priority. Unit: bytes.
    CdnIn Integer 500 The upstream traffic generated when you access data by using Content Delivery Network (CDN) after the CDN acceleration service is activated.
    CdnOut Integer 500 The downstream traffic generated when you access data by using CDN after CDN is activated, which is also the back-to-origin traffic.
    ProcessI Integer 50 Fees are billed based on the number of images captured by using video snapshot.
    StorageZRS Integer 100 Fees are billed based on the total size and storage duration of Standard zone-redundant storage (ZRS) objects.
    ChargedDatasizeZRS Integer 65536 Fees are billed based on the total size and storage duration of IA ZRS objects.

    IA ZRS objects have a limit on the minimum unit of measurement. Objects that are smaller than 64 KB in size are charged as 64 KB. Objects that are larger than or equal to 64 KB in size are charged based on their actual sizes.

    LessthanMonthDatasizeZRS Integer 700 If an IA ZRS object is deleted after it is stored for less than 30 days (720 hours), the storage fees for the object are charged as it is stored for 30 days, including the remaining duration (720 hours - Actual storage duration).
    AccM2MIn Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and upload data between mainland China regions. Unit: bytes.
    AccM2MOut Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and download data between mainland China regions. Unit: bytes.
    AccM2OIn Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and upload data from regions inside mainland China to regions outside mainland China. Unit: bytes.
    AccM2OOut Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and download data from regions inside mainland China to regions outside mainland China. Unit: bytes.
    AccO2MIn Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and upload data from regions outside mainland China to regions inside mainland China. Unit: bytes.
    AccO2MOut Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and download data from regions outside mainland China to regions inside mainland China. Unit: bytes.
    AccO2OIn Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and upload data between regions outside mainland China. Unit: bytes.
    AccO2OOut Integer 500 The traffic generated when your accelerate endpoint is used to access OSS and download data between regions outside mainland China. Unit: bytes.
    SelectScanSize Integer 300 Fees are billed based on the size of objects scanned by SelectObject.
    TagCount Integer 100 Fees are billed based on the number of object tags in a bucket.
    StartTime String 2021-02-22T09:12:43.083Z The time when billing data starts to be generated. The time follows the yyyy-mm-ddThh:mm:ssZ format. The time must be in UTC.
    EndTime String 2021-02-22T15:12:43.083Z The time when billing data stops to be generated. The time follows the yyyy-mm-ddThh:mm:ssZ format. The time must be in UTC.
  • Response parameters in the OssDataReplication billing report
    Parameter Type Example Description
    HostId String cn The site to which the user belongs. cn indicates the China site (aliyun.com), and intl indicates the International site (alibabacloud.com).
    ProviderId String 26842 The corresponding number of the product supplier. Generally, for the China site (aliyun.com) users, the value of this field is 26842. For the International site (alibabacloud.com) users, the value of this field is 26888.
    UserId String 148562088256**** The UID of the user.
    SourceRegion String oss-cn-hangzhou The region in which the source bucket is located when CRR is used.
    DestRegion String oss-us-west-1 The region in which the destination bucket is located when CRR is used.
    SourceBucket String srcbucket The name of the source bucket.
    DestBucket String destbucket The name of the destination bucket.
    ReplicationDatasize Integer 1000 The size of the data replicated from the source bucket to the destination bucket. Unit: bytes.
    StartTime String 2021-05-22T10:12:43.083Z The time when billing data starts to be generated. The time follows the yyyy-mm-ddThh:mm:ssZ format and must be in UTC.
    EndTime String 2021-05-22T12:12:43.083Z The time when billing data stops to be generated. The time follows the yyyy-mm-ddThh:mm:ssZ format and must be in UTC.

Examples

  • Sample requests
    https://business.aliyuncs.com/?Action=QueryUserOmsData
    &DataType=Hour
    &EndTime=2021-01-22T10:12:43.083Z
    &StartTime=2021-01-22T09:12:43.083Z
    &Table=oss
    &<Common request parameters>
  • Sample responses
    {
        "Data": {
            "OmsData": [
                {
                    "LessthanMonthDatasize": "0",                
                    "RetrievalData": "0",
                    "ChargedDatasize": "0",
                    "Bucket": "examplebucket",
                    "NetworkIn": "2000",
                    "PutRequest": "1000",
                    "NetworkOut": "2000",
                    "GetRequest": "2000",
                    "ProcessImgSize": "200",                
                    "Storage": "2000",
                    "Region": "cn-hangzhou",
                    "ProviderId": "26842",
                    "CdnIn": "500",
                    "EndTime": "2021-05-22T10:12:43.083Z",
                    "StartTime": "2021-05-22T12:12:43.083Z",
                    "StorageType": "standard",
                    "ProcessI": "50",
                    "CdnOut": "500"
                }
            ],
            "HostId": "cn"
        },
        "Message": "Successful!",
        "RequestId": "4C489CA2-5036-4B06-95A9-34AF55FDE1B2",
        "Success": true,
        "Code": "Success"
    }