Queries the details of savings plan deductions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bssapi:QuerySavingsPlansDeductLog |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceType |
string |
No |
The query type. Valid values:
|
spn |
| PageSize |
integer |
No |
The number of entries per page. |
20 |
| Locale |
string |
No |
The language of the response. Default value: ZH. Valid values: `ZH`: Chinese. `EN`: English. |
ZH |
| PageNum |
integer |
No |
The page number. |
1 |
| InstanceId |
string |
No |
The instance ID. |
spn-XXXXXXX |
| StartTime |
string |
No |
The beginning of the time range to query. |
2022-01-01 00:00:00 |
| EndTime |
string |
No |
The end of the time range to query. |
2022-01-05 00:00:00 |
Response elements
|
Parameter |
Type |
Description |
Example |
|
object |
The response. |
||
| Code |
string |
The error code. |
PARAM_ERROR |
| Message |
string |
The error message. |
请校验入参正确性 |
| RequestId |
string |
The request ID. |
61293E7A-3406-4447-8620-EC88B0AA66AD |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Data |
object |
The returned data. |
|
| PageNum |
integer |
The page number of the returned page. |
1 |
| PageSize |
integer |
The number of entries per page. |
20 |
| TotalCount |
integer |
The total number of entries. |
20 |
| Items |
array<object> |
The list of deduction details. |
|
|
object |
The deduction details. |
||
| EndTime |
string |
The end time. |
2020-12-01 01:00:00 |
| StartTime |
string |
The start time. |
2020-12-01 00:00:00 |
| SavingsType |
string |
The type of the savings plan. Valid values:
|
ecs |
| UserId |
integer |
The user ID. |
1906589291020438 |
| DiscountRate |
string |
The discount that is used for the deduction. |
0.069 |
| BillModule |
string |
The deducted billable item. |
云服务器配置 |
| InstanceId |
string |
The ID of the savings plan instance. |
spn-xxxxxxx |
| DeductInstanceId |
string |
The ID of the deducted cloud service instance. |
i-XXXXXXXXX |
| DeductCommodity |
string |
The deducted service. |
云服务器ECS-按量付费 |
| DeductRate |
string |
The deduction rate. |
1.0 |
| DeductFee |
string |
The deducted fee, in CNY. |
0.52 |
| OwnerId |
integer |
The ID of the owner. |
1906589291020438 |
| BillingCycle |
string |
The billing cycle. |
202312 |
| Region |
string |
The region of the deducted instance. |
cn-shanghai-eu13-a01 |
| InstanceSpec |
string |
The instance type of the deducted instance. |
ecs.g7.xlarge |
| InstanceTypeFamily |
string |
The instance family of the deducted instance. |
ecs.g7 |
| BillingOfficialPrice |
string |
The list price of the deducted bill, in CNY. |
375.35 |
| DeductedOfficialPrice |
string |
The list price of the deducted amount, in CNY. |
375.37 |
Examples
Success response
JSON format
{
"Code": "PARAM_ERROR",
"Message": "请校验入参正确性",
"RequestId": "61293E7A-3406-4447-8620-EC88B0AA66AD",
"Success": true,
"Data": {
"PageNum": 1,
"PageSize": 20,
"TotalCount": 20,
"Items": [
{
"EndTime": "2020-12-01 01:00:00",
"StartTime": "2020-12-01 00:00:00",
"SavingsType": "ecs",
"UserId": 1906589291020438,
"DiscountRate": "0.069",
"BillModule": "云服务器配置",
"InstanceId": "spn-xxxxxxx",
"DeductInstanceId": "i-XXXXXXXXX",
"DeductCommodity": "云服务器ECS-按量付费",
"DeductRate": "1.0",
"DeductFee": "0.52",
"OwnerId": 1906589291020438,
"BillingCycle": "202312",
"Region": "cn-shanghai-eu13-a01",
"InstanceSpec": "ecs.g7.xlarge",
"InstanceTypeFamily": "ecs.g7",
"BillingOfficialPrice": "375.35",
"DeductedOfficialPrice": "375.37"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidOwner | The specified owner does not belong to caller. | |
| 400 | InvalidParameter | The specified request contains invalid parameters. | |
| 400 | MissingParameter | The specified request lacks essential parameters. | |
| 400 | NotApplicable | The specified API is not applicable for the user. | |
| 400 | NotAuthorized | The user is not authorized for the specified API. | |
| 500 | InternalError | An error occurred in the internal server. | System exception, please try again |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.