全部產品
Search
文件中心

Compute Nest:GetServiceEstimateCost - 查詢建立服務執行個體的預估價格

更新時間:Sep 12, 2025

查詢建立服務執行個體的預估價格。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

computenest:GetServiceEstimateCost

get

*Service

acs:computenest:{#regionId}:{#accountId}:service/{#ServiceId}

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

地區 ID。

cn-hangzhou

ServiceId

string

服務 ID。

service-12xxxxxx

ServiceVersion

string

服務版本。

1

TemplateName

string

模板名稱。

模板1

Parameters

object

部署服務執行個體輸入的參數。

{ \"RegionId\": \"cn-hangzhou\", \"InstanceType\": \"ecs.g5.large\"}

ClientToken

string

保證請求等冪性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元,且不能超過 64 個字元。

qwertyuiop

TrialType

string

使用類型。可選值:

  • Trial:支援試用。

  • NotTrial:不支援試用。

NotTrial

SpecificationName

string

套餐規格名稱。

套餐一

ServiceInstanceId

string

服務執行個體 ID。

si-d6ab3a63ccbb4b17xxxx

Commodity

object

購買訂單時間資訊。

PayPeriodUnit

string

購買時間長度的單位,可選值:

  • Year:年。

  • Month:月。

  • Day:日。

Year

PayPeriod

integer

購買時間長度。

1

CouponId

string

優惠券 ID

302070970220

QuotationId

string

雲市場 PrivateOffer Id

17cde2e8-2f5d-xxxx-xxxx-5120dd215d66

OperationName

string

變更配置操作名稱。

參數變更配置

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

請求 ID。

08ABBB67-39C9-5EE7-98E5-80486F75CE8D

Resources

object

資源清單。

{ "EcsInstance" : { "Type" : "ALIYUN::ECS::Instance", "Success" : true, "Result" : { "Order" : { "Currency" : "CNY", "RuleIds" : [ "102111101338****" ], "DetailInfos" : { "ResourcePriceModel" : [ { "OriginalPrice" : 0, "DiscountPrice" : 0, "SubRules" : { "Rule" : [ ] }, "Resource" : "bandwidth", "TradePrice" : 0 }, { "OriginalPrice" : 0, "DiscountPrice" : 0, "SubRules" : { "Rule" : [ ] }, "Resource" : "image", "TradePrice" : 0 }, { "OriginalPrice" : 0.366666, "DiscountPrice" : 0.249012, "SubRules" : { "Rule" : [ ] }, "Resource" : "instanceType", "TradePrice" : 0.117654 }, { "OriginalPrice" : 0.055555, "DiscountPrice" : 0.037729, "SubRules" : { "Rule" : [ ] }, "Resource" : "systemDisk", "TradePrice" : 0.017826 } ] }, "TradeAmount" : 0.135, "OriginalAmount" : 0.422, "Coupons" : { "Coupon" : [ ] }, "DiscountAmount" : 0.287 }, "OrderSupplement" : { "PriceUnit" : "/Hour", "ChargeType" : "PostPaid", "Quantity" : 1, "PriceType" : "Total" }, "Rules" : { "Rule" : [ { "RuleDescId" : "102111101338****", "Name" : "合約優惠_多計費項目優惠_3.208750折" } ] } } } }

any

資源清單。

{ "EcsInstance" : { "Type" : "ALIYUN::ECS::Instance", "Success" : true, "Result" : { "Order" : { "Currency" : "CNY", "RuleIds" : [ "102111101338****" ], "DetailInfos" : { "ResourcePriceModel" : [ { "OriginalPrice" : 0, "DiscountPrice" : 0, "SubRules" : { "Rule" : [ ] }, "Resource" : "bandwidth", "TradePrice" : 0 }, { "OriginalPrice" : 0, "DiscountPrice" : 0, "SubRules" : { "Rule" : [ ] }, "Resource" : "image", "TradePrice" : 0 }, { "OriginalPrice" : 0.366666, "DiscountPrice" : 0.249012, "SubRules" : { "Rule" : [ ] }, "Resource" : "instanceType", "TradePrice" : 0.117654 }, { "OriginalPrice" : 0.055555, "DiscountPrice" : 0.037729, "SubRules" : { "Rule" : [ ] }, "Resource" : "systemDisk", "TradePrice" : 0.017826 } ] }, "TradeAmount" : 0.135, "OriginalAmount" : 0.422, "Coupons" : { "Coupon" : [ ] }, "DiscountAmount" : 0.287 }, "OrderSupplement" : { "PriceUnit" : "/Hour", "ChargeType" : "PostPaid", "Quantity" : 1, "PriceType" : "Total" }, "Rules" : { "Rule" : [ { "RuleDescId" : "102111101338****", "Name" : "合約優惠_多計費項目優惠_3.208750折" } ] } } } }

Commodity

object

雲市場購買訂單資訊。

{'cmgj00059839': {'Result': {'InquiryType': 'Buy', 'Order': {'Currency': 'CNY', 'DiscountAmount': '0.0', 'TradeAmount': '0.01', 'OriginalAmount': '0.01'}}}}

object

雲市場購買訂單資訊。

Result

object

Result 模型。

Order

object

訂單資訊。

Currency

string

貨幣代碼。

CNY

TradeAmount

string

優惠後。

9.99

DiscountAmount

string

抵扣金額。

1.99

OriginalAmount

string

優惠前。

11.98

InquiryType

string

詢價類型,可選值:

  1. Buy:新購詢價。

  2. ModificationBuy:變更配置詢價。

Buy

SubOrders

object

訂單子項。

SubOrder

array<object>

訂單子項。

object

訂單子項對象。

ModuleInstance

array<object>

模組(執行個體)資訊。

object

模組(執行個體)對象。

ModuleId

integer

模組 ID。

1234

ModuleName

string

模組名稱。

資料庫類型

ModuleCode

string

模組代碼。

rds_dbtype

TotalProductFee

number

產品原價(元)。

10.00

DiscountFee

number

折計費用(元)。

1.99

PayFee

number

實付金額(元)。

8.01

PriceUnit

string

價格單位。

元/GB/小時

IsPricingModule

boolean

是否計價項。

true

NeedOrderPay

boolean

在訂單中是否需要支付。

true

PriceType

string

定價類型。

hourPrice

ModuleAttrs

array<object>

模組屬性。

object

模組屬性對象。

Type

integer

屬性類型,可選值:

  1. 1:商品屬性

  2. 2:規格屬性

  3. 3:模組屬性

  4. 4:外部參數(備用)

3

Name

string

屬性名稱

20GB

Code

string

屬性代碼

rds_storage

Value

string

屬性值

20

Unit

string

值單位

GB

ModuleNameEn

string

模組英文名稱。

資料單元

PriceUnitEn

string

價格單位英文名稱

元/月

Coupons

array<object>

優惠券。

object

優惠券。

CanPromFee

number

可支付金額。

9.99

CouponDesc

string

優惠券描述

10元優惠券(有效期間至2024年9月8日)

CouponName

string

優惠券名稱

10元優惠券

CouponOptionNo

string

優惠券編號。

50008800000xxxx

Selected

boolean

是否選中。

true

樣本

正常返回樣本

JSON格式

{
  "RequestId": "08ABBB67-39C9-5EE7-98E5-80486F75CE8D",
  "Resources": {
    "key": "{\n    \"EcsInstance\" : {\n      \"Type\" : \"ALIYUN::ECS::Instance\",\n      \"Success\" : true,\n      \"Result\" : {\n        \"Order\" : {\n          \"Currency\" : \"CNY\",\n          \"RuleIds\" : [ \"102111101338****\" ],\n          \"DetailInfos\" : {\n            \"ResourcePriceModel\" : [ {\n              \"OriginalPrice\" : 0,\n              \"DiscountPrice\" : 0,\n              \"SubRules\" : {\n                \"Rule\" : [ ]\n              },\n              \"Resource\" : \"bandwidth\",\n              \"TradePrice\" : 0\n            }, {\n              \"OriginalPrice\" : 0,\n              \"DiscountPrice\" : 0,\n              \"SubRules\" : {\n                \"Rule\" : [ ]\n              },\n              \"Resource\" : \"image\",\n              \"TradePrice\" : 0\n            }, {\n              \"OriginalPrice\" : 0.366666,\n              \"DiscountPrice\" : 0.249012,\n              \"SubRules\" : {\n                \"Rule\" : [ ]\n              },\n              \"Resource\" : \"instanceType\",\n              \"TradePrice\" : 0.117654\n            }, {\n              \"OriginalPrice\" : 0.055555,\n              \"DiscountPrice\" : 0.037729,\n              \"SubRules\" : {\n                \"Rule\" : [ ]\n              },\n              \"Resource\" : \"systemDisk\",\n              \"TradePrice\" : 0.017826\n            } ]\n          },\n          \"TradeAmount\" : 0.135,\n          \"OriginalAmount\" : 0.422,\n          \"Coupons\" : {\n            \"Coupon\" : [ ]\n          },\n          \"DiscountAmount\" : 0.287\n        },\n        \"OrderSupplement\" : {\n          \"PriceUnit\" : \"/Hour\",\n          \"ChargeType\" : \"PostPaid\",\n          \"Quantity\" : 1,\n          \"PriceType\" : \"Total\"\n        },\n        \"Rules\" : {\n          \"Rule\" : [ {\n            \"RuleDescId\" : \"102111101338****\",\n            \"Name\" : \"合約優惠_多計費項目優惠_3.208750折\"\n          } ]\n        }\n      }\n    }\n  }"
  },
  "Commodity": {
    "key": {
      "Result": {
        "Order": {
          "Currency": "CNY",
          "TradeAmount": "9.99",
          "DiscountAmount": "1.99",
          "OriginalAmount": "11.98"
        },
        "InquiryType": "Buy",
        "SubOrders": {
          "SubOrder": [
            {
              "ModuleInstance": [
                {
                  "ModuleId": 1234,
                  "ModuleName": "資料庫類型",
                  "ModuleCode": "rds_dbtype",
                  "TotalProductFee": 10,
                  "DiscountFee": 1.99,
                  "PayFee": 8.01,
                  "PriceUnit": "元/GB/小時",
                  "IsPricingModule": true,
                  "NeedOrderPay": true,
                  "PriceType": "hourPrice",
                  "ModuleAttrs": [
                    {
                      "Type": 3,
                      "Name": "20GB",
                      "Code": "rds_storage",
                      "Value": "20",
                      "Unit": "GB"
                    }
                  ],
                  "ModuleNameEn": "資料單元",
                  "PriceUnitEn": "元/月"
                }
              ]
            }
          ]
        },
        "Coupons": [
          {
            "CanPromFee": 9.99,
            "CouponDesc": "10元優惠券(有效期間至2024年9月8日)",
            "CouponName": "10元優惠券",
            "CouponOptionNo": "50008800000xxxx",
            "Selected": true
          }
        ]
      }
    }
  }
}

錯誤碼

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

變更歷史

更多資訊,參考變更詳情