DescribeInstanceAmortizedCostByConsumePeriod
Queries the monthly amortized costs of instances by billing cycle.
Operation description
Amortized costs are not used as the basis for settlement and reconciliation. Amortized costs provide the cost allocation capability, which allocates the costs incurred on the cloud (including subscription and pay-as-you-go costs) according to specified allocation rules.
The final data for the current month is available after 12:00 on the 6th day of the following month. During the month, a few scenarios may occur, including but not limited to delayed billing, refunds, account adjustments, and overdue payment write-offs. The data for the current month does not include unsettled (unbilled or accumulating) pay-as-you-go data.
Amortized cost data is available for the last 12 months.
Data related to attached resources in amortized costs is updated 48 hours after the split bill data is generated. If you need to use split costs, activate Split Bill in advance. Data not related to attached resources is updated 48 hours after the detailed bill is generated.
Amortized costs before August 2021 (exclusive) are not updated during the month. They are updated uniformly after 12:00 on the 6th day of the month following the amortization month. Additionally, specific costs for each attached resource (such as domain names, buckets, and EIPs) of split cloud services (such as CDN, OSS, and Internet Shared Bandwidth) are not supported.
Amortized cost data is available only after you activate Amortized Costs. The data is available 48 hours after activation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bssapi:DescribeCostBill |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| BillingCycle |
string |
Yes |
The billing cycle. Format: YYYY-MM. |
2022-10 |
| AmortizationPeriodFilter |
array |
No |
The filter for the amortization month. Maximum number of elements: 10. |
|
|
string |
No |
The amortization month. Format: YYYY-MM. |
2022-09 |
|
| SubscriptionType |
string |
No |
The subscription type. Valid values:
|
Subscription |
| ProductCode |
string |
No |
The product code. You can obtain the value from the following operations:
|
rds |
| ProductDetail |
string |
No |
The product detail. |
rds |
| CostUnitCode |
string |
No |
The code of the cost unit. |
123# |
| BillUserIdList |
array |
No |
The filter for the bill purchaser ID, which is the RAM user ID. Specify this parameter to view the bills of RAM users. If you leave this parameter empty, the bills of the current account and all its RAM users are queried by default. Maximum number of elements: 10. |
|
|
string |
No |
The bill purchaser ID. |
123 |
|
| BillOwnerIdList |
array |
No |
The filter for the resource ownership account. The resource ownership account ID. The resource ownership account is the account that actually uses the resources. Maximum number of elements: 10. |
|
|
string |
No |
The resource ownership account ID. |
123 |
|
| InstanceIdList |
array |
No |
The filter for the instance ID. You can query multiple instances. If you do not specify this parameter, all instances are queried by default. Maximum number of elements: 10. |
|
|
string |
No |
The instance ID. |
abc |
|
| NextToken |
string |
No |
The token that specifies the position where the current call starts to read. The value must be empty or set to the NextToken value returned in the previous response. Otherwise, an error occurs. An empty value indicates that the read starts from the beginning. |
CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U |
| MaxResults |
integer |
No |
The maximum number of data records to read in the current call. Default value: 20. Maximum value: 300. |
20 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BssResult |
||
| Code |
string |
The status code. |
200 |
| Data |
object |
The returned data. |
|
| AccountID |
string |
The account ID. |
185766xxxx |
| AccountName |
string |
The user account. |
test@test.aliyunid.com |
| Items |
array<object> |
The data entries. |
|
|
object |
The data item. |
||
| AfterDiscountAmount |
number |
The amount after discount. |
0 |
| AmortizationPeriod |
string |
The amortization month. Format: YYYYMM. |
202210 |
| AmortizationStatus |
string |
The amortization status. Valid values:
|
amortized |
| BillAccountID |
integer |
The ID of the account to which the bill belongs. |
185xxxxx489 |
| BillAccountName |
string |
The name of the account to which the bill belongs. |
test@test.aliyunid.com |
| BillOwnerID |
integer |
The resource ownership account ID. |
185xxxxx489 |
| BillOwnerName |
string |
The name of the account to which the resource belongs. |
test@test.aliyunid.com |
| BizType |
string |
The business type. |
trusteeship |
| ConsumePeriod |
string |
The billing cycle. Format: YYYYMM. |
202210 |
| CostUnit |
string |
The cost unit. |
Unallocated |
| CostUnitCode |
string |
The code of the cost unit. |
1234 |
| CurrentAmortizationAfterDiscountAmount |
number |
The current amortization amount after discount. |
0 |
| CurrentAmortizationDeductedByCashCoupons |
number |
The current amortization amount deducted by cash coupons. |
0 |
| CurrentAmortizationDeductedByCoupons |
number |
The current amortization amount deducted by coupons. |
0 |
| CurrentAmortizationDeductedByPrepaidCard |
number |
The current amortization amount paid by prepaid cards. |
0 |
| CurrentAmortizationExpenditureAmount |
number |
The current amortization expenditure amount that can be invoiced. |
0 |
| CurrentAmortizationInvoiceDiscount |
number |
The current amortization discount amount. |
0 |
| CurrentAmortizationPretaxAmount |
number |
The current amortization payable amount. |
0 |
| CurrentAmortizationPretaxGrossAmount |
number |
The current amortization list price. |
0 |
| CurrentAmortizationRoundDownDiscount |
number |
The current amortization round-down discount amount. |
0 |
| DeductedByCashCoupons |
number |
The amount deducted by cash coupons. |
0 |
| DeductedByCoupons |
number |
The amount deducted by coupons. |
0 |
| DeductedByPrepaidCard |
number |
The amount paid by prepaid cards. |
0 |
| ExpenditureAmount |
number |
The expenditure amount that can be invoiced. |
0 |
| InstanceID |
string |
The instance ID. |
i-kjhdskjgshfdlkjfdh |
| InternetIP |
string |
The public IP address. |
34.xx.x.x |
| IntranetIP |
string |
The internal IP address. |
192.xx.xx.xx |
| InvoiceDiscount |
number |
The discount amount. |
0 |
| PretaxAmount |
number |
The payable amount. |
0 |
| PretaxGrossAmount |
number |
The list price. |
0 |
| PreviouslyAmortizedAfterDiscountAmount |
number |
The previously amortized amount after discount. |
0 |
| PreviouslyAmortizedDeductedByCashCoupons |
number |
The previously amortized amount deducted by cash coupons. |
0 |
| PreviouslyAmortizedDeductedByCoupons |
number |
The previously amortized amount deducted by coupons. |
0 |
| PreviouslyAmortizedDeductedByPrepaidCard |
number |
The previously amortized amount paid by prepaid cards. |
0 |
| PreviouslyAmortizedExpenditureAmount |
number |
The previously amortized expenditure amount that can be invoiced. |
0 |
| PreviouslyAmortizedInvoiceDiscount |
number |
The previously amortized discount amount. |
0 |
| PreviouslyAmortizedPretaxAmount |
number |
The previously amortized payable amount. |
0 |
| PreviouslyAmortizedPretaxGrossAmount |
number |
The previously amortized list price. |
0 |
| PreviouslyAmortizedRoundDownDiscount |
number |
The previously amortized round-down discount amount. |
0 |
| ProductCode |
string |
The product code. |
rds |
| ProductDetail |
string |
The product detail. |
ApsaraDB RDS |
| ProductDetailCode |
string |
The product detail code. |
rds |
| ProductName |
string |
The product name. |
ApsaraDB RDS |
| Region |
string |
The region. |
Hangzhou |
| RemainingAmortizationAfterDiscountAmount |
number |
The remaining amortization amount after discount. |
0 |
| RemainingAmortizationDeductedByCashCoupons |
number |
The remaining amortization amount deducted by cash coupons. |
0 |
| RemainingAmortizationDeductedByCoupons |
number |
The remaining amortization amount deducted by coupons. |
0 |
| RemainingAmortizationDeductedByPrepaidCard |
number |
The remaining amortization amount paid by prepaid cards. |
0 |
| RemainingAmortizationExpenditureAmount |
number |
The remaining amortization expenditure amount that can be invoiced. |
0 |
| RemainingAmortizationInvoiceDiscount |
number |
The remaining amortization discount amount. |
0 |
| RemainingAmortizationPretaxAmount |
number |
The remaining amortization payable amount. |
0 |
| RemainingAmortizationPretaxGrossAmount |
number |
The remaining amortization list price. |
0 |
| RemainingAmortizationRoundDownDiscount |
number |
The remaining amortization round-down discount amount. |
0 |
| ResourceGroup |
string |
The resource group. |
Default resource group |
| RoundDownDiscount |
number |
The round-down discount amount. |
0 |
| SplitAccountName |
string |
The name of the account to which the attached resource belongs. |
test**1122 |
| SplitItemID |
string |
The ID of the attached resource. |
i-28bycvyb4 |
| SplitItemName |
string |
The name of the attached resource. |
iZ28bycvyb4Z |
| SplitProductDetail |
string |
The product detail name of the attached resource. |
rds |
| SubscriptionType |
string |
The subscription type. Valid values:
|
PayAsYouGo |
| Tag |
string |
The instance tag. |
tag |
| Zone |
string |
The zone. |
Hangzhou Zone 1 |
| MaxResults |
integer |
The maximum number of entries returned for the current request. |
100 |
| NextToken |
string |
The token that specifies the position where the current call starts to read. The value must be empty or set to the NextToken value returned in the previous response. Otherwise, an error occurs. An empty value indicates that the read starts from the beginning. |
CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U |
| TotalCount |
integer |
The total number of entries. |
100 |
| Message |
string |
The message. |
Successful! |
| RequestId |
string |
The request ID. |
79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
| Success |
boolean |
Indicates whether the request is successful. |
true |
Examples
Success response
JSON format
{
"Code": "200",
"Data": {
"AccountID": "185766xxxx\n",
"AccountName": "test@test.aliyunid.com\n",
"Items": [
{
"AfterDiscountAmount": 0,
"AmortizationPeriod": "202210",
"AmortizationStatus": "amortized",
"BillAccountID": 0,
"BillAccountName": "test@test.aliyunid.com\n",
"BillOwnerID": 0,
"BillOwnerName": "test@test.aliyunid.com\n",
"BizType": "trusteeship",
"ConsumePeriod": "202210",
"CostUnit": "未分配\n",
"CostUnitCode": "1234",
"CurrentAmortizationAfterDiscountAmount": 0,
"CurrentAmortizationDeductedByCashCoupons": 0,
"CurrentAmortizationDeductedByCoupons": 0,
"CurrentAmortizationDeductedByPrepaidCard": 0,
"CurrentAmortizationExpenditureAmount": 0,
"CurrentAmortizationInvoiceDiscount": 0,
"CurrentAmortizationPretaxAmount": 0,
"CurrentAmortizationPretaxGrossAmount": 0,
"CurrentAmortizationRoundDownDiscount": 0,
"DeductedByCashCoupons": 0,
"DeductedByCoupons": 0,
"DeductedByPrepaidCard": 0,
"ExpenditureAmount": 0,
"InstanceID": "i-kjhdskjgshfdlkjfdh\n",
"InternetIP": "34.xx.x.x\n",
"IntranetIP": "192.xx.xx.xx\n",
"InvoiceDiscount": 0,
"PretaxAmount": 0,
"PretaxGrossAmount": 0,
"PreviouslyAmortizedAfterDiscountAmount": 0,
"PreviouslyAmortizedDeductedByCashCoupons": 0,
"PreviouslyAmortizedDeductedByCoupons": 0,
"PreviouslyAmortizedDeductedByPrepaidCard": 0,
"PreviouslyAmortizedExpenditureAmount": 0,
"PreviouslyAmortizedInvoiceDiscount": 0,
"PreviouslyAmortizedPretaxAmount": 0,
"PreviouslyAmortizedPretaxGrossAmount": 0,
"PreviouslyAmortizedRoundDownDiscount": 0,
"ProductCode": "rds",
"ProductDetail": "云数据库RDS\t\n",
"ProductDetailCode": "rds\n",
"ProductName": "云数据库RDS\n",
"Region": "杭州",
"RemainingAmortizationAfterDiscountAmount": 0,
"RemainingAmortizationDeductedByCashCoupons": 0,
"RemainingAmortizationDeductedByCoupons": 0,
"RemainingAmortizationDeductedByPrepaidCard": 0,
"RemainingAmortizationExpenditureAmount": 0,
"RemainingAmortizationInvoiceDiscount": 0,
"RemainingAmortizationPretaxAmount": 0,
"RemainingAmortizationPretaxGrossAmount": 0,
"RemainingAmortizationRoundDownDiscount": 0,
"ResourceGroup": "默认资源组\t\n",
"RoundDownDiscount": 0,
"SplitAccountName": "test**1122\n",
"SplitItemID": "i-28bycvyb4\n",
"SplitItemName": "iZ28bycvyb4Z\n",
"SplitProductDetail": "rds",
"SubscriptionType": "PayAsYouGo",
"Tag": "tag",
"Zone": "杭州1\n"
}
],
"MaxResults": 100,
"NextToken": "CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U\n",
"TotalCount": 100
},
"Message": "Successful!\n",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F\n",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NotActiveService | You are not active Amotized Cost ,please use after activation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.