Domain name for API request: billing.tencentcloudapi.com.
This API is used to query COS usage details.
A maximum of 5 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeDosageCosDetailByDate. |
Version | Yes | String | Common Params. The value used for this API: 2018-07-09. |
Region | No | String | Common Params. This parameter is not required. |
StartDate | Yes | String | The start date of the usage query, such as 2020-09-01 . |
EndDate | Yes | String | The end date of the usage query (end date must be in the same month as the start date), such as 2020-09-30 . |
BucketName | Yes | String | Bucket name. You can use Get Service to query the list of all buckets under a requester account. For details, see GET Service (List Buckets). |
Parameter Name | Type | Description |
---|---|---|
DetailSets | Array of CosDetailSets | Array of usage |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to query COS usage details.
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDosageCosDetailByDate
<Common request parameters>
{
"StartDate": "2020-09-01",
"EndDate": "2020-09-30",
"BucketName": "systemcover-xxxx"
}
{
"Response": {
"DetailSets": [
{
"DosageValue": "0.00976562",
"DosageBeginTime": "2020-09-01 00:00:00",
"DosageEndTime": "2020-09-01 23:59:59",
"BucketName": "systemcover-xxxx",
"SubProductCodeName": "COS STANDARD storage",
"BillingItemCodeName": "COS STANDARD storage capacity",
"Unit": "(GB)"
},
{
"DosageValue": "0.00976562",
"DosageBeginTime": "2020-09-02 00:00:00",
"DosageEndTime": "2020-09-02 23:59:59",
"BucketName": "systemcover-xxxx",
"SubProductCodeName": "COS STANDARD storage",
"BillingItemCodeName": "COS STANDARD storage capacity",
"Unit": "(GB)"
}
],
"RequestId": "4c714162-6ffb-4666-afc7-33b2585b86ab"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InternalError.GatewayError | Gateway error. |
Was this page helpful?