QueryInstanceGaapCost
This API is no longer updated. Use the following APIs to obtain the corresponding allocated costs. Use DescribeInstanceAmortizedCostByAmortizationPeriod to query the monthly amortized cost of an instance by amortization period. Use DescribeProductAmortizedCostByAmortizationPeriod to query the monthly amortized cost of a product by amortization period. Use DescribeInstanceAmortizedCostByConsumePeriod to query the monthly amortized cost of an instance by billing cycle. Use DescribeProductAmortizedCostByConsumePeriod to query the monthly amortized cost of a product by billing cycle.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:DescribeGaapBill |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNum |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 20. Maximum value: 100. |
20 |
| BillingCycle |
string |
Yes |
The billing cycle in the YYYY-MM format. |
2020-03 |
| ProductCode |
string |
No |
The product code. |
rds |
| ProductType |
string |
No |
The product type. |
rds |
| SubscriptionType |
string |
No |
The subscription type. Valid values:
|
PayAsYouGo |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. |
Success |
| Message |
string |
The error message. |
Successful! |
| RequestId |
string |
The request ID. |
CCBB1BB9-22F1-4177-867B-7A75D665B488 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Data |
object |
The returned data. |
|
| PageNum |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
20 |
| TotalCount |
integer |
The total number of entries. |
20 |
| HostId |
string |
The host ID. |
1.1.1.1 |
| Modules |
object |
||
| Module |
array<object> |
The billing information. |
|
|
object |
|||
| GaapDeductedByCashCoupons |
string |
The allocated cash coupon deductions. |
0 |
| SubscriptionType |
string |
The subscription type. Valid values:
|
PayAsYouGo |
| MonthGaapPretaxAmount |
string |
The allocated discounted amount for the current month. |
0 |
| DeductedByCoupons |
string |
The coupon deductions. |
0 |
| SubOrderId |
string |
The sub-order ID. |
12434345 |
| Region |
string |
The region. |
cn-hangzhou |
| OrderType |
string |
The order type. Valid values:
|
New |
| MonthGaapDeductedByPrepaidCard |
string |
The allocated prepaid card deductions for the current month. |
0 |
| UnallocatedDeductedByCashCoupons |
string |
The unallocated cash coupon deductions. |
0 |
| PretaxAmountLocal |
string |
The allocated discounted amount in the local currency for international sites. |
0 |
| BillingCycle |
string |
The billing cycle in the YYYY-MM format. |
2020-03 |
| PayerAccount |
string |
The payer account. |
23534534 |
| MonthGaapPretaxAmountLocal |
string |
The allocated discounted amount for the current month in the local currency for international sites. |
0.99 |
| AccountingUnit |
string |
The financial accounting unit. This is a reserved field and is not supported. |
None |
| GaapPretaxAmountLocal |
string |
The allocated discounted amount in the local currency. |
0 |
| UnallocatedDeductedByPrepaidCard |
string |
The unallocated prepaid card deductions. |
0 |
| ProductType |
string |
The product type. |
rds |
| PaymentAmount |
string |
The cash payment. |
0 |
| MonthGaapPretaxGrossAmount |
string |
The allocated original amount for the current month. |
0.99 |
| BillType |
string |
The bill type. Valid values:
|
SubscriptionOrder |
| PayTime |
string |
The payment time. |
2018-06-15 15:59:57 |
| PretaxGrossAmount |
string |
The original amount. |
123 |
| OrderId |
string |
The order ID. |
213123213123 |
| UnallocatedPricingDiscount |
string |
The unallocated pricing discount. |
0 |
| MonthGaapDeductedByCashCoupons |
string |
The allocated cash coupon deductions for the current month. |
0.75 |
| UnallocatedPretaxGrossAmount |
string |
The unallocated original amount. |
0 |
| InstanceID |
string |
The instance ID. |
OSSBAG-cn-0xl0xxxxxx |
| Tag |
string |
The tag. |
tag |
| Currency |
string |
The currency. Valid values:
|
CNY |
| GaapDeductedByCoupons |
string |
The allocated coupon deductions. |
0 |
| DeductedByCashCoupons |
string |
The cash coupon deductions. |
0 |
| GaapDeductedByPrepaidCard |
string |
The allocated prepaid card deductions. |
0 |
| GaapPaymentAmount |
string |
The allocated cash payment. |
0 |
| UnallocatedPretaxAmountLocal |
string |
The unallocated discounted amount in the local currency. |
0 |
| MonthGaapPricingDiscount |
string |
The allocated pricing discount for the current month. |
0,.25 |
| PricingDiscount |
string |
The pricing discount. |
1 |
| GaapPricingDiscount |
string |
The allocated pricing discount. |
0 |
| ResourceGroup |
string |
The resource group. |
default resource group |
| UnallocatedDeductedByCoupons |
string |
The unallocated coupon deductions. |
0 |
| PretaxAmount |
string |
The discounted amount. |
0 |
| UnallocatedPretaxAmount |
string |
The unallocated discounted amount. |
0 |
| GaapPretaxGrossAmount |
string |
The allocated original amount. |
0 |
| UnallocatedPaymentAmount |
string |
The unallocated cash payment. |
0 |
| PaymentCurrency |
string |
The payment currency for international sites. |
CNY |
| OwnerID |
string |
The owner ID. |
123213123123 |
| DeductedByPrepaidCard |
string |
The prepaid card deductions. |
0 |
| GaapPretaxAmount |
string |
The allocated discounted amount. |
0 |
| MonthGaapDeductedByCoupons |
string |
The allocated coupon deductions for the current month. |
0 |
| MonthGaapPaymentAmount |
string |
The allocated cash payment for the current month. |
0 |
| UsageEndDate |
string |
The service end time. |
2019-05-01 00:00:00 |
| UsageStartDate |
string |
The service start time. |
2019-04-01 00:00:00 |
| ProductCode |
string |
The product code. |
rds |
Examples
Success response
JSON format
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "CCBB1BB9-22F1-4177-867B-7A75D665B488",
"Success": true,
"Data": {
"PageNum": 1,
"PageSize": 20,
"TotalCount": 20,
"HostId": "1.1.1.1",
"Modules": {
"Module": [
{
"GaapDeductedByCashCoupons": "0",
"SubscriptionType": "PayAsYouGo",
"MonthGaapPretaxAmount": "0",
"DeductedByCoupons": "0",
"SubOrderId": "12434345",
"Region": "cn-hangzhou",
"OrderType": "New",
"MonthGaapDeductedByPrepaidCard": "0",
"UnallocatedDeductedByCashCoupons": "0",
"PretaxAmountLocal": "0",
"BillingCycle": "2020-03",
"PayerAccount": "23534534",
"MonthGaapPretaxAmountLocal": "0.99",
"AccountingUnit": "无",
"GaapPretaxAmountLocal": "0",
"UnallocatedDeductedByPrepaidCard": "0",
"ProductType": "rds",
"PaymentAmount": "0",
"MonthGaapPretaxGrossAmount": "0.99",
"BillType": "SubscriptionOrder",
"PayTime": "2018-06-15 15:59:57",
"PretaxGrossAmount": "123",
"OrderId": "213123213123",
"UnallocatedPricingDiscount": "0",
"MonthGaapDeductedByCashCoupons": "0.75",
"UnallocatedPretaxGrossAmount": "0",
"InstanceID": "OSSBAG-cn-0xl0xxxxxx",
"Tag": "tag",
"Currency": "CNY",
"GaapDeductedByCoupons": "0",
"DeductedByCashCoupons": "0",
"GaapDeductedByPrepaidCard": "0",
"GaapPaymentAmount": "0",
"UnallocatedPretaxAmountLocal": "0",
"MonthGaapPricingDiscount": "0,.25",
"PricingDiscount": "1",
"GaapPricingDiscount": "0",
"ResourceGroup": "默认资源组",
"UnallocatedDeductedByCoupons": "0",
"PretaxAmount": "0",
"UnallocatedPretaxAmount": "0",
"GaapPretaxGrossAmount": "0",
"UnallocatedPaymentAmount": "0",
"PaymentCurrency": "CNY",
"OwnerID": "123213123123",
"DeductedByPrepaidCard": "0",
"GaapPretaxAmount": "0",
"MonthGaapDeductedByCoupons": "0",
"MonthGaapPaymentAmount": "0",
"UsageEndDate": "2019-05-01 00:00:00",
"UsageStartDate": "2019-04-01 00:00:00",
"ProductCode": "rds"
}
]
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NotApplicable | This API is not applicable for caller. | |
| 400 | NotAuthorized | This API is not authorized for caller. | |
| 400 | MissingParameter | Absent some mandatory parameter for this request. | |
| 400 | InvalidParameter | This request contain some invalid parameter | |
| 400 | InvalidOwner | The specified owner doesn't belong to caller. | Invalid user identity. |
| 400 | DurationInvalid | Parameter duration can only be positive integer. | |
| 400 | ProductNotFound | Product not found. | |
| 400 | InvalidBillingCycle | BillingCycle not Invalid. | |
| 500 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.