All Products
Search
Document Center

Elastic Compute Service:DescribeInstanceModificationPrice

Last Updated:Mar 19, 2024

Queries the pricing information about newly attached subscription data disks or about the new instance types when you upgrade the configurations of unexpired subscription Elastic Compute Service (ECS) instances.

Operation description

  • Pricing information can be queried for unexpired subscription ECS instances only when you upgrade their configurations. The pricing information cannot be queried when the instance configurations are downgraded.
  • Pricing information cannot be queried for pay-as-you-go ECS instances when you change their configurations. Prices of existing pay-as-you-go ECS instances whose configurations are changed are the same as those of new pay-as-you-go instances. You can call the DescribePrice operation to query the latest prices of ECS instances.
  • Before you upgrade the configurations of an instance, we recommend that you call the DescribeResourcesModification operation to query the instance types available for configuration upgrades in a specified zone.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
InstanceIdstringYes

The ID of the instance for which you want to query pricing information for a configuration upgrade.

i-bp1f2o4ldh8l****
InstanceTypestringNo

The new instance type. We recommend that you call the DescribeResourcesModification operation to query the instance types available for configuration upgrades in a specified zone.

Note When you call the DescribeInstanceModificationPrice operation, you must specify at least one of the following parameters: InstanceType and DataDisk.N.*.
ecs.g6e.large
SystemDisk.CategorystringNo

The category of the system disk. You must specify this parameter only when you upgrade a non-I/O optimized instance of a retired instance type to an I/O optimized instance of an available instance type. For more information about instance types, see Instance families and Retired instance types.

Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD

This parameter is empty by default.

cloud_ssd
DataDiskobject []No

The information about the data disk.

PerformanceLevelstringNo

The performance level of data disk N that is an enhanced SSD (ESSD). The value of N must be the same as that in DataDisk.N.Category when DataDisk.N.Category is set to cloud_essd. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

Default value: PL1.

For more information about ESSD performance levels, see ESSDs .

PL1
SizeintegerNo

The capacity of data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values:

  • Valid values when DataDisk.N.Category is set to cloud_efficiency: 20 to 32768.

  • Valid values when DataDisk.N.Category is set to cloud_ssd: 20 to 32768.

  • Valid values when DataDisk.N.Category is set to cloud_essd: depends on the value of DataDisk.N.PerformanceLevel.

    • Valid values when DataDisk.N.PerformanceLevel is set to PL0: 40 to 32768.
    • Valid values when DataDisk.N.PerformanceLevel is set to PL1: 20 to 32768.
    • Valid values when DataDisk.N.PerformanceLevel is set to PL2: 461 to 32768.
    • Valid values when DataDisk.N.PerformanceLevel is set to PL3: 1261 to 32768.
  • Valid values when DataDisk.N.Category is set to cloud: 5 to 2000.

The default value is the minimum capacity allowed for the specified data disk category.

100
CategorystringNo

The category of data disk N. You can specify this parameter if you want to query the pricing information about newly attached subscription data disks. Valid values of N: 1 to 16. Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
  • cloud: basic disk

This parameter is empty by default.

Note When you call the DescribeInstanceModificationPrice operation, you must specify at least one of the following parameters: InstanceType and DataDisk.N.*.
cloud_essd

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

A3DC3196-379B-4F32-A2C5-B937134FAD8A
PriceInfoobject

Details about the prices and promotion rules.

Rulesobject []

The promotion rules.

Descriptionstring

The description of the promotion rule.

Upgrade offers
RuleIdlong

The ID of the promotion rule.

1234567890
Priceobject

The price.

OriginalPricefloat

The original price.

175.200
DiscountPricefloat

The discount.

61.320
Currencystring

The currency unit.

Alibaba Cloud China site (aliyun.com): CNY

Alibaba Cloud International site (alibabacloud.com): USD

CNY
TradePricefloat

The transaction price, which is equal to the original price minus the discount.

113.880

Examples

Sample success responses

JSONformat

{
  "RequestId": "A3DC3196-379B-4F32-A2C5-B937134FAD8A",
  "PriceInfo": {
    "Rules": {
      "Rule": [
        {
          "Description": "Upgrade offers\n",
          "RuleId": 1234567890
        }
      ]
    },
    "Price": {
      "OriginalPrice": 175.2,
      "DiscountPrice": 61.32,
      "Currency": "CNY",
      "TradePrice": 113.88
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter.InstanceTypeOrDataDiskYou must specify the parameter InstanceType or DataDisk.-
400InvalidSystemDiskCategory.ValueNotSupportedThe specified parameter "SystemDisk.Category" is not valid.-
400InvalidDiskCategory.MissingThe DataDisk.1.Category parameter that is mandatory for processing the request is not provided.The mandatory parameter DataDiskCategory is not provided.
400InvalidDataDiskCategory.ValueNotSupportedThe specified parameter "DataDisk.n.Category" is not valid.-
400InvalidDiskCategory.ValueNotSupportedThe specified parameter "DiskCategory" is not valid.-
400InvalidDataDiskSize.ValueNotSupportedThe specified DataDisk.n.Size beyond the permitted range.-
400InvalidPerformanceLevel.MalformedThe specified parameter DataDisk.n.PerformanceLevel is not valid.-
400InvalidDiskSize.TooSmallSpecified disk size is too small when choose PL0 of cloud_essd-
400OperationDenied.PerformanceLevelNotMatchThe specified DataDisk.n.PerformanceLevel and DataDisk.n.Size do not match.-
400InvalidInstanceType.ValueNotSupportedThe 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.
400InstanceType.Offline%sThe operation is not supported while the instance type is retired or while resources of the instance type are insufficient.
400RegionUnauthorized%s-
400InvalidAction.WithActiveElasticUpgradeThe instance has active Elastic Upgrade.The operation is not supported while the instance are being temporarily upgraded. The instance goes through a temporary configuration upgrade if the EndTime parameter is specified to call the ModifyPrepayInstanceSpec operation.
400PriceNotFoundThe 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.
403InvalidParameter.ResourceOwnerAccountResourceOwnerAccount is Invalid.The specified ResourceOwnerAccount parameter is invalid.
403ChargeTypeViolationPostPaid instance do not support this operation.-
403InvalidInstanceType.NotSupportUpgradeThe 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.
403InstanceExpiredThe PrePaid instance has been expired.-
403Throttling.UserRequest was denied due to user flow control.-
403ThrottlingRequest was denied due to request throttling.-
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.The RegionId provided does not exist
404InvalidResourceGroup.NotFoundThe ResourceGroup provided does not exist in our records.The specified resource group does not exist.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.
500InternalError%sAn internal error has occurred.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history