通过指定弹性保障服务所属地域下的可用区、实例规格、购买时长、是否自动续费等参数创建弹性保障服务。
接口说明
调试
您可以在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. | 私有池不支持专有宿主机。 |
| 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. | 资源组并不在记录中。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。