通過指定彈性保障服務所屬地區下的可用性區域、執行個體規格、購買時間長度、是否自動續約等參數建立彈性保障服務。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:CreateElasticityAssurance |
create |
*ElasticityAssurance
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
彈性保障服務所屬地區 ID。您可以調用 DescribeRegions 查看最新的阿里雲地區列表。 |
cn-hangzhou |
| ResourceGroupId |
string |
否 |
彈性保障服務所在的企業資源組 ID。 |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
否 |
彈性保障服務的標籤列表。 |
|
|
object |
否 |
標籤對資訊。 |
||
| Value |
string |
否 |
彈性保障服務的標籤值。N 的取值範圍:1~20。一旦傳入該值,允許為空白字串。最多支援 128 個字元,不能以 |
TestValue |
| Key |
string |
否 |
彈性保障服務的標籤鍵。N 的取值範圍:1~20。一旦傳入該值,則不允許為空白字串。最多支援 128 個字元,不能以 |
TestKey |
| Period |
integer |
否 |
購買時間長度。時間長度單位由
預設值:1。 |
1 |
| PeriodUnit |
string |
否 |
時間長度單位。取值範圍:
預設值:Year。 |
Year |
| ClientToken |
string |
否 |
保證請求等冪性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。 |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| PrivatePoolOptions.Name |
string |
否 |
彈性保障服務的名稱。長度為 2~128 個英文或中文字元。必須以大小寫字母或中文開頭,不能以 |
eapTestName |
| Description |
string |
否 |
彈性保障服務的描述資訊。長度為 2~256 個英文或中文字元,不能以 預設值:空。 |
This is description. |
| PrivatePoolOptions.MatchCriteria |
string |
否 |
彈性保障服務的匹配模式。取值範圍:
預設值:Open。 |
Open |
| AssuranceTimes |
string |
否 |
彈性保障的總次數。取值:Unlimited,目前僅支援在服務生效期內的無限次模式。 預設值:Unlimited。 |
Unlimited |
| InstanceAmount |
integer |
否 |
在一個執行個體規格內,需要預留的執行個體的總數量。 取值範圍:1~1000。 重要 此參數為必填參數。 |
2 |
| InstanceCpuCoreCount |
integer |
否 |
說明
該參數已廢棄。 |
null |
| StartTime |
string |
否 |
彈性保障服務生效時間。預設為調用該介面建立服務的時間。時間格式以 ISO 8601 為標準,需要使用 UTC +0 時間,格式為 |
2020-10-30T06:32:00Z |
| ZoneId |
array |
是 |
彈性保障服務所屬地區下的可用性區域 ID。目前僅支援在一個可用性區域下建立彈性保障服務。 |
cn-hangzhou-h |
|
string |
否 |
彈性保障服務所屬地區下的可用性區域 ID。 |
cn-hangzhou-h |
|
| InstanceType |
array |
是 |
執行個體規格。目前僅支援為一個執行個體規格設定彈性保障服務。 |
ecs.c6.xlarge |
|
string |
否 |
執行個體規格。 |
ecs.c6.xlarge |
|
| RecurrenceRules |
array<object> |
否 |
彈性保障-分時保障重複規則列表。 |
|
|
object |
否 |
彈性保障-分時保障重複規則。 |
||
| StartHour |
integer |
否 |
分時保障生效時間,取值必須為整點。 說明
同時指定 |
4 |
| RecurrenceType |
string |
否 |
重複規則的策略類型。取值範圍:
說明
必須同時指定 |
Daily |
| EndHour |
integer |
否 |
分時保障結束時間,取值必須為整點。 |
10 |
| RecurrenceValue |
string |
否 |
重複規則執行數值。
說明
必須同時指定 |
1 |
| AutoRenew |
boolean |
否 |
是否自動續約。取值範圍:
預設值:false。 |
true |
| AutoRenewPeriod |
integer |
否 |
自動續約的時間長度,單位:月。取值範圍:1、2、3、6、12、24、36。
說明
當參數 |
1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| PrivatePoolOptionsId |
string |
彈性保障服務 ID。 |
eap-bp67acfmxazb4**** |
| OrderId |
string |
產生的訂單 ID。 |
1234567890 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PrivatePoolOptionsId": "eap-bp67acfmxazb4****",
"OrderId": "1234567890"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidOperation.PeriodUnitUnsupported | TimeDivisionElasticityAssurance only supports PeriodUnit of Day. | |
| 400 | InvalidParameter.RegionId | The specified RegionId is invalid. | 指定的地區不存在或不可用。 |
| 400 | OperationDenied | The specified instanceType or zone is not available or not authorized. | 指定的規格或可用性區域不可用 |
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | RegionId是必選參數。 |
| 400 | InvalidStartTime.NotSupported | The specified StartTime should be within 180 calendar days from the current date, and you must specify a precision to hour. | 指定的 StartTime 參數不在有效取值範圍內。 |
| 400 | InvalidStartTime.MalFormed | The specified StartTime is out of the permitted range. | 指定的 StartTime 參數超出了最大有效取值。 |
| 400 | Invalid.PrivatePoolOptionsName.MalFormed | The specified PrivatePoolOptions.Name is not valid. | 指定的PrivatePoolOptions.Name無效 |
| 400 | Invalid.ZoneId | The specified ZoneId is not valid. | 指定的ZoneId不合法 |
| 400 | Invalid.InstanceType | The specified InstanceType is not valid. | 指定的InstanceType不合法。 |
| 400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | 私人池不支援Dedicated Host。 |
| 400 | SpotNotSupported | Spot is not supported for PrivatePool. | 私人池不支援搶佔式執行個體。 |
| 400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | 私人池不支援傳統網路類型執行個體。 |
| 400 | Invalid.InstanceId | Instance does not exist. | 執行個體不存在。 |
| 400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | Target模式不支援本次操作。 |
| 400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | PrivatePoolOptions.Id 參數不可為空。 |
| 400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | 私人池不存在。 |
| 400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | 執行個體計費類型與私人池不匹配。 |
| 400 | Invalid.PrivatePoolOptions.status | The PrivatePool status is not valid. | 指定的私人池狀態不正確。 |
| 400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | 指定的Platform參數與私人池不匹配。 |
| 400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | 私人池不屬於建立執行個體的使用者。 |
| 400 | MissingParameter.PackageType | The specified parameter "PackageType" can not be empty. | 指定的參數PackageType不可為空。 |
| 400 | MissingParameter.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" can not be empty. | 指定參數“PrivatePoolOptions.ids”不可為空。 |
| 400 | MissingParameter.InstanceCpuCoreCount | The specified parameter "InstanceCpuCoreCount" can not be empty. | 指定的參數 'InstanceCpuCocount'不可為空。 |
| 400 | MissingParameter.InstanceAmount | The specified parameter "InstanceAmount" can not be empty. | 指定的參數InstanceAmount不可為空。 |
| 400 | MissingParameter.InstanceCpuCoreCountOrInstanceAmount | The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. | 指定的參數InstanceCpuCoreCount和InstanceAmount不能同時為空白。 |
| 400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | PrivatePoolOptions.Ids參數超過上限。 |
| 400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | ZoneIds參數超過上限。 |
| 400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | InstanceTypes參數超過上限。 |
| 400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | 多個私人池未支付。 |
| 400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | InstanceCpuCoreCount和InstanceAmount兩個參數不需要同時提供。 |
| 400 | Invalid.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. | 指定的私人池ID不存在。 |
| 400 | Invalid.PackageType | The specified parameter "PackageType" is invalid. | 指定的參數“PackageType”無效。 |
| 400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | 私人池已經支付。 |
| 400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | AssuranceTimes參數值不支援。 |
| 400 | RepeatStartPrivatePool | PrivatePool has already been started. | 私人池已經啟動。 |
| 400 | Invalid.PeriodUnit | Only Month or Year is supported for PeriodUnit. | 購買時間長度單位值不匹配。 |
| 400 | AccountForbidden.ProductCreationLimited | The commodity must be officially operated by Aliyun and in pay-as-you-go billing method. | 集團上雲客戶只能購買隨用隨付的 ECS,且不能購買第三方的商品比如由鏡像市場提供的鏡像。請檢查參數,傳入合格參數重試。 |
| 400 | RegionUnauthorized | There is no authority to create private pool in the specified region. | 在指定的地區內沒有建立私人池的許可權 |
| 400 | PriceNotFound | The price of your queried resource is not available now, please try other resources. | 未找到價格,請修改相應的參數值重試。 |
| 400 | InvalidRecurrenceRules.CountLimitExceeded | The count of RecurrenceRules exceeds the limit. | 參數RecurrenceRules的個數超過限定值。 |
| 400 | InvalidRecurrenceRulesStartHourEndHour.TooShort | The recurrence hour between RecurrenceRules.StartHour and RecurrenceRules.EndHour is too short. | 參數RecurrenceRules.StartHour和RecurrenceRules.EndHour之間的生效時間小於最小要求。 |
| 400 | InvalidParameter.RecurrenceRulesStartHourEndHour | The specified parameter RecurrenceRules.StartHour or RecurrenceRules.EndHour is invalid. | 為RecurrenceRules指定的參數RecurrenceRules.StartHour或RecurrenceRules.EndHour不符合規範。 |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceValueMonthly | The specified parameter RecurrenceRules.RecurrenceValue for Monthly is invalid. | 為RecurrenceRules.RecurrenceType=Monthly指定的參數RecurrenceRules.RecurrenceValue不符合規範。 |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceValueWeekly | The specified parameter RecurrenceRules.RecurrenceValue for Weekly is invalid. | 為RecurrenceRules.RecurrenceType=Weekly指定的參數RecurrenceRules.RecurrenceValue不符合規範。 |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceValueDaily | The specified parameter RecurrenceRules.RecurrenceValue for Daily is invalid. | 為RecurrenceRules.RecurrenceType=Daily指定的參數RecurrenceRules.RecurrenceValue不符合規範。 |
| 400 | InvalidParameter.RecurrenceRulesRecurrenceType | The specified parameter RecurrenceRules.RecurrenceType is invalid. | 指定的參數RecurrenceRules.RecurrenceType不符合規範。 |
| 400 | InvalidAutoRenewPeriod.ValueNotSupported | The specified autoRenewPeriod is invalid. | 指定的自動續約時間長度無效。 |
| 400 | InvalidOperation.ElasticityAssuranceActiveTimeTooShort | The total active time of the ElasticityAssurance is too short. | 彈性保障服務的總生效時間太短。 |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 內部錯誤,請重試。 |
| 403 | Zone.NotOpen | The specified zone is not granted to you to buy resources yet. | |
| 403 | InvalidResourceType.NotSupported | %s | 指定資源群組合不存在,請更換其他可用性區域或規格 |
| 403 | OperationDenied.NoStock | The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones. | 指定的資源在指定可用性區域中無貨。請嘗試其他類型,或選擇其他可用性區域和地區。 |
| 403 | InvalidInstanceType.NotSupported | The specified InstanceType is invalid. | |
| 403 | Invalid.ZoneIds | At least one of the specified ZoneIds are invalid. | 指定的ZoneIds中至少有一個無效。 |
| 403 | Zone.NotOnSale | The specified zone is not available for purchase. | 指定可用性區域已經售罄,請您更換執行個體規格或者更換地區建立。 |
| 403 | QuotaExceed.ElasticityAssuranceCapacity | ElasticityAssurance Capacity quota exceeded. | 彈性保障服務容量配額超出限制。 |
| 403 | InvalidAccount.NotSupportEA | According to business rules, this account cannot purchase ECS ElasticityAssurance. | 根據商務規則,此帳號不能購買ECS彈性保障服務。 |
| 404 | InvalidZoneId.NotFound | The specified zoneId does not exist. | 指定的可用性區域 ID 不存在。 |
| 404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | 資源群組並不在記錄中。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。