Queries the monthly amortized cost of products for a specified month.
Operation description
Amortized costs are for cost allocation purposes only and cannot be used for settlement or reconciliation. This feature allocates your cloud expenses, including both subscription and pay-as-you-go fees, based on specified allocation rules.
The final data for a month is available after 12:00 on the sixth day of the following month. Data for the current month is not final. This is because it does not include unsettled pay-as-you-go fees and may change due to events such as delayed billing, refunds, bill adjustments, and overdue payment write-offs.
Amortized cost data for the past 12 months is available.
Data for attached resources, which requires you to enable split bills, is updated 48 hours after the split bill is generated. Data for other resources is updated 48 hours after the detailed bill is generated.
For months before August 2021, amortized costs were not updated during the month. They were updated only after 12:00 on the sixth day of the following month. In addition, cost details for attached resources, such as domain names, buckets, and EIPs, for products such as CDN, OSS, and Internet Shared Bandwidth are not available for this period.
Amortized cost data becomes available 48 hours after you enable the Amortized Cost feature.
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 amortization month. Format: YYYY-MM. | 2022-10 |
| ConsumePeriodFilter | array | No | The filter for billing cycle months. You can specify a maximum of 10 elements. | |
string | No | The billing cycle month. Format: YYYY-MM. | 2022-09 | |
SubscriptionType | string | No | The subscription type. Valid values:
| Subscription |
ProductCode | string | No | The product code. For more information about how to obtain this parameter, see QueryProductList and DescribeResourcePackageProduct. | rds |
ProductDetail | string | No | The details of the product. | rds |
CostUnitCode | string | No | The code of the cost center. | 123# |
| BillUserIdList | array | No | The IDs of billable accounts. This parameter is used to filter bills by the RAM user who pays for the resources. If you specify this parameter, you can query the bills of the specified RAM user. If you leave this parameter empty, the bills of the current account and all its RAM users are queried. You can specify a maximum of 10 IDs. | |
string | No | The ID of the billable account. | 123 | |
| BillOwnerIdList | array | No | The IDs of resource owners. The resource owner is the account that uses the resources. You can specify a maximum of 10 IDs. | |
string | No | The ID of the resource owner. | abc | |
NextToken | string | No | The token that marks the position to start the query. If you leave this parameter empty, the query starts from the beginning. Set this parameter to the value of NextToken that is returned in the last response to query the next page of results. | CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U |
MaxResults | integer | No | The maximum number of entries to return. Default value: 20. Maximum value: 300. | 20 |
Response elements
Parameter | Type | Description | Example |
object | BssResult | ||
RequestId | string | The ID of the request. | 79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
Success | boolean | Indicates whether the request was successful. | true |
Code | string | The status code. | 200 |
Message | string | The message returned. | Successful! |
| Data | object | The data returned. | |
NextToken | string | The token that is used to query the next page of results. | CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U |
AccountID | string | The ID of the account. | 185766xxxx |
AccountName | string | The name of the account. | test@test.aliyunid.com |
MaxResults | integer | The maximum number of entries returned. | 100 |
TotalCount | integer | The total number of entries. | 100 |
| Items | array<object> | The data entries. | |
object | A data entry. | ||
ConsumePeriod | string | The billing cycle. Format: YYYYMM. | 202210 |
AmortizationStatus | string | The amortization status. Valid values:
| amortized |
AmortizationPeriod | string | The amortization month. Format: YYYYMM. | 202210 |
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 ID of the resource owner. | 185xxxxx489 |
BillOwnerName | string | The name of the resource owner. | test@test.aliyunid.com |
ProductCode | string | The product code. | rds |
ProductName | string | The product name. | ApsaraDB RDS |
ProductDetailCode | string | The code of the product details. | rds |
ProductDetail | string | The details of the product. | ApsaraDB RDS |
BizType | string | The business type. | trusteeship |
SubscriptionType | string | The subscription type. Valid values:
| PayAsYouGo |
PretaxGrossAmount | number | The pretax gross amount. | 0 |
InvoiceDiscount | number | The discount. | 0 |
RoundDownDiscount | number | The amount rounded down. | 0 |
PretaxAmount | number | The pretax 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 card. | 0 |
ExpenditureAmount | number | The expenditure amount. This amount can be invoiced. | 0 |
PreviouslyAmortizedPretaxGrossAmount | number | The pretax gross amount that was amortized before the beginning of the period. | 0 |
PreviouslyAmortizedInvoiceDiscount | number | The discount that was amortized before the beginning of the period. | 0 |
PreviouslyAmortizedRoundDownDiscount | number | The amount rounded down that was amortized before the beginning of the period. | 0 |
PreviouslyAmortizedPretaxAmount | number | The pretax amount that was amortized before the beginning of the period. | 0 |
PreviouslyAmortizedDeductedByCashCoupons | number | The amount deducted by cash coupons that was amortized before the beginning of the period. | 0 |
PreviouslyAmortizedDeductedByCoupons | number | The amount deducted by coupons that was amortized before the beginning of the period. | 0 |
PreviouslyAmortizedDeductedByPrepaidCard | number | The amount paid by prepaid card that was amortized before the beginning of the period. | 0 |
PreviouslyAmortizedExpenditureAmount | number | The expenditure amount that was amortized before the beginning of the period. This amount can be invoiced. | 0 |
CurrentAmortizationPretaxGrossAmount | number | The pretax gross amount that is amortized in the current period. | 0 |
CurrentAmortizationInvoiceDiscount | number | The discount that is amortized in the current period. | 0 |
CurrentAmortizationRoundDownDiscount | number | The amount rounded down that is amortized in the current period. | 0 |
CurrentAmortizationPretaxAmount | number | The pretax amount that is amortized in the current period. | 0 |
CurrentAmortizationDeductedByCashCoupons | number | The amount deducted by cash coupons that is amortized in the current period. | 0 |
CurrentAmortizationDeductedByCoupons | number | The amount deducted by coupons that is amortized in the current period. | 0 |
CurrentAmortizationDeductedByPrepaidCard | number | The amount paid by prepaid card that is amortized in the current period. | 0 |
CurrentAmortizationExpenditureAmount | number | The expenditure amount that is amortized in the current period. This amount can be invoiced. | 0 |
RemainingAmortizationPretaxGrossAmount | number | The unamortized pretax gross amount at the end of the period. | 0 |
RemainingAmortizationInvoiceDiscount | number | The unamortized discount at the end of the period. | 0 |
RemainingAmortizationRoundDownDiscount | number | The unamortized amount rounded down at the end of the period. | 0 |
RemainingAmortizationPretaxAmount | number | The unamortized pretax amount at the end of the period. | 0 |
RemainingAmortizationDeductedByCashCoupons | number | The unamortized amount deducted by cash coupons at the end of the period. | 0 |
RemainingAmortizationDeductedByCoupons | number | The unamortized amount deducted by coupons at the end of the period. | 0 |
RemainingAmortizationDeductedByPrepaidCard | number | The unamortized amount paid by prepaid card at the end of the period. | 0 |
RemainingAmortizationExpenditureAmount | number | The unamortized expenditure amount at the end of the period. This amount can be invoiced. | 0 |
AfterDiscountAmount | number | The amount after a discount is applied. | 0 |
PreviouslyAmortizedAfterDiscountAmount | number | The amount that was amortized before the beginning of the period, after a discount is applied. | 0 |
CurrentAmortizationAfterDiscountAmount | number | The amount that is amortized in the current period, after a discount is applied. | 0 |
RemainingAmortizationAfterDiscountAmount | number | The unamortized amount at the end of the period, after a discount is applied. | 0 |
Examples
Success response
JSON format
{
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F\n",
"Success": true,
"Code": "200\n",
"Message": "Successful!\n",
"Data": {
"NextToken": "CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U\n",
"AccountID": "185766xxxx",
"AccountName": "test@test.aliyunid.com\n",
"MaxResults": 100,
"TotalCount": 100,
"Items": [
{
"ConsumePeriod": "202210",
"AmortizationStatus": "amortized",
"AmortizationPeriod": "202210",
"BillAccountID": 0,
"BillAccountName": "test@test.aliyunid.com\n",
"BillOwnerID": 0,
"BillOwnerName": "test@test.aliyunid.com\n",
"ProductCode": "rds",
"ProductName": "ApsaraDB RDS\n",
"ProductDetailCode": "rds",
"ProductDetail": "ApsaraDB RDS\n",
"BizType": "trusteeship\n",
"SubscriptionType": "PayAsYouGo",
"PretaxGrossAmount": 0,
"InvoiceDiscount": 0,
"RoundDownDiscount": 0,
"PretaxAmount": 0,
"DeductedByCashCoupons": 0,
"DeductedByCoupons": 0,
"DeductedByPrepaidCard": 0,
"ExpenditureAmount": 0,
"PreviouslyAmortizedPretaxGrossAmount": 0,
"PreviouslyAmortizedInvoiceDiscount": 0,
"PreviouslyAmortizedRoundDownDiscount": 0,
"PreviouslyAmortizedPretaxAmount": 0,
"PreviouslyAmortizedDeductedByCashCoupons": 0,
"PreviouslyAmortizedDeductedByCoupons": 0,
"PreviouslyAmortizedDeductedByPrepaidCard": 0,
"PreviouslyAmortizedExpenditureAmount": 0,
"CurrentAmortizationPretaxGrossAmount": 0,
"CurrentAmortizationInvoiceDiscount": 0,
"CurrentAmortizationRoundDownDiscount": 0,
"CurrentAmortizationPretaxAmount": 0,
"CurrentAmortizationDeductedByCashCoupons": 0,
"CurrentAmortizationDeductedByCoupons": 0,
"CurrentAmortizationDeductedByPrepaidCard": 0,
"CurrentAmortizationExpenditureAmount": 0,
"RemainingAmortizationPretaxGrossAmount": 0,
"RemainingAmortizationInvoiceDiscount": 0,
"RemainingAmortizationRoundDownDiscount": 0,
"RemainingAmortizationPretaxAmount": 0,
"RemainingAmortizationDeductedByCashCoupons": 0,
"RemainingAmortizationDeductedByCoupons": 0,
"RemainingAmortizationDeductedByPrepaidCard": 0,
"RemainingAmortizationExpenditureAmount": 0,
"AfterDiscountAmount": 0,
"PreviouslyAmortizedAfterDiscountAmount": 0,
"CurrentAmortizationAfterDiscountAmount": 0,
"RemainingAmortizationAfterDiscountAmount": 0
}
]
}
}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.