全部產品
Search
文件中心

ENS:RunInstances

更新時間:Aug 28, 2026

建立按量付費或包年包月的 ENS 運算執行個體。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

ens:RunInstances

create

*Instance

acs:ens:*:{#accountId}:instance/*

請求參數

名稱

類型

必填

描述

樣本值

InstanceType

string

執行個體規格。

ens.sn1.small

InstanceChargeType

string

執行個體付費方式。取值:

  • PrePaid:預付費,包年包月。

  • PostPaid:按量付費。

枚舉值:

  • PostPaid :

    按量付費。

  • PrePaid :

    預付費。

PostPaid

ImageId

string

映像 ID。ARM 版卡不能填寫,其他類型規格為必填。

m-5si16wo6simkt267p8b7h****

NetDistrictCode

string

地區代碼。

說明

區域級排程時為必填,節點級排程時無效。

350000

Carrier

string

電信業者。

說明

區域級排程時為必填。
在節點級排程時,若節點存在多電信業者場景,未輸入電信業者則會依節點的電信業者進行生產;例如若有行動、聯通兩個電信業者,則生產出來的執行個體會有兩個 ISP。
您可以透過 DescribeRegionIsps 取得節點電信業者資訊。




telecom

ScheduleAreaLevel

string

排程層級。透過此欄位來執行節點級排程或區域排程。取值:

  • Big:大區

  • Middle:省份

  • Small:城市

  • Region:節點

Region

SchedulingStrategy

string

排程策略。取值:

  • Concentrate:集中

  • Disperse:分散

說明

節點級排程時,為 Concentrate;區域級排程時,依客戶需求選擇。

Concentrate

EnsRegionId

string

節點 ID。

說明

節點級排程時為必填,區域級排程時無效。

cn-foshan-telecom

Password

string

執行個體密碼。

說明

PasswordKeyPairNamePasswordInherit 至少需填入一個。

testPassword

KeyPairName

string

金鑰對名稱。

說明

PasswordKeyPairNamePasswordInherit 至少需填入一個。

wx2-jumpserver

InternetChargeType

string

頻寬計費方式。取值:

  • BandwidthByDay:日峰值頻寬

  • 95BandwidthByMonth:月 95 峰值頻寬

說明

若是首次新購時可選擇計費方式,後續此欄位值將依首次所選的計費方式進行預設處理。

BandwidthByDay

SystemDisk

object

系統磁碟規格。

Size

integer

系統磁碟大小,單位:GiB。

50

Category

string

系統磁碟類型。

local_ssd

DataDisk

array<object>

資料磁碟規格。

object

資料磁碟清單。

Size

integer

資料磁碟大小,單位:GiB。

20

Category

string

磁碟種類。取值:

  • cloud_efficiency:高效雲端硬碟

  • cloud_ssd:全閃雲端硬碟

  • local_hdd:本機 HDD 磁碟

  • local_ssd:本機 SSD 磁碟

cloud_efficiency

Encrypted

boolean

是否加密雲端硬碟。取值範圍:

  • true:是

  • false(預設值):否

false

KMSKeyId

string

雲端硬碟使用的 KMS 金鑰 ID。取值範圍:

  • true:是

  • false(預設值):否

說明

若 Encrypted 設為 true,當 KMSKeyId 為空時則使用服務預設金鑰。

false

Period

integer

購買資源的時長。

  • PeriodUnit 取值為 Day 時,則 Period 僅可設定為 3

  • PeriodUnit 取值為 Month 時,則 Period 可設定為 1-912

1

InternetMaxBandwidthOut

integer

公網最大頻寬,若此參數的值大於 0,則自動為執行個體分配公網 IP。

1

Amount

integer

建立的執行個體數量。取值範圍:1~100。

1

NetWorkId

string

網路 ID。

說明

僅能在節點級排程使用,區域級排程時設定此參數會回報錯誤。若未指定交換器資訊時,則僅會驗證網路 ID 是否合法,實際資源生產並不以此網路 ID 為準。

net-id

VSwitchId

string

交換器 ID。

說明

僅能在節點級排程使用,區域級排程時設定此參數會回報錯誤。

vsw-5sagnw7m613oulalkd10n****

SecurityId

string

安全性群組 ID。

sg-test

HostName

string

主機名稱。

test-HostName

InstanceName

string

執行個體名稱。長度為 2~128 個字元,必須以大小寫字母或中文開頭,不能以 http://https:// 開頭。可以包含中文、英文、數字、半形冒號(:)、底線(_)、點號(.)或連字號(-)。

預設值為執行個體的 InstanceId。

TestName

UniqueSuffix

boolean

是否為 HostNameInstanceName 新增有序後綴,有序後綴從 001 開始遞增,最大不能超過 999。

True

UserData

string

使用者自訂資料,最大支援 16 KB。您可傳入 UserData 資訊,UserData 以 Base64 的方式編碼。

ZWtest

AutoRenew

boolean

是否自動續約。取值:

  • true:自動續約

  • false:不自動續約(預設)

說明

按量付費時,此參數無效。

true

SchedulingPriceStrategy

string

排程價格策略。取值:

  • PriceHighPriority:優先高價

  • PriceLowPriority:優先低價

枚舉值:

  • PriceHighPriority :

    高價優先。

  • PriceLowPriority :

    低價優先。

PriceHighPriority

PrivateIpAddress

string

私網 IP 位址。

說明

僅能在節點級排程使用,區域級排程時設定此參數會回報錯誤。 若指定了私網 IP,執行個體數量只能為 1 台,且私網 IP 和交換器 ID 同時非空時,該私網 IP 才會生效。

10.0.XX.XX

PeriodUnit

string

購買資源的時長單位。取值:

  • Month(預設):按月購買。

  • Day:按天購買。

枚舉值:

  • Month :

    月。

  • Day :

    天。

Month

PublicIpIdentification

boolean

是否啟用公網 IP 識別。 取值:

  • true:啟用。

  • false:不啟用。

預設值:true。

true

PasswordInherit

boolean

是否使用映像預置密碼。取值:

  • true:使用

  • false:不使用

說明

PasswordKeyPairNamePasswordInherit 至少需填入一個。

false

InstanceChargeStrategy

string

執行個體計費策略。取值:

  • instance:執行個體粒度

  • 不傳則預設依使用者維度。

instance

BillingCycle

string

執行個體運算資源計費週期,僅支援執行個體級後付費。 取值

  • Day:按天計費。

  • Month:按月計費。

枚舉值:

  • Month :

    Month

  • Day :

    Day

  • Hour :

    小時。

Day

IpType

string

IP 類型。取值:

  • ipv4(預設值):IPv4。

  • ipv6:IPv6。

  • ipv4Andipv6:IPv4 和 IPv6(單堆疊)。

  • ipv4Withipv6:IPv4 和 IPv6(雙堆疊)。

枚舉值:

  • ipv4 :

    IPv4

  • ipv6 :

    IPv6

  • ipv4Andipv6 :

    IPv4 和 IPv6

  • ipv4Withipv6 :

    IPv4 和 IPv6 雙堆疊。

ipv4

AutoUseCoupon

string

是否使用代金券,預設為使用,即 AutoUseCoupon=true。

true

Tag

array<object>

執行個體所綁定的標籤。

object

標籤鍵值對陣列。

Key

string

自訂標籤 key。

team

Value

string

標籤值。不可超過 128 個字元,不能以 aliyunacs: 開頭,不能包含 http:// 或者 https://

tagValue

AutoReleaseTime

string

隨收隨付執行個體的自動釋放時間。按照 ISO 8601 標準表示,使用 UTC+0 時間。格式為:yyyy-MM-ddTHH:mm:ssZ

  • 如果秒(ss)取值不是 00,則自動取為當前分鐘(mm)開始時。

  • 最短釋放時間為當前時間一小時之後。

2023-06-28T14:38:52Z

SpotStrategy

string

隨收隨付執行個體的競價策略。當參數 InstanceChargeType 取值為 PostPaid 時生效。取值範圍:

  • NoSpot:正常隨收隨付執行個體。

  • SpotAsPriceGo:系統自動出價,跟隨當前市場實際價格。

預設值:NoSpot。

枚舉值:

  • SpotAsPriceGo :

    系統自動出價。

  • NoSpot :

    普通隨收隨付。

SpotAsPriceGo

SpotDuration

integer

搶占式執行個體保護期。

單位:小時。

1

Ipv6AddressCount

integer

為私有網路主網卡指定隨機產生的 IPv6 位址數量。

2

DeletionProtection

boolean

執行個體釋放保護屬性,指定是否支援透過控制台或 API 釋放執行個體。取值範圍:

  • true:開啟執行個體釋放保護。

  • false:關閉執行個體釋放保護。

預設值:false。

說明

該屬性僅適用於隨收隨付執行個體,且只能限制手動釋放操作,對系統釋放操作不生效。

false

LaunchTemplateId

string

執行個體啟動範本 ID。

lt-test

LaunchTemplateName

string

執行個體啟動範本名稱。

lt-test

LaunchTemplateVersion

integer

執行個體啟動範本版本。

2

VpdId

string

VPD 網路 ID。

vpd-5s7xxxxxxx

VpdVSwitchIds

array

VPD 交換器 ID 清單。

string

VPD 交換器 ID 清單。

vsw-5s7xxxxxxx

DeploymentSetId

string

部署集 ID。

ds-5s1p6x2l3r4b****

AutoInstallCloudAssistant

boolean

是否為執行個體自動安裝雲端助手用戶端。

CloudAssistantRegion

string

接入雲端助手的地域。取值:cn-zhangjiakou(張家口)、ap-southeast-1(新加坡)。

枚舉值:

  • ap-southeast-1 :

    新加坡。

  • cn-zhangjiakou :

    張家口。

cn-zhangjiakou

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

91E4AFBE-4E35-5D2A-A886-BB477C9953D2

InstanceIds

array

執行個體 ID 清單。

string

執行個體 ID 清單。

['i-5xxxx26dix05koz15l5413j25o', 'i-5sdmxxxx']

OrderId

string

訂單編號。

213177957850399

樣本

正常返回樣本

JSON格式

{
  "RequestId": "91E4AFBE-4E35-5D2A-A886-BB477C9953D2",
  "InstanceIds": [
    "['i-5xxxx26dix05koz15l5413j25o', 'i-5sdmxxxx']"
  ],
  "OrderId": "213177957850399"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 Invalid%s The specified parameter %s is invalid.
400 Missing%s You must specify the parameter %s.
400 SaleControlVerificationFailedInstanceDistrict The regional sales constraint verification failed, please re-match or contact the product.
400 ens.interface.error Failed to call API.
400 OrderFailed Order failed, please try again.
400 SystemUseCouponFailed Failed to use coupon.
400 SystemUseStoredCardFailed Failed to use stored value card.
400 System.SystemError system error.
400 SystemCanRefundCheckFailed The business rule check of the cloud product fails, and this order cannot be refunded.
400 SystemOtsSystem ots storage error.
400 SystemQueryImmortalError Failed to call Juxiange.
400 SystemQueryInstanceInfoFailed Failed to find instance information.
400 SystemResellerPayCalRefundUnitError Ecological payment channel calculation unsubscribe information error.
400 SystemSaleValidateFailed Sales Expression Validation System Error.
400 SystemTransferDeleteOldResourceFailed Failed to delete the transferred instance in the transfer order.
400 SystemUnSupportOperationType Unsupported operation type.
400 RiskRiskControlRejection Risk Control Rejection.
400 AuthRamAuthFailed ram sub-account authentication failed.
400 CommodityInvalidComponent The module you purchased is illegal, please re-select.
400 CommodityInvalidItemCode Specification code illegal.
400 PriceHsfTimeoutError Time out when calling the request for quotation interface.
400 PricePatingConfigError Inquiry related goods configuration error.
400 PricePricingPlanResultNotFound Pricing plan price result not found.
400 PriceRatingGetRatingpricingPlan Obtain a valid pricing plan exception.
400 OrderAbnormalResourceStatusForRenew Invalid resource status for renewal.
400 OrderAccountStatusIllegal Illegal account status.
400 OrderArrearage User Arrears.
400 OrderBidUserOrderForbidden Bid users cannot buy on the official website.
400 OrderCaptureFailed The paid order of the instance has not been deducted successfully.
400 OrderExistsReleasedInstances There are already released instances.
400 OrderGroupOrderSizeOverflow The quantity of bound combined payment order exceeds the limit.
400 OrderHomeCurrencyCanNotDowngrade Users in current currency cannot downgrade.
400 OrderHomeCurrencyCanNotUpgradeByValueTransfer Users of current currency cannot upgrade through residual value transfer.
400 OrderInstanceHasInactiveChange Instances exist temporary upgrade.
400 OrderInstHasUnpaidOrder The instance has an unpaid order.
400 OrderInstHasUnsettledBills The instance has an unsettled bill.
400 OrderLatestOrderIsHandling Recent order is being processed, please try again later.
400 OrderMainOrderSizeOverflow The quantity of the main order exceeds the limit.
400 OrderMissingModuleInfoError Module parameter not specified.
400 OrderNoRealNameAuthentication No real-name authentication.
400 OrderNotFound The specified order information is not found.
400 OrderOpend You have activated this product.
400 OrderPeriodInvalid Illegal order cycle.
400 OrderQuantityInvalid Illegal quantity ordered.
400 OrderQueryInstanceError Query instance error.
400 OrderQueryInstanceNotExists Instance data does not exist.
400 OrderQueryOrderExchangeRateFail Failed to query order exchange rate information.
400 OrderQueryUserSettleInfoFail Failed to query user settlement information.
400 OrderQuotaExceeded Quantity exceeds limit.
400 OrderSysConstraintInvalid System constraint check failed.
400 OrderTradeCompleteSettleInfoFail Failed to complete the order settlement currency amount information.
400 TradeTradeOrderAfterPayCheckError You have already paid for the subsequent orders of this instance. The current order has been automatically voided and you cannot pay any more.
400 PurchaseExistRenewchangeProd There is a renewal change subscription that has not yet taken effect.
400 PurchaseExistToBeValidProdRuleError Currently, there are temporary orders that are not in effect, and the upgrade operation cannot be performed.
400 PurchaseExistToBeValidRenewChangeProdRuleError Currently, there is an uneffective renewal change subscription, and temporary upgrade operation cannot be performed.
400 PurchaseExistValidProdRuleError Currently, there is a temporary order in effect, and operations such as upgrade/downgrade/expansion/pre-transfer cannot be performed.
400 ProductInstanceReleased Instance released.
400 ProductInstanceTypeNotSupported The instance type is not supported.
400 PatRiskRejectForTradeData Payment order problem leads to risk control rejection.
400 PayAccountBookNotExist There is no insufficient account balance in the account book, please retry after recharging.
400 PayAmountLimitExceeded Payment limit exceeded, please resubmit.
400 PayBeforePayRiskRuleValidateFailed The payment was blocked by risk control, and the payment failed.
400 PayCounponNotExist Counpon does not exist.
400 PayCouponAmountNotEnough Insufficient voucher balance or expired.
400 PayCouponNotMeetConsumptionRule The coupon does not meet the conditions for use.
400 PayCurrencyInconsistency Currency mismatch.
400 PayCurrencyNotSupported Currency not supported.
400 PayForbiddenNoReasonFefund Banned five days no reason refund.
400 PayHsfTimeoutError Call payment system timeout.
400 PayInsufficientBalance Account balance is insufficient, please recharge and try again.
400 PayInvalidCreditCard Invalid credit card.
400 PayInvalidPayMethod Illegal payment method.
400 PayMegrePayOrderHasThanOneChagreChannel Payment failed, please retry or submit work order feedback.
400 PayNoCreditCard No valid payment method, please check the payment method and try again.
400 PayOrderPayTimeInvalid Order effective time is invalid.
400 PayPartRefundNotSupport Not Capture, no partial refund.
400 PayPayChannelPayOrderInvalidStatus Illegal status of payment order in payment channel.
400 PayPayChannelPayOrderNotExist Payment channel payment order does not exist.
400 PayPayerAccountIllegal Illegal payment account.
400 PayPayFailedParentRelationchanged If the financial custody relationship changes, please void the order and place a new order for payment.
400 PayPayForbidUserCoupon Coupon prohibited for orders.
400 PayQueryAvailableAmountFailed Failed to query user availability, please try again later.
400 PayQueryAvailableEnduserAmountFailed Failed to query the availability of quota direct customer main user, please try again later.
400 PayQueryParentRelationshipFailed Failed to query current user hosting relationship, please try again later.
400 PayQueryPayChangeChannelNotEqual Multi-order payment channels are inconsistent, please check whether the original order data payment channel is correct.
400 PayRefundFailed Accumulated refund amount exceeds payment order amount.
400 PayResellerPayGetUrlError Order payment failed, please try again later.
400 PayRiskRejectForPayerAccount Payment account problem leads to risk control rejection.
400 PayStoredCardNotExist Stored value card does not exist.
400 PaySystemError Error calling payment system.
400 PayTaxCalcFailed Failed to get user tax address.
400 PayWithholdingAgreementIllegal Withholding Agreement Status Illegal.
400 AccountAliyunAccountFrozen Alibaba Cloud account is frozen.
400 AccountAliyunAccountNotExist Alibaba Cloud account does not exist.
400 RefundRefundInstanceNotFound Unable to find instance information.
400 RefundRefundNoValidProd Refund is not available to unsubscribe.
400 RefundRefundParamInvalid Abnormal refund parameter.
400 RefundRefundQueryOrderFail Failed to query order for refund field.
400 SystemConcurrentOperate Concurrent operation causes failure.
400 PricePricingPlanNotFound Pricing plan tree not found.
400 OrderInstanceHasTempUpgrade Instances exist temporary upgrade.
400 PayQueryParentRelationchangedFailed The financial custody relationship may change, please refresh and pay again.
400 PayforCreditPayInsufficientBalance Insufficient quota, please contact your channel partner to increase the quota.
400 PayforAccountMoneyValidateError The available amount of your channel partner's account is insufficient, please contact your channel partner to recharge in time.
400 BasicInfoUncompleted You have not completed your basic personal information. Please complete the information and re-operate it.
400 SaleControlVerificationFailedStock Inventory sales constraint verification failed, please re-match, or contact the product.
400 SaleControlVerificationFailedInstanceSpec Instance specification sales constraint verification failed, please re-match, or contact the product.
400 SaleControlVerificationFailedInstanceNetLevel The network-level sales constraint verification failed, please re-match or contact the product.
400 SaleControlVerificationFailedInstanceCpuCore cpu core sales constraint verification failed, please re-match, or contact the product.
400 SaleControlVerificationFailedInstanceBandwidthValue The bandwidth speed limit value sales constraint verification failed, please re-match or contact the product.
400 SaleControlVerificationFailedInstanceBandwidthType Bandwidth type sales constraint verification failed, please re-match, or contact the product.
400 SaleControlVerificationFailedInstanceSystemDiskSpec The system disk capacity sales constraint verification failed, please re-match or contact the product.
400 SaleControlVerificationFailedInstanceDataDiskType Data disk type sales constraint verification failed, please re-select, or contact the product.
400 SaleControlVerificationFailedInstanceDataDiskSpec Data disk capacity sales constraint verification failed, please re-match, or contact the product.
400 SaleControlVerificationFailedInstanceDataDiskBlock The sales constraint verification of the number of data disks failed, please re-match or contact the product.
400 SaleControlVerificationFailedRegion The node sales constraint verification failed, please re-select or contact the product.
400 SaleControlVerificationFailedCarrier The isp failed to verify the sales restriction. Please re-select or contact the product.
400 EnsAreaCountIllegal The number of instances in the region is all 0, please re-select or contact the product.
400 EnsAreaInsufficientInventory Regional inventory is insufficient, please re-match, or contact the product.
400 EnsEnsRegionInsufficientInventory The node inventory is insufficient, please re-select or contact the product.
400 EnsRegionCountExceeded Purchase quantity exceeds the single default limit, please re-match, or contact the product.
400 EnsServiceArrearage The user is in arrears or the status is abnormal, please contact the product.
400 EnsServiceConsumerNotExists The user has not opened the edge service to pay by volume, please contact the product consultation.
400 GenerateDataKeyFailure Failed to generate key information, please contact the product.
400 InvalidDataDiskCountValueNotSupported The maximum number of dataDiskCount is exceeded,please re-match, or contact the product.
400 SystemError Interface call error, please re-match, or contact the product.
400 InvalidParameterCategoryNotSupported This disk category is not support kms,please re-select, or contact the product.
400 InvalidParameterKMSKeyIdCMKNotEnabled The CMK needs to be enabled, please re-select, or contact the product.
400 InvalidImageIdSpec The image does not match the specification cluster information, please re-match.
400 InvalidParameterInstanceType Failed to obtain specification information, please try to place the order again.
400 InvalidSpecPostPaid This specification is not supported for a Pay-As-You-Go instance.
400 InvalidSpecNetlevel The current network level does not support configuring this specification.
400 SuperfluousDataDiskInstanceSpec Data disk properties cannot be configured for the current specification.
400 SuperfluousImageIdInstanceSpec Image properties cannot be configured for the current specification.
400 SuperfluousPublicIpIdentificationInstanceSpec The current specification cannot create a public network card.
400 SuperfluousSystemDiskInstanceSpec System disk properties cannot be configured for the current specification.
400 LackImageIdInstanceSpec Image properties must be configured for the current specification.
400 LackSystemDiskInstanceSpec System disk properties must be configured for the current specification.
400 LackPublicIpIdentificationInstanceSpec The current specification must create a public network card.
400 LackLabelImageIdEnsRegionId The instance created by using this image on this node lacks the necessary label, please contact the product or operation classmate.
400 InvalidImageIdSystemDisk The system disk size does not match the image size, please re-select.
400 SaleNetIpType There is a conflict between the input parameters related to the double stack.
400 InvalidSKUStatus Inventory storage unit(SKU) background status is illegal, please submit work order in time.
400 NoPermission Permission denied.
400 EnsPostOpenError Commodity opening failed.
400 VswitchNotMatchIpv6 The specified switch does not support ipv6.
400 SwitchNotSupportIpv6 The specified switch does not support ipv6.
400 InvalidNetlevelDeploymentsetid Deployment sets only support node-level network hierarchies.
400 InvalidSpecDeploymentsetid Deployment sets only support x86 compute instance types.
400 DEPLOYMENTSETID_RESTRICTIONS Scheduling failed due to deployment set policy restrictions.

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

變更歷史

更多資訊,參考變更詳情