GetBilledStorageUsage
更新時間 2025-10-10 15:40:15
最近更新時間: 2025-10-10 15:40:15
分享文章
本節主要介紹GetBilledStorageUsage。
此操作用來查詢收費容量。用戶可以根據需求,查詢指定存儲桶、指定數據位置、指定存儲類型的容量。
請求參數
| 名稱 | 描述 | 是否必須 |
|---|---|---|
| Action | GetBilledStorageUsage。 | 是 |
| BeginDate | 指定查詢容量的起始時間,統計數據的起始時間為開始日期(時區為:UTC+8)的00:00。 類型:Time 取值:格式為yyyy-MM-dd。 | 是 |
| EndDate | 指定查詢容量的結束時間,返回數據的時間為當天日期(時區為:UTC+8)的最后一個數據。 類型:Time 取值:格式為yyyy-MM-dd。EndDate不能早于BeginDate。 說明
| 是 |
| StorageClass | 指定查詢的存儲類型。 類型:Enum 取值:
默認值為ALL。 | 否 |
| Bucket | 指定查詢收費容量的Bucket名稱。如果不指定Bucket名稱,則表示查詢賬戶下所有Bucket的收費容量之和。 類型:字符串 取值:3~63個字符,只能由小寫字母、數字、短橫線(-)和點(.)組成。 | 否 |
| Region | 指定查詢收費容量的數據位置。如果不指定數據位置名稱,則表示查詢賬戶下所有數據位置的收費容量之和。 類型:字符串 取值:
| 否 |
| Freq | 指定返回統計數據的采樣粒度。 類型:Enum 取值:
默認值為byHour。 | 否 |
響應結果
| 名稱 | 描述 |
|---|---|
| Account | 發出請求的賬戶名。 |
| UserName | 發出請求的用戶名。如果根用戶發送的該請求,則UserName為root。 |
| StorageClass | 存儲類型:
|
| TimeZone | 返回數據的時區,統一為UTC +0800。 |
| Freq | 返回統計數據的采樣粒度:
|
| BucketName | Bucket名字。如果用戶在請求中沒有攜帶Bucket參數,BucketName為空。 |
| RegionName | 數據位置,如果用戶在請求中沒有攜帶Region參數,RegionName為空。 |
| Statistics.Date | 返回結果對應的時間:
|
| Statistics.Standard.BilledStorage.BilledStorageUsage | 標準存儲數據收費容量,單位是Byte。 |
| Statistics.Standard.BilledStorage.RemainderChargeStorageUsage | 標準存儲數據補齊容量(時長補齊和大小補齊容量的和值),值為0。 |
| Statistics.Standard.BilledStorage.RemainderChargeOfDuration | 標準存儲數據存儲時長補齊容量,值為0。 |
| Statistics.Standard.BilledStorage.RemainderChargeOfSize | 標準存儲數據大小補齊容量,值為0。 |
| Statistics.Standard_ia.BilledStorage.BilledStorageUsage | 低頻訪問存儲數據收費容量,單位是Byte。 |
| Statistics.Standard_ia.BilledStorage.RemainderChargeStorageUsage | 低頻訪問存儲數據補齊容量(時長補齊和大小補齊容量的和值),單位是Byte。 |
| Statistics.Standard_ia.BilledStorage.RemainderChargeOfDuration | 低頻訪問存儲數據時長補齊容量,單位是Byte。 |
| Statistics.Standard_ia.BilledStorage.RemainderChargeOfSize | 低頻訪問存儲數據大小補齊容量,單位是Byte。 |
請求示例
按天(byDay)查詢所有存儲桶、所有地域2020-11-17所有存儲類型的收費容量。
GET/?Action=GetBilledStorageUsage&BeginDate=2020-11-17&EndDate=2020-11-17&Freq=byDay HTTP/1.1
Date: Wed, 18 Nov 2020 06:38:27 GMT
Authorization: SignatureValue
Host: oos-cn-mg.ctyunapi.cn響應示例
HTTP/1.1 200 OK
x-amz-request-id: 236A8905248E5A01
Date: Wed, 18Nov 2020 06:39:27 GMT
Content-Length:120
Server: CTYUN
<GetBilledStorageUsageResponse>
<Account>test@daliqc.cn</Account>
<UserName>root</UserName>
<StorageClass>ALL</StorageClass>
<TimeZone>UTC +0800</TimeZone>
<Freq>byDay</Freq>
<BucketName></BucketName>
<RegionName> </RegionName>
<Statistics>
<Date>2020-11-17</Date>
<Standard_ia>
<BilledStorage>
<BilledStorageUsage>40048</BilledStorageUsage>
<RemainderChargeStorageUsage>30046</RemainderChargeStorageUsage>
<RemainderChargeOfDuration>20029</RemainderChargeOfDuration>
<RemainderChargeOfSize>10017</RemainderChargeOfSize>
</BilledStorage>
</Standard_ia>
<Standard>
<BilledStorage>
<BilledStorageUsage>10002</BilledStorageUsage>
<RemainderChargeStorageUsage>0</RemainderChargeStorageUsage>
<RemainderChargeOfDuration>0</RemainderChargeOfDuration>
<RemainderChargeOfSize>0</RemainderChargeOfSize>
</BilledStorage>
</Standard>
</Statistics>
</GetBilledStorageUsageResponse>