Obtém os preços para atualizar uma instância ECS por assinatura ativa para um tipo de instância de destino e para adicionar um disco de dados por assinatura.
Descrição da operação
-
Você pode consultar os preços para atualizar instâncias ECS por assinatura não expiradas, mas não para fazer downgrade delas.
-
Você não pode consultar preços para redimensionar instâncias ECS pagas conforme o uso. Como uma instância redimensionada tem o mesmo preço de uma nova, chame DescribePrice para obter o preço atual.
-
Antes de atualizar uma instância, chame DescribeResourcesModification para encontrar os tipos de instância disponíveis para atualização em uma zona de disponibilidade específica.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
ecs:DescribeInstanceModificationPrice |
get |
*Instance
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Sim |
O ID da região. Você pode chamar a operação DescribeRegions para obter a lista mais recente de regiões da Alibaba Cloud. |
cn-hangzhou |
| InstanceId |
string |
Sim |
O ID da instância para a qual consultar o preço de modificação. |
i-bp1f2o4ldh8l**** |
| InstanceType |
string |
Não |
O tipo de instância de destino para a atualização da instância. Chame a operação DescribeResourcesModification para consultar os tipos de instância disponíveis para atualização na zona de disponibilidade especificada. Nota
Você deve especificar pelo menos um dos parâmetros |
ecs.g6e.large |
| SystemDisk.Category |
string |
Não |
A categoria do disco do sistema. Este parâmetro é necessário apenas quando você atualiza uma instância não otimizada para E/S de um tipo de instância descontinuado para uma instância otimizada para E/S de um tipo de instância disponível. Para obter mais informações sobre tipos de instância, consulte família de instâncias e tipos de instância descontinuados. Valores válidos:
Valor padrão: Nenhum. |
cloud_ssd |
| SystemDisk |
object |
Não |
||
| Category |
string |
Não |
||
| PerformanceLevel |
string |
Não |
PL0 |
|
| Size |
integer |
Não |
40 |
|
| DataDisk |
array<object> |
Não |
The data disk configurations. |
|
|
object |
Não |
The data disk configuration. |
||
| PerformanceLevel |
string |
Não |
The performance level of the ESSD. This parameter is valid only when DataDisk.N.Category is set to cloud_essd. The value of N must match the N in DataDisk.N.Category. Valid values: - PL0: up to 10,000 random read/write IOPS per disk. - PL1: up to 50,000 random read/write IOPS per disk. - PL2: up to 100,000 random read/write IOPS per disk. - PL3: up to 1,000,000 random read/write IOPS per disk. Default value: PL1. For more information about ESSD performance levels, see ESSDs. |
PL1 |
| Size |
integer |
Não |
The size of data disk N in GiB, where N is an integer from 1 to 16. The value range varies based on the disk category:
- |
100 |
| Category |
string |
Não |
The category of data disk N, where N is an integer from 1 to 16. Use this parameter to query the price of adding a new data disk to the instance. Valid values: |
cloud_essd |
| DiskId |
string |
Não |
d-bf4rupt9**** |
|
| ImageId |
string |
Não |
aliyun_2_1903_x64_20G_alibase_20200324.vhd |
|
| InternetMaxBandwidthOut |
integer |
Não |
10 |
|
| ISP |
string |
Não |
BGP |
|
| InternetChargeType |
string |
Não |
PayByTraffic |
|
| StartTime |
string |
Não |
2025-12-05T22:40Z |
|
| EndTime |
string |
Não |
2025-12-06T22Z |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| RequestId |
string |
O ID da solicitação. |
A3DC3196-379B-4F32-A2C5-B937134FAD8A |
| PriceInfo |
object |
Informações de preço, incluindo detalhes de preço e regras promocionais. |
|
| Rules |
object |
||
| Rule |
array<object> |
A list of promotional rules. |
|
|
object |
|||
| Description |
string |
The description of the rule. |
升级优惠 |
| RuleId |
integer |
The rule ID. |
1234567890 |
| Price |
object |
Os detalhes do preço. |
|
| OriginalPrice |
number |
The original price. |
175.200 |
| DiscountPrice |
number |
The discount amount. |
61.320 |
| Currency |
string |
The currency. Valid values:
|
CNY |
| TradePrice |
number |
The final price (original price - discount). |
113.880 |
| DetailInfos |
object |
||
| DetailInfo |
array<object> |
A list of price details for each resource in the configuration. Nota
This parameter is returned only when |
|
|
array<object> |
Price details for a single resource. |
||
| Resource |
string |
The resource type. Valid values:
|
instanceType |
| OriginalPrice |
number |
The original price. |
4368 |
| DiscountPrice |
number |
The discount amount. |
655.2 |
| TradePrice |
number |
The final price. |
3712.8 |
| SubRules |
object |
||
| Rule |
array<object> |
Pricing rule subsets. |
|
|
object |
A single pricing rule subset. |
||
| Description |
string |
The rule subset description. |
买满1年,立享官网价格8.5折优惠 |
| RuleId |
integer |
The rule ID. |
315716429631488 |
| RelatedPrice |
object |
||
| MarketplaceImagePrice |
object |
||
| Currency |
string |
CNY |
|
| OriginalPrice |
number |
100 |
|
| DiscountPrice |
number |
0 |
|
| TradePrice |
number |
100 |
Exemplos
Resposta de sucesso
JSON formato
{
"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
}
}
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | MissingParameter.InstanceTypeOrDataDisk | You must specify the parameter InstanceType or DataDisk. | |
| 400 | InvalidSystemDiskCategory.ValueNotSupported | The specified parameter "SystemDisk.Category" is not valid. | The specified parameter system disk specification is invalid. |
| 400 | InvalidDiskCategory.Missing | The DataDisk.1.Category parameter that is mandatory for processing the request is not provided. | The mandatory parameter DataDiskCategory 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. | The specified cloud disk type DiskCategory is invalid. |
| 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. | The specified instance type does not exist or you are not authorized to manage instances of this instance type. |
| 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. | The price of the specified resource does not exist. Modify the parameter value and try again later. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 403 | InvalidParameter.ResourceOwnerAccount | ResourceOwnerAccount is Invalid. | The specified ResourceOwnerAccount parameter 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. | The specified instance type can be used only for a configuration downgrade of the specified instance, and this API operation can be used to query pricing information about instance types only for instance configuration upgrades. We recommend that you call the DescribeResourcesModification operation to query the instance types available for instance configuration upgrades. |
| 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 | The specified instance type is retired. Select another instance type. |
| 403 | RegionUnauthorized | There is no authority to create instance in the specified region. | You are not authorized to create instances in the specified region. |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | Region information error |
| 404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | The specified resource group does not exist. |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instanceId is invalid. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.