全部產品
Search
文件中心

Expenses and Costs:DescribeProductAmortizedCostByConsumePeriod - 查詢產品賬期月攤銷成本

更新時間:Aug 11, 2025

以賬期月視角查詢月產品攤銷成本。

介面說明

  • 攤銷成本不作為結算及對賬依據。攤銷成本提供費用分攤能力,將您在雲上產生的費用(含預付費和後付費)按照指定的分攤規則進行分攤。

  • 當月最終資料在次月 6 日 12 點後支援使用(月中會發生包括但不限於以下少數情境:延遲出賬,退款,調賬,欠費核銷等)。當月資料中不包含未結算(未出賬,累賬中)的後付費資料。

  • 攤銷成本資料支援近 12 個月資料。

  • 攤銷成本中分拆項相關資料在分賬賬單資料出具後延遲 48 小時更新(若需使用分拆費用請提前開通分賬賬單);非分拆項相關資料在明細賬單出具後延遲 48 小時更新。

  • 2021 年 8 月(不含)之前的攤銷成本月中不更新,僅於攤銷次月 6 日 12 點後統一更新,也不支援提供分拆型雲產品(例如:CDN、OSS、共用頻寬等)各個分拆項(例如:網域名稱、Bucket、EIP 等)的具體費用。

  • 攤銷成本資料需要使用者開通攤銷成本後才可提供,自開通後延遲 48 小時可使用。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

bssapi:DescribeCostBill

get

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

BillingCycle

string

賬期月 格式:YYYY-MM。

2022-10

AmortizationPeriodFilter

array

攤銷月篩選條件。 最多元素個數:10。

string

攤銷月 格式:YYYY-MM。

2022-09

SubscriptionType

string

訂閱類型。取值:

  • Subscription:預付費。

  • PayAsYouGo:後付費。

Subscription

ProductCode

string

產品。 參考取值來源: 查 QueryProductList 查詢產品資訊, 查 DescribeResourcePackageProduct 查詢某個資源套件產品的資訊。

rds

ProductDetail

string

產品明細。

rds

CostUnitCode

string

財務單元 code。

123#

BillUserIdList

array

賬單購買者 ID 篩選條件。 子帳號 ID。設定可查看財務雲子帳號賬單,不填預設查看當前調用帳號及其所有子帳號。 最多元素個數:10。

string

賬單購買者 ID。

123

BillOwnerIdList

array

資源歸屬帳號篩選條件。 資源歸屬帳號 ID,資源歸屬帳號是實際使用資源的帳號。 最多元素個數:10。

string

資源歸屬帳號 ID。

123

NextToken

string

用來表示當前調用開始讀取的位置,參數值必須為空白或者使用返回結果中的 NextToken 設值,否則會報錯。空代表從頭開始讀取。

CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U

MaxResults

integer

本次讀取的最巨量資料記錄數量。預設值:20,最大值:300。

20

返回參數

名稱

類型

描述

樣本值

object

BssResult

RequestId

string

請求 ID。

79EE7556-0CFD-44EB-9CD6-B3B526E3A85F

Success

boolean

是否成功。

true

Code

string

狀態代碼。

200

Message

string

訊息說明。

Successful!

Data

object

訊息說明。

NextToken

string

用來表示當前調用開始讀取的位置,參數值必須為空白或者使用返回結果中的 NextToken 設值,否則會報錯。空代表從頭開始讀取。

CAESEgoQCg4KCmdtdF9jcmVhdGUEARgBIkgKCQBwhGmPcAEAAAo7AzYAAAAxTDgwMDcxMjg3ZDJhNmM3ZDguTDgwMDAwMDAwMDAwMzE1MTIuTDgwMDcyZDMyZTJkYzg3N2U

AccountID

string

帳號 ID。

185766xxxx

AccountName

string

使用者帳號。

test@test.aliyunid.com

MaxResults

integer

本次請求所返回的最大記錄條數。

100

TotalCount

integer

總記錄數。

100

Items

array<object>

資料條目。

object

資料項目。

ConsumePeriod

string

賬期。 格式:YYYYMM。

202210

AmortizationStatus

string

攤銷狀態,取值:

  • amortized 已攤銷

  • unAmortized 未攤銷

