Mengkueri harga perpanjangan sumber daya Elastic Compute Service (ECS). Hanya sumber daya langganan yang didukung.
Deskripsi operasi
Hanya harga untuk memperpanjang instans ECS langganan untuk durasi tertentu atau memperpanjangnya ke tanggal kedaluwarsa terpadu yang didukung.
- Perhatikan hal berikut saat Anda mengatur parameter:
Jika Anda hanya mengatur parameter wajib, harga untuk memperpanjang instans selama satu bulan akan dikembalikan secara default.
Anda tidak dapat mengkueri harga durasi perpanjangan dan harga tanggal kedaluwarsa terpadu secara bersamaan. Parameter durasi perpanjangan (
PerioddanPeriodUnit) dan parameter tanggal kedaluwarsa terpadu (ExpectedRenewDay) tidak dapat diatur secara bersamaan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeRenewalPrice |
get |
DedicatedHost
Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah instans. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ResourceType |
string |
No |
Jenis sumber daya yang harga perpanjangannya ingin Anda kueri. Nilai valid: instance. Nilai default: instance. |
instance |
| ResourceId |
string |
Yes |
ID sumber daya yang harga perpanjangannya ingin Anda kueri. Ketika |
i-bp1f2o4ldh8l29zv**** |
| Period |
integer |
No |
Durasi perpanjangan. Nilai valid:
Nilai default: 1. Catatan
Parameter durasi perpanjangan ( |
1 |
| PriceUnit |
string |
No |
Unit durasi perpanjangan. Nilai valid:
Nilai default: Month. |
Month |
| ExpectedRenewDay |
integer |
No |
Tanggal kedaluwarsa terpadu. Setelah Anda menentukan parameter ini, harga untuk memperpanjang instans ke tanggal kedaluwarsa terpadu akan dikembalikan. Nilai valid: 1 hingga 28. Untuk informasi lebih lanjut tentang fitur tanggal kedaluwarsa terpadu, lihat Pengaturan untuk kedaluwarsa instans. Catatan
Parameter durasi perpanjangan ( |
5 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| PriceInfo |
object |
Informasi harga, termasuk detail harga dan aturan diskon. |
|
| Rules |
object |
||
| Rule |
array<object> |
Aturan promosi. |
|
|
object |
|||
| Description |
string |
Deskripsi aturan promosi. |
Save 15% off the published price when you purchase 1 year of service. |
| RuleId |
integer |
ID promosi. |
1234567890 |
| Price |
object |
Harga. |
|
| OriginalPrice |
number |
Harga asli. |
4368 |
| DiscountPrice |
number |
Diskon. |
655.2 |
| Currency |
string |
Unit mata uang. Situs China: CNY. Situs internasional: USD. |
CNY |
| TradePrice |
number |
Harga akhir. Harga ini sama dengan harga asli dikurangi diskon. |
3712.8 |
| DetailInfos |
object |
||
| DetailInfo |
array<object> |
Detail penetapan harga sumber daya. |
|
|
array<object> |
|||
| Resource |
string |
Nama sumber daya yang sesuai dengan harga. |
instance |
| OriginalPrice |
number |
Harga asli. |
4368 |
| DiscountPrice |
number |
Harga diskon. |
655.2 |
| TradePrice |
number |
Harga transaksi. |
3712.8 |
| SubRules |
object |
||
| Rule |
array<object> |
Subkumpulan aturan penetapan harga. |
|
|
object |
|||
| Description |
string |
Deskripsi aturan penetapan harga. |
Save 15% off the published price when you purchase 1 year of service. |
| RuleId |
integer |
ID aturan penetapan harga. |
1234567890 |
| RelatedPrice |
object |
||
| MarketplaceImagePrice |
object |
||
| Currency |
string |
CNY |
|
| OriginalPrice |
number |
200 |
|
| DiscountPrice |
number |
0 |
|
| TradePrice |
number |
200 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PriceInfo": {
"Rules": {
"Rule": [
{
"Description": "Save 15% off the published price when you purchase 1 year of service.",
"RuleId": 1234567890
}
]
},
"Price": {
"OriginalPrice": 4368,
"DiscountPrice": 655.2,
"Currency": "CNY",
"TradePrice": 3712.8,
"DetailInfos": {
"DetailInfo": [
{
"Resource": "instance",
"OriginalPrice": 4368,
"DiscountPrice": 655.2,
"TradePrice": 3712.8,
"SubRules": {
"Rule": [
{
"Description": "Save 15% off the published price when you purchase 1 year of service.",
"RuleId": 1234567890
}
]
}
}
]
}
},
"RelatedPrice": {
"MarketplaceImagePrice": {
"Currency": "CNY",
"OriginalPrice": 200,
"DiscountPrice": 0,
"TradePrice": 200
}
}
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidResourceType.ValueNotSupported | The specified parameter ResourceType is not valid. | The specified ResourceType parameter is invalid. |
| 400 | InvalidPeriod | The specified period is not valid. | The specified period is invalid. |
| 400 | InvalidPriceUnit.ValueNotSupported | The specified parameter PriceUnit is not valid. | The specified PriceUnit parameter is invalid. |
| 400 | Throttling | Request was denied due to request throttling. | The request was denied due to request throttling. |
| 400 | Throttling.User | Request was denied due to user flow control. | |
| 400 | InternalError | The request processing has failed due to some unknown error. | An internal error has occurred. Try again later. |
| 400 | InvalidPeriod.ExceededMaximumExpirationDate | The specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt. | The specified renewal period cannot exceed the maximum expiration date. We recommend that you shorten the renewal period when you try again. |
| 400 | InvalidExpectedRenewDay.Conflict | The specified expectedRenewDay is in conflict with period. | |
| 400 | InvalidExpectedRenewDay.ValueNotSupported | The specified parameter ExpectedRenewDay is not valid. | |
| 400 | InvalidPeriod.ExceededDedicatedHost | Instance expired date can not exceed dedicated host expired date. | The expiration date of the instance cannot exceed the expiration date of the dedicated host. |
| 400 | OperationRestricted.Renewal | The renewal operation has been restricted because the zone is closed. %s | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 403 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | |
| 403 | InvalidAction.Unauthorized | The specified action is not valid. | The specified action is invalid. |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified InstanceId parameter is invalid. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.