The BSS OpenAPI provides the following operations to manage and analyze savings plans.
QuerySavingsPlansInstance
Queries information about savings plan instances, including status, commitment amount, utilization, and payment details.
Authorization
| Action | Access level | Resource type | Condition key | Dependent action |
|---|
bssapi:QuerySavingsPlansInstance | get | All Resources (*) | None | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|
| PageSize | integer | No | Number of entries per page. | 20 |
| Locale | string | No | Language of the response. Valid values: EN (English), ZH (Chinese). | ZH |
| PageNum | integer | No | Page number. | 1 |
| InstanceId | string | No | Savings plan instance ID. | spn-xxxxxxx |
| StartTime | string | No | Start time in yyyy-MM-dd HH:mm:ss format. | 2020-01-01 00:00:00 |
| EndTime | string | No | End time in yyyy-MM-dd HH:mm:ss format. | 2021-01-01 00:00:00 |
| Tag | array<object> | No | List of tag key-value pairs. | |
| Key | string | No | Tag key. | ecs |
| Value | string | No | Tag value. | 001 |
| Status | string | No | Instance status. Valid values: NORMAL (active), RELEASE (released). | NORMAL |
| CommodityCode | string | No | Commodity code. | savingplan_common_public_cn |
Response parameters
| Parameter | Type | Description | Example |
|---|
| Code | string | Status code. | Success |
| Message | string | Response message. | Successful |
| RequestId | string | Request ID. | 61293E7A-3406-4447-8620-EC88B0AA66AD |
| Success | boolean | Whether the request succeeded. | true |
| Data | object | Response data. | |
| Data.PageNum | integer | Current page number. | 1 |
| Data.PageSize | integer | Entries per page. | 20 |
| Data.TotalCount | integer | Total entries. | 100 |
| Data.Items | array<object> | List of savings plan instances. | |
Items fields:
| Parameter | Type | Description | Example |
|---|
| Status | string | Instance status. Valid values: NORMAL (active), LIMIT (suspended due to overdue payment), RELEASE (released). | NORMAL |
| Cycle | string | Purchased duration. | 1:Year |
| StartTimestamp | integer | Start timestamp (milliseconds). | 1663135741039 |
| SavingsType | string | Savings plan type. Valid values: unversal (general-purpose), ecs (compute-optimized). | ECS |
| Utilization | string | Total utilization rate. | 1.0 |
| PrepayFee | string | Upfront payment amount. Unit: CNY. | 8760.00 |
| InstanceId | string | Savings plan instance ID. | spn-xxxxxxxx |
| Currency | string | Currency. Valid values: CNY (Chinese Yuan), USD (US Dollar). | CNY |
| EndTimestamp | integer | End timestamp (milliseconds). | 1663135741039 |
| EndTime | string | Expiration time in yyyy-MM-dd HH:mm:ss format. | 2021-01-01 00:00:00 |
| StartTime | string | Effective time in yyyy-MM-dd HH:mm:ss format. | 2020-01-01 00:00:00 |
| AllocationStatus | string | Allocation status. Valid values: unallocated, allocated (allocating), beAllocated (allocated to this account). | unallocated |
| InstanceFamily | string | Instance family for compute-optimized savings plans. | ecs.g6 |
| Region | string | Region. | cn-zhangjiakou-na62-a01 |
| LastBillTotalUsage | string | Total deduction in the previous cycle. Unit: CNY. | 100.0 |
| LastBillUtilization | string | Utilization rate in the previous cycle. | 0.8 |
| TotalSave | string | Total savings. Unit: CNY. | 20.00 |
| PoolValue | string | Commitment amount. Unit: CNY. | 1.00 |
| PayMode | string | Payment type. Valid values: total (All Upfront), half (Partial Upfront), zero (No Upfront). | total |
| Tags | array<object> | List of tags. | |
| Tags.Key | string | Tag key. | |
| Tags.Value | string | Tag value. | |
| DeductCycleType | string | Deduction cycle. Valid values: HOUR (hourly), DAY (daily), ONCE (one-time, total amount decreases over time). | HOUR |
| RestPoolValue | string | Remaining commitment in the current cycle for flexible savings plans with monthly or daily commitment. Unit: CNY. | 100.0 |
| CommodityCode | string | Commodity code. | savingplan_common_public_cn |
| CurrentPoolValue | string | Commitment for the current cycle for monthly-cycle savings plans. Unit: CNY. | 100.0 |
Sample success response
{
"Code": "Success",
"Message": "Successful",
"RequestId": "61293E7A-3406-4447-8620-EC88B0AA66AD",
"Success": true,
"Data": {
"PageNum": 1,
"PageSize": 20,
"TotalCount": 100,
"Items": [
{
"Status": "NORMAL",
"Cycle": "1:Year",
"StartTimestamp": 1663135741039,
"SavingsType": "ECS",
"Utilization": "1.0",
"PrepayFee": "8760.00",
"InstanceId": "spn-xxxxxxxx",
"Currency": "CNY",
"EndTimestamp": 1663135741039,
"EndTime": "2021-01-01 00:00:00",
"StartTime": "2020-01-01 00:00:00",
"AllocationStatus": "unallocated",
"InstanceFamily": "ecs.g6",
"Region": "cn-zhangjiakou-na62-a01",
"LastBillTotalUsage": "100.0",
"LastBillUtilization": "0.8",
"TotalSave": "20.00",
"PoolValue": "1.00",
"PayMode": "total",
"Tags": [
{
"Key": "tag-key",
"Value": "tag-value"
}
],
"DeductCycleType": "HOUR",
"RestPoolValue": "100.0",
"CommodityCode": "savingplan_common_public_cn",
"CurrentPoolValue": "100.0"
}
]
}
}
Error codes
| HTTP status code | Error code | Error message |
|---|
| 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. |
For a complete list, see Error codes.
QuerySavingsPlansDeductLog
Queries deduction details for savings plan instances, including the deducted service, deduction amount, and discount rate.
Authorization
| Action | Access level | Resource type | Condition key | Dependent action |
|---|
bssapi:QuerySavingsPlansDeductLog | get | All Resources (*) | None | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|
| InstanceType | string | No | Query type. Valid values: spn (savings plan instance), product (deducted cloud service instance). | spn |
| PageSize | integer | No | Number of entries per page. | 20 |
| Locale | string | No | Language of the response. Default: ZH. Valid values: ZH (Chinese), EN (English). | ZH |
| PageNum | integer | No | Page number. | 1 |
| InstanceId | string | No | Instance ID. | spn-XXXXXXX |
| StartTime | string | No | Start of the time range to query. | 2022-01-01 00:00:00 |
| EndTime | string | No | End of the time range to query. | 2022-01-05 00:00:00 |
Response parameters
| Parameter | Type | Description | Example |
|---|
| Code | string | Status code. | Success |
| Message | string | Response message. | Successful! |
| RequestId | string | Request ID. | 61293E7A-3406-4447-8620-EC88B0AA66AD |
| Success | boolean | Whether the request succeeded. | true |
| Data | object | Response data. | |
| Data.PageNum | integer | Current page number. | 1 |
| Data.PageSize | integer | Entries per page. | 20 |
| Data.TotalCount | integer | Total entries. | 20 |
| Data.Items | array<object> | List of deduction details. | |
Items fields:
| Parameter | Type | Description | Example |
|---|
| EndTime | string | Deduction end time. | 2020-12-01 01:00:00 |
| StartTime | string | Deduction start time. | 2020-12-01 00:00:00 |
| SavingsType | string | Savings plan type. Valid values: universal (general-purpose), ecs (compute-optimized). | ecs |
| UserId | integer | User ID. | 1906589291020438 |
| DiscountRate | string | Discount rate applied. | 0.069 |
| BillModule | string | Deducted billable item. | |
| InstanceId | string | Savings plan instance ID. | spn-xxxxxxx |
| DeductInstanceId | string | Deducted cloud service instance ID. | i-XXXXXXXXX |
| DeductCommodity | string | Deducted service name. | |
| DeductRate | string | Deduction rate. | 1.0 |
| DeductFee | string | Deducted amount. Unit: CNY. | 0.52 |
| OwnerId | integer | Resource owner ID. | 1906589291020438 |
| BillingCycle | string | Billing cycle in YYYYMM format. | 202312 |
| Region | string | Region of the deducted instance. | cn-shanghai-eu13-a01 |
| InstanceSpec | string | Instance type of the deducted instance. | ecs.g7.xlarge |
| InstanceTypeFamily | string | Instance family of the deducted instance. | ecs.g7 |
| BillingOfficialPrice | string | List price of the deducted bill. Unit: CNY. | 375.35 |
| DeductedOfficialPrice | string | List price of the deducted amount. Unit: CNY. | 375.37 |
Sample success response
{
"Code": "Success",
"Message": "Successful",
"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": "ECS instance configuration",
"InstanceId": "spn-xxxxxxx",
"DeductInstanceId": "i-XXXXXXXXX",
"DeductCommodity": "Elastic Compute Service (ECS) - Pay-As-You-Go",
"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 |
|---|
| 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. |
For a complete list, see Error codes.
DescribeSavingsPlansUsageTotal
Queries the total usage of savings plans across a specified time range, including the overall utilization rate, pay-as-you-go cost, and savings amount.
Authorization
| Action | Access level | Resource type | Condition key | Dependent action |
|---|
bss:SavingsPlansAnalysis | get | All Resources (*) | None | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|
| StartPeriod | string | Yes | Start of the time range (inclusive) in yyyy-MM-dd HH:mm:ss format. | 2021-01-01 00:00:00 |
| EndPeriod | string | No | End of the time range (exclusive) in yyyy-MM-dd HH:mm:ss format. Defaults to the current time. | 2021-01-02 00:00:00 |
| PeriodType | string | Yes | Time granularity. Valid values: MONTH, DAY, HOUR. | HOUR |
| BillOwnerId | integer | No | Account ID of the resource owner. | 123745698925000 |
| FilterParam | object | No | Filter parameters. | |
| FilterParam.Dimensions | array<object> | No | Dimension filters. | |
| FilterParam.Dimensions.Code | string | No | Dimension code. | |
| FilterParam.Dimensions.Values | array<string> | No | Dimension values. | |
| FilterParam.Dimensions.SelectType | string | No | Selection type. | |
| FilterParam.Tags | array<object> | No | Tag filters. | |
| FilterParam.Tags.Code | string | No | Tag code. | |
| FilterParam.Tags.Values | array<string> | No | Tag values. | |
| FilterParam.Tags.SelectType | string | No | Selection type. | |
Response parameters
| Parameter | Type | Description | Example |
|---|
| Code | string | Status code. | Success |
| Message | string | Response message. | Successful! |
| RequestId | string | Request ID. | 79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
| Success | boolean | Whether the request succeeded. | true |
| Data | object | Response data. | |
| Data.PeriodCoverage | array<object> | Usage data for each period. | |
| Data.PeriodCoverage.Percentage | number | Usage rate for the period. | 1 |
| Data.PeriodCoverage.Period | string | Time period in yyyyMMddHH format. | 2021041500 |
| Data.TotalUsage | object | Summary of total usage. | |
| Data.TotalUsage.PostpaidCost | number | Pay-as-you-go cost. | 200 |
| Data.TotalUsage.SavedCost | number | Amount saved. | 100 |
| Data.TotalUsage.UsagePercentage | number | Overall usage rate. | 1 |
| Data.TotalUsage.PoolValue | number | Total commitment of the savings plan. | 100 |
Sample success response
{
"Code": "success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"PeriodCoverage": [
{
"Percentage": 1,
"Period": "2021041500"
}
],
"TotalUsage": {
"PostpaidCost": 200,
"SavedCost": 100,
"UsagePercentage": 1,
"PoolValue": 100
}
}
}
DescribeSavingsPlansUsageDetail
Queries per-instance usage details of savings plans, including the commitment, deduction amount, and savings for each instance.
Authorization
| Action | Access level | Resource type | Condition key | Dependent action |
|---|
bss:SavingsPlansAnalysis | get | All Resources (*) | None | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|
| StartPeriod | string | Yes | Start of the time range (inclusive) in yyyy-MM-dd HH:mm:ss format. | 2021-01-01 00:00:00 |
| EndPeriod | string | No | End of the time range (exclusive) in yyyy-MM-dd HH:mm:ss format. Defaults to the current time. | 2021-01-02 00:00:00 |
| PeriodType | string | Yes | Time granularity. Valid values: MONTH, DAY, HOUR. | HOUR |
| Token | string | No | Pagination token. Leave empty for the first request. An empty token in the response indicates all data has been returned. | eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9 |
| MaxResults | integer | No | Maximum entries per page. Default: 20. Maximum: 300. | 300 |
| BillOwnerId | integer | No | Account ID of the resource owner. Leave empty to query the current account and its linked accounts. Specify an account ID to query only that account. | 123745698925000 |
| FilterParam | object | No | Filter parameters (same structure as DescribeSavingsPlansUsageTotal). | |
Response parameters
| Parameter | Type | Description | Example |
|---|
| Code | string | Status code. | Success |
| Message | string | Response message. | Successful! |
| RequestId | string | Request ID. | 79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
| Success | boolean | Whether the request succeeded. | true |
| Data | object | Response data. | |
| Data.TotalCount | integer | Total entries. | 1000 |
| Data.NextToken | string | Token for the next page. Empty if all data is returned. | eyJwYWdlTnVtIjoyLCJwYWdlU2ldhsSI6MTB9 |
| Data.Items | array<object> | List of usage details. | |
Items fields:
| Parameter | Type | Description | Example |
|---|
| Status | string | Instance status. -1: overdue payment. 1: active. | -1 |
| Type | string | Savings plan type (general-purpose or ECS compute-optimized). | General-purpose |
| UsagePercentage | number | Usage rate. | 0.9 |
| UserId | integer | Account ID. | 123745698925000 |
| InstanceId | string | Savings plan instance ID. | spn-a1fhs54c243hP22 |
| Currency | string | Currency code. | CNY |
| PostpaidCost | number | Standard pay-as-you-go cost. | 4.2 |
| DeductValue | number | Amount deducted from the savings plan (used commitment). | 3.94 |
| StartPeriod | string | Start time of the period. | 2021-08-01 00:00:00 |
| SavedCost | number | Net savings. | 0.08 |
| PoolValue | number | Total commitment. | 29.84 |
| UserName | string | Account name. | test13@test.aliyun.com |
| EndPeriod | string | End time of the period. | 2021-08-09 00:00:00 |
Sample success response
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"TotalCount": 1000,
"NextToken": "eyJwYWdlTnVtIjoyLCJwYWdlU2ldhsSI6MTB9",
"Items": [
{
"Status": "-1",
"Type": "General-purpose",
"UsagePercentage": 0.9,
"UserId": 123745698925000,
"InstanceId": "spn-a1fhs54c243hP22",
"Currency": "CNY",
"PostpaidCost": 4.2,
"DeductValue": 3.94,
"StartPeriod": "2021-08-01 00:00:00",
"SavedCost": 0.08,
"PoolValue": 29.84,
"UserName": "test13@test.aliyun.com",
"EndPeriod": "2021-08-09 00:00:00"
}
]
}
}
DescribeSavingsPlansCoverageTotal
Queries the total coverage of savings plans over a specified time range, including coverage percentage and deduction amount.
Authorization
| Action | Access level | Resource type | Condition key | Dependent action |
|---|
bss:SavingsPlansAnalysis | get | All Resources (*) | None | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|
| StartPeriod | string | Yes | Start of the time range (inclusive) in yyyy-MM-dd HH:mm:ss format. | 2021-07-15 00:00:00 |
| EndPeriod | string | No | End of the time range (exclusive) in yyyy-MM-dd HH:mm:ss format. Defaults to the current time. | 2021-07-20 00:00:00 |
| PeriodType | string | Yes | Time granularity. Valid values: MONTH, DAY, HOUR. | HOUR |
| BillOwnerId | integer | No | Account ID of the resource owner. | 123745698925000 |
| FilterParam | object | No | Filter parameters (same structure as DescribeSavingsPlansUsageTotal). | |
Response parameters
| Parameter | Type | Description | Example |
|---|
| Code | string | Status code. | Success |
| Message | string | Response message. | Successful! |
| RequestId | string | Request ID. | 79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
| Success | boolean | Whether the request succeeded. | true |
| Data | object | Response data. | |
| Data.PeriodCoverage | array<object> | Coverage data for each period. | |
| Data.PeriodCoverage.Percentage | number | Coverage percentage for the period. | 1 |
| Data.PeriodCoverage.Period | string | Time period in yyyyMMddHH format. | 2021071500 |
| Data.TotalCoverage | object | Overall coverage summary. | |
| Data.TotalCoverage.CoveragePercentage | number | Total coverage percentage. | 1 |
| Data.TotalCoverage.DeductAmount | number | Total deduction amount. | 100 |
Sample success response
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"PeriodCoverage": [
{
"Percentage": 1,
"Period": "2021071500"
}
],
"TotalCoverage": {
"CoveragePercentage": 1,
"DeductAmount": 100
}
}
}
DescribeSavingsPlansCoverageDetail
Queries per-instance coverage details for savings plans, including coverage percentage, deduction amount, and total cost for each covered instance.
Authorization
| Action | Access level | Resource type | Condition key | Dependent action |
|---|
bss:SavingsPlansAnalysis | get | All Resources (*) | None | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|
| StartPeriod | string | Yes | Start of the time range (inclusive) in yyyy-MM-dd HH:mm:ss format. | 2021-01-01 00:00:00 |
| EndPeriod | string | No | End of the time range (exclusive) in yyyy-MM-dd HH:mm:ss format. Defaults to the current time. | 2021-01-01 00:00:00 |
| PeriodType | string | Yes | Time granularity. Valid values: MONTH, DAY, HOUR. | HOUR |
| Token | string | No | Pagination token. Leave empty for the first request. An empty token in the response indicates all data has been returned. | eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9 |
| MaxResults | integer | No | Maximum number of entries to return. | 20 |
| BillOwnerId | integer | No | Account ID of the resource owner. | 123745698925000 |
| FilterParam | object | No | Filter parameters (same structure as DescribeSavingsPlansUsageTotal). | |
Response parameters
| Parameter | Type | Description | Example |
|---|
| Code | string | Status code. | Success |
| Message | string | Response message. | Successful! |
| RequestId | string | Request ID. | 79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
| Success | boolean | Whether the request succeeded. | true |
| Data | object | Response data. | |
| Data.TotalCount | integer | Total entries. | 100 |
| Data.NextToken | string | Token for the next page. Empty if all data is returned. | eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9 |
| Data.Items | array<object> | List of coverage details. | |
Items fields:
| Parameter | Type | Description | Example |
|---|
| UserId | integer | User ID. | 1906589291020438 |
| OwnerId | integer | Resource owner ID. | 1906589291020438 |
| InstanceId | string | Instance ID of the covered resource. | i-bp1d9x623987rlj0dx4xx |
| Currency | string | Currency code. | CNY |
| InstanceSpec | string | Instance type. | ecs.sn1ne.3xlarge |
| PostpaidCost | number | Pay-as-you-go cost. | 200 |
| CoveragePercentage | number | Coverage percentage. | 0.9 |
| Region | string | Region. | China (Hangzhou) |
| DeductAmount | number | Deduction amount. | 5.5 |
| StartPeriod | string | Start time. | 2023-04-01 00:00:00 |
| TotalAmount | number | Total cost. | 6.11 |
| UserName | string | Account name. | xxx@test.aliyunid.com |
| EndPeriod | string | End time. | 2023-05-01 00:00:00 |
Sample success response
{
"Code": "success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"TotalCount": 100,
"NextToken": "eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9",
"Items": [
{
"UserId": 1906589291020438,
"OwnerId": 1906589291020438,
"InstanceId": "i-bp1d9x623987rlj0dx4xx",
"Currency": "CNY",
"InstanceSpec": "ecs.sn1ne.3xlarge",
"PostpaidCost": 200,
"CoveragePercentage": 0.9,
"Region": "China (Hangzhou)",
"DeductAmount": 5.5,
"StartPeriod": "2023-04-01 00:00:00",
"TotalAmount": 6.11,
"UserName": "xxx@test.aliyunid.com",
"EndPeriod": "2023-05-01 00:00:00"
}
]
}
}
QuerySavingsPlansDiscount
Queries the discount rates for savings plans based on payment mode, plan type, duration, and resource specifications.
Authorization
| Action | Access level | Resource type | Condition key | Dependent action |
|---|
bssapi:QuerySavingsPlansDiscount | get | All Resources (*) | None | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|
| PayMode | string | Yes | Payment mode. Valid values: total (all upfront), half (partial upfront), zero (no upfront). | total |
| SpnType | string | Yes | Savings plan type. Valid values: ecs (compute-optimized), universal (general-purpose). | universal |
| Cycle | string | Yes | Duration. | 1:Year |
| CommodityCode | string | Yes | Commodity code of the target service. | ecs |
| ModuleCode | string | No | Module code. | instance_type |
| PageSize | integer | No | Number of entries per page. | 20 |
| Locale | string | No | Language of the response. | ZH |
| PageNum | integer | No | Page number. | 1 |
| Spec | string | No | Resource type or instance type. | ecs.g6 |
| Region | string | No | Region ID. | cn-hangzhou |
| SpnCommodityCode | string | No | Commodity code of the savings plan. | savingplan_common_public_cn |
Response parameters
| Parameter | Type | Description | Example |
|---|
| Code | string | Status code. | Success |
| Message | string | Response message. | Successful! |
| RequestId | string | Request ID. | 6000EE23-274B-4E07-A697-FF2E999520A4 |
| Success | boolean | Whether the request succeeded. | true |
| Data | object | Response data. | |
| Data.HostId | string | Host ID. | sg |
| Data.Items | array<object> | List of discount details. | |
Items fields:
| Parameter | Type | Description | Example |
|---|
| CommodityName | string | Product name. | Pay-as-you-go Elastic Compute Service (ECS) instance |
| ModuleName | string | Pricing module name. | Instance |
| SpnType | string | Savings plan type. | universal |
| PayMode | string | Payment mode. Valid values: total (All Upfront), half (Partial Upfront), zero (No Upfront). | total |
| Cycle | string | Duration. | 1:Year |
| Region | string | Region. | cn-zhangjiakou-na62-a01 |
| RegionCode | string | Region ID. | cn-hangzhou |
| Spec | string | Instance type. | ecs.g6 |
| DiscountRate | string | Official discount rate. | 0.85 |
| ContractDiscountRate | string | Contract discount rate. | 0.85 |
Sample success response
{
"Message": "Successful",
"RequestId": "6000EE23-274B-4E07-A697-FF2E999520A4",
"Data": {
"HostId": "sg",
"Items": [
{
"CommodityName": "Pay-as-you-go Elastic Compute Service (ECS) instance",
"ModuleName": "Instance",
"SpnType": "universal",
"PayMode": "total",
"Cycle": "1:Year",
"Region": "cn-zhangjiakou-na62-a01",
"RegionCode": "cn-hangzhou",
"Spec": "ecs.g6",
"DiscountRate": "0.85",
"ContractDiscountRate": "0.85"
}
]
},
"Code": "Success",
"Success": true
}