Mengkueri harga peningkatan Instance ECS berlangganan yang belum kedaluwarsa ke tipe instans target dan harga penambahan disk data berlangganan.
Deskripsi operasi
Anda hanya dapat mengkueri harga peningkatan Instance ECS berlangganan yang belum kedaluwarsa. Pengkuerian harga penurunan instans tidak didukung.
Anda tidak dapat mengkueri harga perubahan konfigurasi Instance ECS pay-as-you-go. Karena harga Instance ECS pay-as-you-go setelah perubahan konfigurasi sama dengan harga instans baru, Anda dapat memanggil DescribePrice untuk mengkueri harga terbaru Instance ECS.
Sebelum meningkatkan instans, panggil DescribeResourcesModification untuk mengkueri tipe instans yang tersedia untuk peningkatan di zona tertentu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeInstanceModificationPrice |
get |
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| InstanceId |
string |
Yes |
ID instans yang ingin Anda kueri harga peningkatannya. |
i-bp1f2o4ldh8l**** |
| InstanceType |
string |
No |
Tipe instans target untuk peningkatan. Panggil DescribeResourcesModification untuk mengkueri tipe instans yang tersedia untuk peningkatan di zona tertentu. Catatan
Saat memanggil operasi ini, parameter tipe instans (InstanceType) dan parameter disk data (DataDisk.N.*) tidak boleh kosong secara bersamaan. Anda harus menentukan setidaknya salah satunya. |
ecs.g6e.large |
| SystemDisk.Category |
string |
No |
系统盘类型。仅当从已停售的实例规格升配至在售实例规格,并将非 I/O 优化实例规格升级为 I/O 优化实例规格时,才需要传入参数值。关于实例规格的更多信息,请参见实例规格族以及已停售的实例规格。 取值范围:
默认值:无。 |
cloud_ssd |
| DataDisk |
array |
No |
||
| DataDisk |
array<object> |
No |
Informasi tentang tipe disk data. |
|
|
object |
No |
Informasi tentang tipe disk data. |
||
| PerformanceLevel |
string |
No |
Tingkat kinerja disk data saat disk data adalah SSD Perusahaan (ESSD). Nilai N harus sama dengan nilai pada DataDisk.N.Category=cloud_essd. Nilai valid:
Nilai default: PL1. Untuk informasi selengkapnya tentang cara memilih tingkat kinerja ESSD, lihat Enterprise SSDs. |
PL1 |
| Size |
integer |
No |
Kapasitas disk data. Nilai valid N: 1 hingga 16. Unit: GiB. Nilai valid:
Nilai default: kapasitas minimum untuk kategori disk data yang ditentukan. |
100 |
| Category |
string |
No |
Kategori disk data. Tentukan parameter ini saat Anda ingin mengkueri harga disk data berlangganan baru yang akan dilampirkan ke Instance ECS. Nilai valid N: 1 hingga 16. Nilai valid:
Nilai default: null. Catatan
Saat memanggil operasi ini, parameter tipe instans (InstanceType) dan parameter disk data (DataDisk.N.*) tidak boleh kosong secara bersamaan. Anda harus menentukan setidaknya salah satunya. |
cloud_essd |
| DiskId |
string |
No |
d-bf4rupt9**** |
|
| ImageId |
string |
No |
aliyun_2_1903_x64_20G_alibase_20200324.vhd |
|
| InternetMaxBandwidthOut |
integer |
No |
10 |
|
| ISP |
string |
No |
BGP |
|
| InternetChargeType |
string |
No |
PayByTraffic |
|
| StartTime |
string |
No |
2025-12-05T22:40Z |
|
| EndTime |
string |
No |
2025-12-06T22Z |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
A3DC3196-379B-4F32-A2C5-B937134FAD8A |
| PriceInfo |
object |
Informasi harga, termasuk detail harga dan aturan diskon. |
|
| Rules |
object |
||
| Rule |
array<object> |
The promotion rules. |
|
|
object |
|||
| Description |
string |
The description of the promotion rule. |
升级优惠 |
| RuleId |
integer |
The promotion ID. |
1234567890 |
| Price |
object |
Harga. |
|
| OriginalPrice |
number |
The original price. |
175.200 |
| DiscountPrice |
number |
The discount. |
61.320 |
| Currency |
string |
The currency. Valid values:
|
CNY |
| TradePrice |
number |
The final price. The value is |
113.880 |
| DetailInfos |
object |
||
| DetailInfo |
array<object> |
The price details of the resource. Catatan
This parameter is returned only when |
|
|
array<object> |
The price details of the resource. |
||
| Resource |
string |
The resource name. Valid values:
|
instanceType |
| OriginalPrice |
number |
The original price. |
4368 |
| DiscountPrice |
number |
The discounted price. |
655.2 |
| TradePrice |
number |
The transaction price. |
3712.8 |
| SubRules |
object |
||
| Rule |
array<object> |
The pricing sub-rules. |
|
|
object |
The pricing sub-rules. |
||
| Description |
string |
The description of the sub-rule. |
买满1年,立享官网价格8.5折优惠 |
| RuleId |
integer |
The ID of the promotion rule. |
315716429631488 |
| RelatedPrice |
object |
||
| MarketplaceImagePrice |
object |
||
| Currency |
string |
CNY |
|
| OriginalPrice |
number |
100 |
|
| DiscountPrice |
number |
0 |
|
| TradePrice |
number |
100 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "A3DC3196-379B-4F32-A2C5-B937134FAD8A",
"PriceInfo": {
"Rules": {
"Rule": [
{
"Description": "升级优惠",
"RuleId": 1234567890
}
]
},
"Price": {
"OriginalPrice": 175.2,
"DiscountPrice": 61.32,
"Currency": "CNY",
"TradePrice": 113.88,
"DetailInfos": {
"DetailInfo": [
{
"Resource": "instanceType",
"OriginalPrice": 4368,
"DiscountPrice": 655.2,
"TradePrice": 3712.8,
"SubRules": {
"Rule": [
{
"Description": "买满1年,立享官网价格8.5折优惠",
"RuleId": 315716429631488
}
]
}
}
]
}
},
"RelatedPrice": {
"MarketplaceImagePrice": {
"Currency": "CNY",
"OriginalPrice": 100,
"DiscountPrice": 0,
"TradePrice": 100
}
}
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter.InstanceTypeOrDataDisk | You must specify the parameter InstanceType or DataDisk. | |
| 400 | InvalidSystemDiskCategory.ValueNotSupported | The specified parameter "SystemDisk.Category" is not valid. | |
| 400 | InvalidDiskCategory.Missing | The DataDisk.1.Category parameter that is mandatory for processing the request is not provided. | |
| 400 | InvalidDataDiskCategory.ValueNotSupported | The specified parameter "DataDisk.n.Category" is not valid. | |
| 400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | |
| 400 | InvalidDataDiskSize.ValueNotSupported | The specified DataDisk.n.Size beyond the permitted range. | |
| 400 | InvalidPerformanceLevel.Malformed | The specified parameter DataDisk.n.PerformanceLevel is not valid. | |
| 400 | InvalidDiskSize.TooSmall | Specified disk size is too small when choose PL0 of cloud_essd. | |
| 400 | OperationDenied.PerformanceLevelNotMatch | The specified DataDisk.n.PerformanceLevel and DataDisk.n.Size do not match. | |
| 400 | InvalidInstanceType.ValueNotSupported | The specified InstanceType does not exist or beyond the permitted range. | |
| 400 | InvalidAction.WithActiveElasticUpgrade | The instance has active Elastic Upgrade. | |
| 400 | PriceNotFound | The price of your queried resource is not available now, please try other resources. | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 403 | InvalidParameter.ResourceOwnerAccount | ResourceOwnerAccount is Invalid. | |
| 403 | ChargeTypeViolation | PostPaid instance do not support this operation. | |
| 403 | InvalidInstanceType.NotSupportUpgrade | The specified InstanceType can only be downgraded. This API supports querying prices only of InstanceType that can be upgraded. | |
| 403 | InstanceExpired | The PrePaid instance has been expired. | |
| 403 | Throttling.User | Request was denied due to user flow control. | |
| 403 | Throttling | Request was denied due to request throttling. | |
| 403 | InstanceType.Offline | The specified InstanceType has been offline | |
| 403 | RegionUnauthorized | There is no authority to create instance in the specified region. | |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | |
| 404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.