全部產品
Search
文件中心

Elastic Compute Service:DescribeInstanceModificationPrice

更新時間:Sep 29, 2026

呼叫 DescribeInstanceModificationPrice 查詢未到期的包年包月 ECS 執行個體升配時目標執行個體規格的價格資訊、新增包年包月資料磁碟的價格資訊。

介面說明

  • 僅支援查詢未到期的包年包月 ECS 執行個體升配的價格資訊,暫不支援查詢執行個體降配的價格資訊。

  • 不支援查詢按量付費 ECS 執行個體變配時的價格資訊。由於按量付費 ECS 執行個體變配後的價格與新購執行個體的價格一致,因此您可以直接呼叫 DescribePrice 查詢 ECS 執行個體的最新價格。

  • 執行個體升配前,建議您先呼叫 DescribeResourcesModification 查詢指定可用區內可升配的執行個體規格資訊。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

ecs:DescribeInstanceModificationPrice

get

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#InstanceId}

無 無

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

是

地域 ID。您可以呼叫 DescribeRegions 查看最新的阿里雲地域清單。

cn-hangzhou

InstanceId

string

是

需要查詢升配價格的執行個體 ID。

i-bp1f2o4ldh8l****

InstanceType

string

否

執行個體升配的目標執行個體規格。建議您先呼叫 DescribeResourcesModification 查詢指定可用區內可升配的執行個體規格資訊。

說明

查詢時,執行個體規格參數(InstanceType)和資料磁碟參數(DataDisk.N.*)不得同時為空,必須至少指定一個。

ecs.g6e.large

SystemDisk.Category

string

否

系統磁碟類型。僅當從已停售的執行個體規格升配至在售執行個體規格,並將非 I/O 最佳化執行個體規格升級為 I/O 最佳化執行個體規格時,才需要傳入參數值。關於執行個體規格的更多資訊,請參見執行個體規格族以及已停售的執行個體規格。

取值範圍:

  • cloud_efficiency:高效雲端硬碟。

  • cloud_ssd:SSD 雲端硬碟。

預設值:無。

cloud_ssd

SystemDisk

object

否

修改系統磁碟。

Category

string

否

系統磁碟類型。

PerformanceLevel

string

否

系統磁碟效能等級。

PL0

Size

integer

否

系統磁碟大小。

40

DataDisk

array<object>

否

資料磁碟類型資訊。

object

否

資料磁碟類型資訊。

PerformanceLevel

string

否

當資料磁碟類型為 ESSD 雲端硬碟時,設定雲端硬碟的效能等級。N 的取值必須和 DataDisk.N.Category=cloud_essd 中的 N 保持一致。取值範圍:

  • PL0:單碟最高隨機讀寫 IOPS 1 萬。

  • PL1:單碟最高隨機讀寫 IOPS 5 萬。

  • PL2:單碟最高隨機讀寫 IOPS 10 萬。

  • PL3:單碟最高隨機讀寫 IOPS 100 萬。

預設值:PL1。

有關如何選擇 ESSD 效能等級,請參見ESSD 雲端硬碟。

PL1

Size

integer

否

資料磁碟的容量大小。N 的取值範圍:1~16,記憶體單位為 GiB。取值範圍:

  • cloud_efficiency:20~32768。

  • cloud_ssd:20~32768。

  • cloud_essd:具體取值範圍與 DataDisk.N.PerformanceLevel 的取值有關。
    • PL0:1~32768。

    • PL1:20~32768。

    • PL2:461~32768。

    • PL3:1261~32768。

  • cloud:5~2000。

預設值:指定資料磁碟類型相應的容量大小的最小值。

100

Category

string

否

資料磁碟類型。當您需要查詢 ECS 執行個體掛載的新包年包月資料磁碟的價格時,可以傳入該參數值。N 的取值範圍:1~16。取值範圍:

  • cloud_efficiency:高效雲端硬碟。

  • cloud_ssd:SSD 雲端硬碟。

  • cloud_essd:ESSD 雲端硬碟。

  • cloud:普通雲端硬碟。

預設值:無。

說明

查詢時,執行個體規格參數(InstanceType)和資料磁碟參數(DataDisk.N.*)不得同時為空,必須至少指定一個。

cloud_essd

DiskId

string

否

資料磁碟 ID。 DiskId 為空,表示新增資料磁碟; DiskId 不為空,表示修改資料磁碟。

d-bf4rupt9****

ImageId

string

否

映像 ID。

aliyun_2_1903_x64_20G_alibase_20200324.vhd

InternetMaxBandwidthOut

integer

否

公網出頻寬最大值。

10

ISP

string

否

網路營運商。

BGP

InternetChargeType

string

否

轉換網路計費方式。 ● PayByBandwidth:按固定頻寬計費。 ● PayByTraffic:按使用流量計費。

PayByTraffic

StartTime

string

否

臨時頻寬變更開始時間,格式為 ISO 8601,時區為 UTC。 僅當 InternetMaxBandwidthOut 不為空時生效。

2025-12-05T22:40Z

EndTime

string

否

臨時頻寬變更結束時間,格式為 ISO 8601,時區為 UTC。 僅當 InternetMaxBandwidthOut 不為空時生效。

2025-12-06T22Z

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

A3DC3196-379B-4F32-A2C5-B937134FAD8A

