Content is empty
If you don't find the content you expect, please try another search term
Last updated:2021-07-16 15:32:00
You can call this operation to query the summary of the monthly bill by product or project.
Note: You can query the summary only of bills that are generated after June 2018.
Parameter | Type | Required | Length (number of characters) | Format | Description |
---|---|---|---|---|---|
Action | String | Yes | Fixed value | The operation that you want to perform. Set the value to GetMonthBill . |
|
Version | String | Yes | Fixed value | The version number of the API operation. Set the value to 2018-06-01 . |
|
BillStartMonth | String | Yes | YYYY-MM |
The start month of the bill. This parameter is required. | |
BillEndMonth | String | Yes | The end month of the bill. This parameter is required. |
Parameter | Type | Description |
---|---|---|
RequestId | String | The ID of the request. |
MonthBillSet | MonthBill array | The summary of the monthly bill. |
Error code | Error message | HTTP status code | Description |
---|---|---|---|
InvalidParameter | There is one or more invalid parameter(%s)." | 400 | The error message returned because the %s parameter is invalid. For more information about the parameter, see %s. |
Forbidden Request | user %s forbidden request this api" | 400 | The error message returned because the user denies the API request. For more information about the user ID, see %s. |
Server unavailable | Server error | 500 | The error message returned because exceptions occur on the backend server. |
In the following example, the summary of the bill that is generated in June 2018 is queried.
https://bill.api.ksyun.com/?Action=GetMonthBill
&Version=2018-06-01
&BillStartMonth=2018-06
&BillEndMonth=2018-06
&Common request parameters
<GetMonthBillResponse>
<RequestId>ca3f8cae-1282-4a48-81ae-3e19b00e3c3a</RequestId>
<MonthBillSet>
<Item>
<BillProductSet>
<Item>
<code>KEC</code>
<Cost>66.0</Cost>
<Name>KEC</Name>
</Item>
<Item>
<code>KRDS</code>
<Cost>174.0</Cost>
<Name>KRDS</Name>
</Item>
<Item>
<code>Redis</code>
<Cost>101.25</Cost>
<Name>Kingsoft Cloud Redis</Name>
</Item>
<Item>
<code>KS3</code>
<Cost>0.0</Cost>
<Name>KS3</Name>
</Item>
</BillProductSet>
<BillProjectSet>
<ProjectItem>
<Id>0</Id>
<Cost>341.25</Cost>
<details>
<details>
<code>KEC</code>
<Cost>66.0</Cost>
<Name>KEC</Name>
</details>
<details>
<code>KRDS</code>
<Cost>174.0</Cost>
<Name>KRDS</Name>
</details>
<details>
<code>Redis</code>
<Cost>101.25</Cost>
<Name>Kingsoft Cloud Redis</Name>
</details>
<details>
<code>KS3</code>
<Cost>0.0</Cost>
<Name>KS3</Name>
</details>
</details>
<Name>Default project</Name>
</ProjectItem>
</BillProjectSet>
<BillMonth>2018-06</BillMonth>
<Sum>341.25</Sum>
<BillId>KSYZD0073400575201806</BillId>
<BillType>postpay</BillType>
</Item>
</MonthBillSet>
</GetMonthBillResponse>
{
"RequestId": "9a12cb1f-85bc-4a69-a4f5-5f669f22d8eb",
"MonthBillSet": [
{
"BillProductSet": [
{
"Code": "KEC",
"Cost": 66,
"Name": "KEC"
},
{
"Code": "KRDS",
"Cost": 174,
"Name": "KRDS"
},
{
"Code": "Redis",
"Cost": 101.25,
"Name": "Kingsoft Cloud Redis"
},
{
"Code": "KS3",
"Cost": 0,
"Name": "KS3"
}
],
"BillProjectSet": [
{
"Id": 0,
"Cost": 341.25,
"Details": [
{
"Code": "KEC",
"Cost": 66,
"Name": "KEC"
},
{
"Code": "KRDS",
"Cost": 174,
"Name": "KRDS"
},
{
"Code": "Redis",
"Cost": 101.25,
"Name": "Kingsoft Cloud Redis"
},
{
"Code": "KS3",
"Cost": 0,
"Name": "KS3"
}
],
"Name": "Default project"
}
],
"BillMonth": "2018-06",
"Sum": 341.25,
"BillId": "KSYZD0073400575201806",
"BillType": "postpay"
}
]
}
Pure Mode