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

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesQueryUserOmsDataThe operation that you want to perform. Set the value to QueryUserOmsData.
DataTypeStringYesHourThe unit in which billing data is generated. Set the value to Hour.
TableStringYesOSSThe 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 related to cross-region replication (CRR).
  • OssSddpScan: the OSS billing report that contains billable items related to Sensitive Data Discovery and Protection (SDDP).
  • OssCache: the OSS billing report that contains billable items related to the accelerator cache capacity.
StartTimeStringYes2022-12-01T09:12:43ZThe beginning of the time range to query. The time must be in UTC.
EndTimeStringYes2022-12-01T09:13:46ZThe end of the time range to query. The time must be in UTC.
MarkerStringNotestSpecifies that billing data that is alphabetically after the value of Marker is returned. By default, if this parameter is not specified, all billing data is returned.
PageSizeIntegerNo50The number of entries to return on each page.

Valid values: 1 to 200.

Default value: 100.

Note For information about the common request parameters involved in the operation, see Common parameters.

Response parameters

  • Response parameters in the billing report that contains basic OSS billable items
    ParameterTypeExampleDescription
    HostIdStringintlThe site to which the user belongs. Valid value: intl.
    LessthanMonthDatasizeInteger180The billed storage usage of 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).

    ChargedDatasizeInteger200The billed storage usage of IA and Archive objects. Unit: bytes.
    RetrievalDataInteger200The retrieval of IA and Archive objects.
    • Data retrieval of IA objects

      You are charged data retrieval fees based on the size of retrieved IA objects.

    • Data retrieval of Archive objects

      You are charged data retrieval fees based on the size of retrieved Archive objects.

    ChargedDatasizeCAInteger100The billed storage usage of Cold Archive LRS objects. You are charged storage fees for Cold Archive LRS objects based on the total size and storage duration of the objects.
    Important Cold Archive objects have a minimum billable size of 64 KB. Objects that are smaller than 64 KB are charged as 64 KB. Objects that are larger than or equal to 64 KB are charged based on their actual sizes.
    EarlyDeletionCAInteger100The storage usage of Cold Archive objects that are stored for less than the minimum storage duration. If a Cold Archive object is overwritten or deleted after it is stored for less than 180 days (4,320 hours), the storage fees for the object are charged as it is stored for 180 days, including the remaining duration (4,320 hours - Actual storage duration).
    BucketStringexamplebucketThe name of the bucket.
    NetworkInInteger2000The traffic generated by the data transmission from the client to OSS over the Internet within the duration of the request. Unit: bytes.
    NetworkOutInteger2000The traffic generated by the data transmission from OSS to the client over the Internet within the duration of the request. Unit: bytes.
    PutRequestInteger1000The number of complete PUT requests initiated by calling OSS API operations. This is a billable item for API operation fees.
    GetRequestInteger2000The number of complete GET requests initiated by calling OSS API operations. This is a billable item for API operation fees.
    ProcessImgSizeInteger200Fees for processing images. You are charged data processing fees based on the size of the source images. Unit: bytes.
    AdvImageProcLowInteger200The number of times that you use the advanced image compression feature to process images. This is a billable item for data processing fees. The size of images compressed by using advanced image compression is smaller than 800 × 600 pixels.
    AdvImageProcMedInteger200The number of times that you use the advanced image compression feature to process images. This is a billable item for data processing fees. The size of images compressed by using advanced image compression is smaller than 1600 × 1200 pixels.
    StorageInteger2000The billed storage usage of objects whose storage classes are those specified by StorageType. Unit: bytes.
    Note
    • If you call GetBucketInfo by using an endpoint that is not corresponding to the region in which the bucket is located, the value of Storage may be 0.
    • The metered storage usage of IA, Archive, or Cold Archive objects is different from the billed storage usage of these objects. For more information about the billed storage usage of these objects, see the corresponding parameter details.
    StorageTypeStringstandardThe storage class. Valid values:
    • standard: This storage class is suitable for data that is frequently accessed.
    • IA: This storage class is suitable for data that is infrequently accessed, such as once or twice a month. IA objects have a minimum storage period of 30 days and a minimum billable size of 64 KB.
    • archive: This storage class is suitable for data that needs to be stored for a long period of time. Archive objects have a minimum storage period of 60 days and a minimum billable size of 64 KB. Before you can access an Archive object, you must restore the object. The process to restore an Archive object takes approximately 1 minute. You are charged data retrieval fees when you restore an Archive object.
    • coldarchive: This storage class is suitable for data that needs to be stored over an ultra-long period of time. Cold Archive objects have a minimum storage period of 180 days and a minimum billable size of 64 KB. Before you can access a Cold Archive object, you must restore the object. The amount of time required to restore a Cold Archive object varies based on the object size and the restoration mode. You are charged data retrieval fees when you restore a Cold Archive object.
    • standard-zrs: Standard ZRS uses the multi-zone mechanism to distribute user data across three zones in the same region. If one zone becomes unavailable, you can continue to access the data that is stored in the other two zones.
    • IA-zrs: Standard ZRS uses the multi-zone mechanism to distribute user data across three zones in the same region. If one zone becomes unavailable, you can continue to access the data that is stored in the other two zones.

    For more information about storage classes, see Overview.

    CAStdRetrievalDataInteger65536The amount of data retrieved when the Cold Archive data is restored between 2 and 5 hours based on the standard priority. Unit: bytes.
    CABulkRetrievalDataInteger65536The amount of data retrieved when the Cold Archive data is restored between 5 and 12 hours based on the bulk priority. Unit: bytes.
    CAHighPriorRetrievalDataInteger65536The amount of data retrieved when the Cold Archive data is restored within 1 hour based on the expedited priority. Unit: bytes.
    CAStdRetrievalRequestInteger10000The number of requests initiated to restore the Cold Archive data based on the standard priority.
    CABulkRetrievalRequestInteger10000The number of requests initiated to restore the Cold Archive data based on the bulk priority.
    CAHighPriorRetrievalRequestInteger10000The number of requests initiated to restore the Cold Archive data based on the expedited priority.
    CdnInInteger500The upstream traffic generated when you access data by using Content Delivery Network (CDN) after CDN is activated. Unit: GB.
    CdnOutInteger500The downstream traffic generated when you access data by using CDN after CDN is activated. The downstream traffic is also the back-to-origin traffic. Unit: GB.
    ProcessIInteger50The number of images captured by using video snapshots. This is a billable item for image processing fees.
    StorageZRSInteger100The billed storage usage of Standard zone-redundant storage (ZRS) objects. You are charged storage fees for Standard ZRS objects based on the total size and storage duration of the objects.
    ChargedDatasizeZRSInteger65536The billed storage usage of IA ZRS objects. You are charged storage fees for IA ZRS objects based on the total size and storage duration of the objects.

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

    LessthanMonthDatasizeZRSInteger700If 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).
    AccM2MInInteger500The traffic generated when your acceleration endpoint is used to access OSS and upload data between regions inside the Chinese mainland. Unit: bytes.
    AccM2MOutInteger500The traffic generated when your acceleration endpoint is used to access OSS and download data between regions inside the Chinese mainland. Unit: bytes.
    AccM2OInInteger500The traffic generated when your acceleration endpoint is used to access OSS and upload data from regions inside the Chinese mainland to regions outside the Chinese mainland. Unit: bytes.
    AccM2OOutInteger500The traffic generated when your acceleration endpoint is used to access OSS and download data from regions inside the Chinese mainland to regions outside the Chinese mainland. Unit: bytes.
    AccO2MInInteger500The traffic generated when your acceleration endpoint is used to access OSS and upload data from regions outside the Chinese mainland to regions inside the Chinese mainland. Unit: bytes.
    AccO2MOutInteger500The traffic generated when your acceleration endpoint is used to access OSS and download data from regions outside the Chinese mainland to regions inside the Chinese mainland. Unit: bytes.
    AccO2OInInteger500The traffic generated when your acceleration endpoint is used to access OSS and upload data between regions outside the Chinese mainland. Unit: bytes.
    AccO2OOutInteger500The traffic generated when your acceleration endpoint is used to access OSS and download data between regions outside the Chinese mainland. Unit: bytes.
    SelectScanSizeInteger300The size of objects scanned by calling the SelectObject operation. This is a billable item for data processing fees.
    TagCountInteger100The number of object tags in a bucket. You are charged for object tagging based on this billable item.
    StartTimeString2022-12-01T09:12:43ZThe time when billing data starts to be generated. The time is in UTC.
    EndTimeString2022-12-01T09:13:46ZThe time when billing data stops to be generated. The time is in UTC.
  • Response parameters in the OssDataReplication billing report
    ParameterTypeExampleDescription
    HostIdStringcnThe site to which the user belongs. Valid value: intl.
    ProviderIdString26842The ID of the product provider. Valid value: 26888.
    UserIdString148562088256****The UID of the Alibaba Cloud account.
    SourceRegionStringoss-cn-hangzhouThe region in which the source bucket is located when CRR is used.
    DestRegionStringoss-us-west-1The region in which the destination bucket is located when CRR is used.
    SourceBucketStringsrcbucketThe name of the source bucket.
    DestBucketStringdestbucketThe name of the destination bucket.
    ReplicationDatasizeInteger1000The size of the data replicated from the source bucket to the destination bucket. Unit: bytes.
    StartTimeString2022-12-01T09:12:43ZThe time when billing data starts to be generated. The time is in UTC.
    EndTimeString2022-12-01T09:13:46ZThe time when billing data stops to be generated. The time is in UTC.
  • Response parameters in the OssSddpScan billing report
    ParameterTypeExampleDescription
    HostIdStringcnThe site to which the user belongs. Valid value: intl.
    ProviderIdString26842The ID of the product provider. Valid value: 26888.
    UserIdString148562088256****The UID of the Alibaba Cloud account.
    BucketStringexamplebucketThe name of the bucket in which the sensitive data is stored.
    StartTimeString2022-12-01T09:12:43ZThe time when billing data starts to be generated. The time is in UTC.
    EndTimeString2022-12-01T09:13:46ZThe time when billing data stops to be generated. The time is in UTC.
    SddpScanSizeInteger1000The size of data on which Sensitive Data Discovery and Protection (SDDP) is authorized to perform full or incremental scanning. Unit: bytes.
  • Response parameters in the OssCache billing report
    ParameterTypeExampleDescription
    HostIdStringcnThe site to which the user belongs. Valid value: intl.
    ProviderIdString26842The ID of the product provider. Valid value:26888.
    UserIdString148562088256****The UID of the Alibaba Cloud account.
    ZoneStringZone-AThe zone of the accelerator.
    StartTimeString2022-12-01T09:12:43ZThe time when billing data starts to be generated. The time is in UTC.
    EndTimeString2022-12-01T09:13:46ZThe time when billing data stops to be generated. The time is in UTC.
    CacheSizeInteger1000The capacity of the accelerator cache. Unit: bytes.

Examples

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