All Products
Search
Document Center

Expenses and Costs:DescribeProductAmortizedCostByConsumePeriod

Last Updated:Oct 28, 2025

Queries the monthly amortized cost of a product for a specific billing cycle.

Operation description

  • Amortized costs are used for cost allocation 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 rules.

  • The final data for a given month is available after 12:00 on the sixth day of the following month. This delay ensures that potential mid-month events, such as delayed billing, refunds, bill adjustments, and overdue payment write-offs, are included. Data for the current month does not include unsettled pay-as-you-go fees that have not yet been billed or are still accumulating.

  • Amortized cost data for the past 12 months is available.

  • Data related to attached resources is updated in the amortized costs 48 hours after the corresponding split bill is generated. To view the costs of attached resources, you must first enable split bills. Data that is not related to attached resources is updated 48 hours after the detailed bill is generated.

  • For months before August 2021, amortized costs were not updated mid-month and were only updated after 12:00 on the sixth day of the following month. Additionally, for this period, specific costs for attached resources, such as domain names, buckets, and EIPs, for products such as CDN, OSS, and Internet Shared Bandwidth are not available.

  • Amortized cost data is provided only after you enable the Amortized Cost feature. The data is available 48 hours after you enable it.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 conditions 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: subscription.

  • PayAsYouGo: pay-as-you-go.

Subscription

ProductCode

string

No

The product code. To obtain this value, call the QueryProductList operation to query product information or the DescribeResourcePackageProduct operation to query information about a resource plan.

rds

ProductDetail

string

No

The details of the product.

rds

CostUnitCode

string

No

The code of the cost center.

123#

BillUserIdList

array

No

The filter conditions for the IDs of bill purchasers. This is the ID of a RAM user. Set this parameter to view the bills of a RAM user. If you do not set this parameter, the bills of the current account and all its RAM users are returned. Maximum number of elements: 10.

string

No

The ID of the bill purchaser.

123

BillOwnerIdList

array

No

The filter conditions for the IDs of resource owners. The resource owner is the account that actually uses the resources. Maximum number of elements: 10.

string

No

The ID of the resource owner.

123

NextToken

string

No

The token that marks the position from which to start the query. If you leave this parameter empty, the query starts from the beginning. If you specify this parameter, set it to the value of NextToken that is returned in the last call.

CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U

MaxResults

integer

No

The maximum number of data records to return in this call. Default value: 20. Maximum value: 300.

20

Response elements

Parameter

Type

Description

Example

object

The response.

RequestId

string

The request ID.

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 marks the position of the next query.

CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U

AccountID

string

The account ID.

185766xxxx

AccountName

string

The user account.

test@test.aliyunid.com

MaxResults

integer

The maximum number of entries returned for the current request.

100

TotalCount

integer

The total number of entries.

100

Items

array<object>

The data entries.

object

The data item.

ConsumePeriod

string

The billing cycle. Format: YYYYMM.

202210

AmortizationStatus

string

The amortization status. Valid values:

  • amortized: The cost is amortized.

  • unAmortized: The cost is not amortized.

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.

云数据库RDS

ProductDetailCode

string

The code of the product details.

rds

ProductDetail

string

The product details.

云数据库RDS

BizType

string

The business type.

trusteeship

SubscriptionType

string

The subscription type. Valid values:

  • Subscription: subscription.

  • PayAsYouGo: pay-as-you-go.

PayAsYouGo

PretaxGrossAmount

number

The list price.

0

InvoiceDiscount

number

The discount.

0

RoundDownDiscount

number

The amount deducted by rounding 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 with a prepaid card.

0

ExpenditureAmount

number

The expenditure amount (which can be invoiced).

0

PreviouslyAmortizedPretaxGrossAmount

number

The previously amortized list price.

0

PreviouslyAmortizedInvoiceDiscount

number

The previously amortized discount.

0

PreviouslyAmortizedRoundDownDiscount

number

The previously amortized amount deducted by rounding down.

0

PreviouslyAmortizedPretaxAmount

number

The previously amortized pretax amount.

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 with a prepaid card.

0

PreviouslyAmortizedExpenditureAmount

number

The previously amortized expenditure amount (which can be invoiced).

0

CurrentAmortizationPretaxGrossAmount

number

The list price amortized in the current period.

0

CurrentAmortizationInvoiceDiscount

number

The discount amortized in the current period.

0

CurrentAmortizationRoundDownDiscount

number

The amount deducted by rounding down that is amortized in the current period.

0

CurrentAmortizationPretaxAmount

number

The pretax amount 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 with a prepaid card that is amortized in the current period.

0

CurrentAmortizationExpenditureAmount

number

The expenditure amount (which can be invoiced) amortized in the current period.

0

RemainingAmortizationPretaxGrossAmount

number

The remaining unamortized list price.

0

RemainingAmortizationInvoiceDiscount

number

The remaining unamortized discount.

0

RemainingAmortizationRoundDownDiscount

number

The remaining unamortized amount deducted by rounding down.

0

RemainingAmortizationPretaxAmount

number

The remaining unamortized pretax amount.

0

RemainingAmortizationDeductedByCashCoupons

number

The remaining unamortized amount deducted by cash coupons.

0

RemainingAmortizationDeductedByCoupons

number

The remaining unamortized amount deducted by coupons.

0

RemainingAmortizationDeductedByPrepaidCard

number

The remaining unamortized amount paid with a prepaid card.

0

RemainingAmortizationExpenditureAmount

number

The remaining unamortized expenditure amount (which can be invoiced).

0

AfterDiscountAmount

number

The amount after discount.

0

PreviouslyAmortizedAfterDiscountAmount

number

The previously amortized amount after discount.

0

CurrentAmortizationAfterDiscountAmount

number

The amortized amount for the current period after discount.

0

RemainingAmortizationAfterDiscountAmount

number

The remaining unamortized amount after discount.

0

Examples

Success response

JSON format

{
  "RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F\n",
  "Success": true,
  "Code": "200",
  "Message": "Successful!\n",
  "Data": {
    "NextToken": "CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U",
    "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": "云数据库RDS\n",
        "ProductDetailCode": "rds",
        "ProductDetail": "云数据库RDS\n",
        "BizType": "trusteeship",
        "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.