查詢用戶某個(gè)賬期內(nèi)所有商品實(shí)例或計(jì)費(fèi)項(xiàng)的消費(fèi)匯總。API已升級(jí)為DescribeInstanceBill,此API不再提供50000行以后數(shù)據(jù)的查詢。
接口說明
API 描述
在調(diào)用本接口時(shí),請(qǐng)注意:
- 實(shí)例賬單 API 已升級(jí),請(qǐng)使用新版 API: DescribeInstanceBill 。此 API 不再提供 50000 行以后數(shù)據(jù)的查詢。
- 實(shí)例賬單是根據(jù)賬單數(shù)據(jù)拆分生成,一般會(huì)有一天延遲。
- 實(shí)例信息在賬期內(nèi)會(huì)變化,月匯總的實(shí)例 Config 和 Spec 對(duì)應(yīng)記錄生成時(shí)間信息,如需詳情可參考對(duì)應(yīng)明細(xì)賬單。
- 云通信產(chǎn)品可查詢從 2020 年 6 月以后的數(shù)據(jù); 萬網(wǎng)產(chǎn)品可查詢從 2020 年 11 月以后的數(shù)據(jù)。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。
授權(quán)信息
下表是API對(duì)應(yīng)的授權(quán)信息,可以在RAM權(quán)限策略語句的Action
元素中使用,用來給RAM用戶或RAM角色授予調(diào)用此API的權(quán)限。具體說明如下:
- 操作:是指具體的權(quán)限點(diǎn)。
- 訪問級(jí)別:是指每個(gè)操作的訪問級(jí)別,取值為寫入(Write)、讀?。≧ead)或列出(List)。
- 資源類型:是指操作中支持授權(quán)的資源類型。具體說明如下:
- 對(duì)于必選的資源類型,用背景高亮的方式表示。
- 對(duì)于不支持資源級(jí)授權(quán)的操作,用
全部資源
表示。
- 條件關(guān)鍵字:是指云產(chǎn)品自身定義的條件關(guān)鍵字。
- 關(guān)聯(lián)操作:是指成功執(zhí)行操作所需要的其他權(quán)限。操作者必須同時(shí)具備關(guān)聯(lián)操作的權(quán)限,操作才能成功。
操作 | 訪問級(jí)別 | 資源類型 | 條件關(guān)鍵字 | 關(guān)聯(lián)操作 |
---|---|---|---|---|
bss:DescribeBillList | Read |
|
| 無 |
請(qǐng)求參數(shù)
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
BillingCycle | string | 是 | 賬期 YYYY-MM。僅支持最近 18 個(gè)月賬期。 | 2020-03 |
ProductCode | string | 否 | 產(chǎn)品代碼。 | rds |
ProductType | string | 否 | 產(chǎn)品類型。當(dāng) ProductCode 為云市場產(chǎn)品 code 時(shí),此參數(shù)必填。 | rds |
SubscriptionType | string | 否 | 訂閱類型。取值:
說明
必須和 ProductCode 參數(shù)一起使用。
| PayAsYouGo |
IsBillingItem | boolean | 否 | 是否按照計(jì)費(fèi)項(xiàng)維度拉取數(shù)據(jù)。
默認(rèn) false。 | false |
PageNum | integer | 否 | 頁碼,默認(rèn)值為 1。 | 1 |
PageSize | integer | 否 | 每頁數(shù)量,默認(rèn)值:20,最大值:300。 | 20 |
IsHideZeroCharge | boolean | 否 | 根據(jù)原價(jià)(PretaxGrossAmount)和應(yīng)付(PretaxAmount)是否都為 0 做過濾。取值:
| false |
BillingDate | string | 否 | 賬單日期,僅當(dāng) Granularity 為 DAILY 時(shí)必填,格式為 YYYY-MM-DD。 | 2020-03-03 |
Granularity | string | 否 | 查詢賬單的顆粒度。取值:
選擇 DAILY 需指定 BillingDate。 | MONTHLY |
BillOwnerId | long | 否 | 資源歸屬賬號(hào) ID,資源歸屬賬號(hào)是實(shí)際使用資源的賬號(hào)。 | 122 |
返回參數(shù)
示例
正常返回示例
JSON
格式
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"PageNum": 1,
"BillingCycle": "2020-03",
"AccountID": "185xxxx3489",
"PageSize": 20,
"TotalCount": 2,
"AccountName": "test@test.aliyunid.com",
"Items": {
"Item": [
{
"BillingDate": "2020-03",
"InstanceConfig": "CPU:12",
"InternetIP": "34.xx.x.x",
"Item": "PayAsYouGoBill",
"Tag": "tag",
"InstanceID": "i-kjhdskjgshfdlkjfdh",
"Currency": "CNY",
"DeductedByCashCoupons": 0,
"SubscriptionType": "PayAsYouGo",
"InstanceSpec": "ecs.sn1ne.3xlarge",
"DeductedByCoupons": 0,
"BillingItem": "其他",
"Region": "杭州",
"OutstandingAmount": 0,
"CostUnit": "未分配",
"ListPriceUnit": "元",
"ResourceGroup": "默認(rèn)資源組",
"PipCode": "rds",
"ServicePeriodUnit": "秒",
"PretaxAmount": 0,
"CommodityCode": "rds",
"ProductName": "云數(shù)據(jù)庫RDS",
"AdjustAmount": 0,
"NickName": "test",
"ProductDetail": "云數(shù)據(jù)庫RDS",
"Usage": "100",
"IntranetIP": "192.xx.xx.xx",
"OwnerID": "169***013",
"DeductedByPrepaidCard": 0,
"UsageUnit": "GB",
"PaymentAmount": 0,
"InvoiceDiscount": 0,
"DeductedByResourcePackage": "NULL",
"ProductType": "rds",
"ServicePeriod": "10",
"Zone": "cn-hangzhou-h",
"ListPrice": "100",
"PretaxGrossAmount": 0,
"CashAmount": 0,
"ProductCode": "rds",
"BillingType": "其它"
}
]
}
}
}
錯(cuò)誤碼
訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。
變更歷史
變更時(shí)間 | 變更內(nèi)容概要 | 操作 | ||
---|---|---|---|---|
2024-03-28 | OpenAPI 描述信息更新 | 看變更集 | ||
|