Queries split bills.
Operation description
- The data that you query by calling this operation is the same as the data that is queried by billing cycles in the Split Bill module of Cost Allocation.
- You can query split bills that were generated within the last 12 months by calling this operation.
- You can query split bills only after you enable the Split Bill service in the User Center console.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
bssapi:DescribeSplitItemBill | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
BillingCycle | string | Yes | The billing cycle. Specify the parameter in the YYYY-MM format. | 2020-03 |
ProductCode | string | No | The code of the service. | rds |
ProductType | string | No | The type of the service. | rds |
SubscriptionType | string | No | The billing method. Valid values: Subscription: the subscription billing method. PayAsYouGo: the pay-as-you-go billing method. This parameter must be used with the ProductCode parameter. | PayAsYouGo |
NextToken | string | No | The token that is used for the next query. The parameter must be left empty or set to the value of the NextToken parameter returned in the last call. Otherwise, an error is returned. If the parameter is left empty, the data is queried from the first entry. | CAESEgoQCg4KCmd |
MaxResults | integer | No | The maximum number of entries to query. Default value: 20. Maximum value: 300. | 20 |
BillOwnerId | long | No | The ID of the member. If you specify this parameter, the bills of the member are queried. If you do not specify this parameter, the bills of the current account are queried by default. | 123 |
InstanceID | string | No | The ID of the instance. | i-kjhdskjgshfdlkjfdh |
SplitItemID | string | No | The ID of the split item. | i-kjhdskjgshfdlkjfdh |
Granularity | string | No | The granularity at which bills are queried. Valid values:
If you specify DAILY for this parameter, the BillingDate parameter is required. | Monthly |
BillingDate | string | No | The billing date. This parameter is required only when the Granularity parameter is set to DAILY. Format: YYYY-MM-DD. | 2020-03-02 |
TagFilter | array<object> | No | The tags that are used to filter split bills. You can specify multiple tag values. If you specify multiple tag values, split bills that match one of the tag values are queried. | |
object | No | The information about tags that are used to filter split bills | ||
TagValues | array | No | You can specify the TagValues.N parameter to query bills that match the specified tag value. The value of the TagValues.N parameter must be a string. The tag value must be 1 to 128 characters in length. Valid values of N: 1 to 20.
| |
string | No | The information about tag keys. | TestValue | |
TagKey | string | No | The TagFilter.N parameter is used to query bills that match a specified tag. The value of the TagFilter.N parameter must be a key-value pair. The tag key must be 1 to 128 characters in length. Valid values of N: 1 to 20.
| TestKey |
IsHideZeroCharge | boolean | No | Specifies whether to filter bills if both the pretax gross amount and pretax amount are 0. Valid values:
| false |
PipCode | string | No | The code of the service. The code is the same as that in Cost Center. | rds |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"NextToken": "CAESEgoQCg4K",
"BillingCycle": "2020-03",
"MaxResults": 20,
"AccountID": "185xxxx3489",
"TotalCount": 20,
"AccountName": "test@test.aliyunid.com",
"Items": [
{
"SplitAccountID": "12**122",
"BillAccountName": "test@test.aliyunid.com",
"SubscriptionType": "PayAsYouGo",
"InstanceSpec": "ecs.sn1ne.3xlarge",
"DeductedByCoupons": 0,
"Region": "China (Hangzhou)\n",
"OutstandingAmount": 0.1,
"PipCode": "rds",
"CommodityCode": "rds",
"NickName": "nick",
"ProductDetail": "ApsaraDB RDS\n",
"Usage": "100",
"IntranetIP": "192.xx.xx.xx",
"UsageUnit": "GB",
"SplitCommodityCode": "rds",
"BillAccountID": "185xxxx3489",
"ProductType": "rds",
"DeductedByResourcePackage": "0",
"PaymentAmount": 0,
"SplitBillingCycle": "2021-06",
"ServicePeriod": "20",
"SplitItemName": "iZ28bycvyb4Z",
"ListPrice": "0.12",
"Zone": "Qingdao Zone B\n",
"PretaxGrossAmount": 0,
"CashAmount": 0,
"InstanceConfig": "CPU:12",
"BillingDate": "2020-01-20",
"InternetIP": "34.xx.x.x",
"Item": "PayAsYouGoBill",
"SplitItemID": "i-28bycvyb4",
"InstanceID": "i-kjhdskjgshfdlkjfdh",
"Tag": "key:testKey value:testValue; key:testKey1 value:testValues1",
"Currency": "CNY",
"DeductedByCashCoupons": 0,
"BizType": "trusteeship",
"BillingItem": "Bandwidth\n",
"BillingItemCode": "disk",
"CostUnit": "Not allocated\n",
"ListPriceUnit": "CNY/GB\n",
"ResourceGroup": "Default resource group\n",
"PretaxAmount": 0,
"ServicePeriodUnit": "Hour\n",
"SplitBillingDate": "2021-06-01",
"ProductName": "ApsaraDB RDS\n",
"SplitProductDetail": "ApsaraDB RDS\n",
"AdjustAmount": 0,
"OwnerID": "169***013",
"DeductedByPrepaidCard": 0,
"InvoiceDiscount": 0,
"SplitAccountName": "test**1122",
"BillingType": "Other\n",
"ProductCode": "rds",
"ItemName": "iZ28bycvyb4Z"
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-18 | The request parameters of the API has changed | View Change Details |
2023-11-21 | API Description Update. The request parameters of the API has changed | View Change Details |
2021-09-23 | The response structure of the API has changed | View Change Details |