amortized

AmortizationPeriod

string

攤銷月。 格式:YYYYMM。

202210

BillAccountID

integer

賬單所屬帳號 ID。

185xxxxx489

BillAccountName

string

賬單所屬帳號名稱。

test@test.aliyunid.com

BillOwnerID

integer

資源歸屬帳號 ID。

185xxxxx489

BillOwnerName

string

資源所屬帳號名稱。

test@test.aliyunid.com

ProductCode

string

產品代碼。

rds

ProductName

string

產品名稱。

雲資料庫RDS

ProductDetailCode

string

產品明細 code。

rds

ProductDetail

string

產品明細。

雲資料庫RDS

BizType

string

業務類型。

trusteeship

SubscriptionType

string

訂閱類型,取值:

  • Subscription:預付費。

  • PayAsYouGo:後付費。

PayAsYouGo

PretaxGrossAmount

number

官網價。

0

InvoiceDiscount

number

優惠金額。

0

RoundDownDiscount

number

抹零金額。

0

PretaxAmount

number

應付金額。

0

DeductedByCashCoupons

number

代金券抵扣。

0

DeductedByCoupons

number

優惠券抵扣。

0

DeductedByPrepaidCard

number

儲值卡支付金額。

0

ExpenditureAmount

number

消費金額(可開票)。

0

PreviouslyAmortizedPretaxGrossAmount

number

期初已攤-官網價。

0

PreviouslyAmortizedInvoiceDiscount

number

期初已攤-優惠金額。

0

PreviouslyAmortizedRoundDownDiscount

number

期初已攤-抹零金額。

0

PreviouslyAmortizedPretaxAmount

number

期初已攤-應付金額。

0

PreviouslyAmortizedDeductedByCashCoupons

number

期初已攤-代金券抵扣。

0

PreviouslyAmortizedDeductedByCoupons

number

期初已攤-優惠券抵扣。

0

PreviouslyAmortizedDeductedByPrepaidCard

number

期初已攤-儲值卡支付金額。

0

PreviouslyAmortizedExpenditureAmount

number

期初已攤-消費金額(可開票)。

0

CurrentAmortizationPretaxGrossAmount

number

本期攤銷-官網價。

0

CurrentAmortizationInvoiceDiscount

number

本期攤銷-優惠金額。

0

CurrentAmortizationRoundDownDiscount

number

本期攤銷-抹零金額。

0

CurrentAmortizationPretaxAmount

number

本期攤銷-應付金額。

0

CurrentAmortizationDeductedByCashCoupons

number

本期攤銷-代金券抵扣。

0

CurrentAmortizationDeductedByCoupons

number

本期攤銷-優惠券抵扣。

0

CurrentAmortizationDeductedByPrepaidCard

number

本期攤銷-儲值卡支付金額。

0

CurrentAmortizationExpenditureAmount

number

本期攤銷-消費金額(可開票)。

0

RemainingAmortizationPretaxGrossAmount

number

期末待攤-官網價。

0

RemainingAmortizationInvoiceDiscount

number

期末待攤-優惠金額。

0

RemainingAmortizationRoundDownDiscount

number

期末待攤-抹零金額。

0

RemainingAmortizationPretaxAmount

number

期末待攤-應付金額。

0

RemainingAmortizationDeductedByCashCoupons

number

期末待攤-代金券抵扣。

0

RemainingAmortizationDeductedByCoupons

number

期末待攤-優惠券抵扣。

0

RemainingAmortizationDeductedByPrepaidCard

number

期末待攤-儲值卡支付金額。

0

RemainingAmortizationExpenditureAmount

number

期末待攤-消費金額(可開票)。

0

AfterDiscountAmount

number

優惠後金額

0

PreviouslyAmortizedAfterDiscountAmount

number

期初已攤-優惠後金額

0

CurrentAmortizationAfterDiscountAmount

number

本期攤銷-優惠後金額

0

RemainingAmortizationAfterDiscountAmount

number

期末未攤-優惠後金額

0

樣本

正常返回樣本

JSON格式

{
  "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
      }
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 NotActiveService You are not active Amotized Cost ,please use after activation.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情