PriceInfo

object

價格資訊類型(PriceInfo)組成的資料類型,包括價格和優惠規則資訊。

Rules

object

Rule

array<object>

活動規則。

object

Description

string

活動規則描述。

升级优惠

RuleId

integer

活動 ID。

1234567890

Price

object

價格。

OriginalPrice

number

原價。

175.200

DiscountPrice

number

折扣。

61.320

Currency

string

貨幣單位。可能值:

  • 中國站:CNY。

  • 國際站:USD。

CNY

TradePrice

number

最終價,為原價減去折扣。

113.880

DetailInfos

object

DetailInfo

array<object>

配置明細價格資訊。

說明

僅當 ResourceType = instance 時傳回。

array<object>

配置明細價格資訊。

Resource

string

配置名稱。可能值:

  • instanceType:執行個體。

  • bandwidth:頻寬。

  • image:映像。

  • systemDisk:系統磁碟。

  • dataDisk:資料磁碟。

instanceType

OriginalPrice

number

原價。

4368

DiscountPrice

number

折扣價。

655.2

TradePrice

number

成交價。

3712.8

SubRules

object

Rule

array<object>

定價規則子集。

object

定價規則子集。

Description

string

規則子集描述。

买满1年,立享官网价格8.5折优惠

RuleId

integer

活動規則 ID。

315716429631488

RelatedPrice

object

關聯價格。

MarketplaceImagePrice

object

市場映像價格。

Currency

string

貨幣單位。

中國站:CNY。

國際站:USD。

CNY

OriginalPrice

number

原價。

100

DiscountPrice

number

優惠折扣。

0

TradePrice

number

最終價,為原價減去優惠折扣。

100

樣本

正常返回樣本

JSON格式

{
  "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
      }
    }
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 MissingParameter.InstanceTypeOrDataDisk You must specify the parameter InstanceType or DataDisk. 執行個體規格和資料磁碟參數二選一必須傳一個,不能都為空。
400 InvalidSystemDiskCategory.ValueNotSupported The specified parameter "SystemDisk.Category" is not valid. 指定的 SystemDisk.Size 不合法。
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. 指定的參數 DataDisk.n.Size 超出取值範圍。
400 InvalidPerformanceLevel.Malformed The specified parameter DataDisk.n.PerformanceLevel is not valid. 指定的參數 PerformanceLevel 無效。
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. 未找到價格,請修改相應的參數值重試。
400 InvalidBandwidth.ValueNotSupported Instance upgrade bandwidth of temporary not allow less then existed. 不支援指定的頻寬值。
400 InvalidParameter.InstanceTypeAndNetworkConflict The current operation does not allow both InstanceType and network modification parameter to be set. 目前請求不能同時設定執行個體規格和網路變更參數。
400 InvalidParameter.InstanceTypeAndImageConflict The current operation does not allow both InstanceType and ImageId parameter to be set. 目前請求不能同時設定 InstanceType 和 ImageId 參數。
400 InvalidParameter.InstanceTypeAndDiskConflict The current operation does not allow both InstanceType and Disk parameter to be set. 目前請求不能同時設定 InstanceType 和 Disk 參數。
400 InvalidParameter.NetworkAndImageConflict The current operation does not allow both network modification parameter and ImageId to be set. 目前請求不能同時設定網路變更和 ImageId 參數。
400 InvalidParameter.NetworkAndDiskConflict The current operation does not allow both network modification parameter and disk parameter to be set. 目前請求不能同時設定網路變更和 Disk 參數。
400 InvalidParameter.ImageAndDiskConflict The current operation does not allow both ImageId and DataDisk parameter to be set. 目前請求不能同時設定 ImageId 和 Disk 參數。
400 InvalidParameter.CategoryAndSizeConflict The current operation does not allow both Category and Size parameter to be set. 目前請求不能同時設定 Category 和 Size 參數。
400 MissingParameter.Instance The instance modification parameter can not be empty. 執行個體變配的參數不能為空。
500 InternalError The request processing has failed due to some unknown error, exception or failure. 內部錯誤,請重試。
403 InvalidParameter.ResourceOwnerAccount ResourceOwnerAccount is Invalid. 指定的 ResourceOwnerAccount 不合法。
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. 指定的執行個體規格為降配的規格,該 API 僅支援查詢升配的執行個體規格的價格。建議您透過 DescribeResourcesModification 介面取得可升配的執行個體規格。
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. 使用者未被授權在指定的地域建立執行個體。
403 InvalidSystemDiskCategory.ValueNotSupported The specified parameter SystemDisk.Category is not valid. 指定的 SystemDisk.Size 不合法。
403 InvalidDataDiskCategory.ValueNotSupported The specified Category of Data Disk is not valid. 指定的參數 DataDisk.n.Category 不合法。
403 OperationDenied.PerformanceLevelNotMatch The specified PerformanceLevel and disk size do not match. 指定的效能等級與磁碟大小不匹配。
404 InvalidRegionId.NotFound The RegionId provided does not exist in our records. 指定的 RegionId 不存在,請您檢查此產品在該地域是否可用。
404 InvalidResourceGroup.NotFound The ResourceGroup provided does not exist in our records. 資源群組並不在記錄中。
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. 指定的執行個體不存在,請您檢查執行個體 ID 是否正確。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情。