此操作用来查询收费容量。用户可以根据需求,查询指定存储桶、指定数据位置、指定存储类型的容量。
请求参数
名称 | 描述 | 是否必须 |
---|---|---|
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, 18 Nov 2020 06:39:27 GMT
Content-Length:120
Server: CTYUN
<GetBilledStorageUsageResponse>
<Account>test@ctyun.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>