Creates an elasticity assurance.
Usage notes
Elasticity Assurance provides a new method to purchase and use resources with flexibility and assurance. It offers assured resource reservations for pay-as-you-go Elastic Compute Service (ECS) instances. For more information, see Overview of Elasticity Assurance.
- Elasticity assurances are not refundable after purchase.
- Elasticity assurances are applicable to only pay-as-you-go ECS instances.
- Elasticity assurances only support the unlimited mode. Therefore, you can set
AssuranceTimes
only toUnlimited
. Elasticity assurances in unlimited mode can be applied an unlimited number of times within their effective duration. Elasticity assurances in unlimited mode take effect immediately after they are purchased.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateElasticityAssurance | The operation that you want to perform. Set the value to CreateElasticityAssurance. |
RegionId | String | Yes | cn-hangzhou | The ID of the region in which to create the elasticity assurance. You can call the DescribeRegions operation to query the most recent region list. |
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** | The ID of the resource group to which to assign the elasticity assurance. |
Tag.N.Key | String | No | TestKey | The key of tag N to add to the elasticity assurance. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key must be 1 to 128 characters in length and cannot contain |
Tag.N.Value | String | No | TestValue | The value of tag N to add to the elasticity assurance. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
Period | Integer | No | 1 | The effective duration of the elasticity assurance. The unit of the effective duration is determined by the
Default value: 1. |
PeriodUnit | String | No | Year | The unit of the effective duration of the elasticity assurance. Valid values:
Default value: Year. |
ClientToken | String | No | 0c593ea1-3bea-11e9-b96b-88e9fe637760 | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The |
PrivatePoolOptions.Name | String | No | eapTestName | The name of the elasticity assurance. The description must be 2 to 128 characters in length. The description must start with a letter but cannot start with |
Description | String | No | This is description. | The description of the elasticity assurance. The description must be 2 to 256 characters in length and cannot start with This parameter is empty by default. |
PrivatePoolOptions.MatchCriteria | String | No | Open | The type of the private pool with which to associate the elasticity assurance. Valid values:
Default value: Open. |
AssuranceTimes | String | No | Unlimited | The total number of times that the elasticity assurance can be applied. Set the value to Unlimited. This value indicates that the elasticity assurance can be applied an unlimited number of times within its effective duration. Default value: Unlimited. |
InstanceAmount | Integer | No. | 2 | The total number of instances for which to reserve capacity of an instance type. Valid values: 1 to 1000. |
InstanceCpuCoreCount | Integer | No. | null | Note This parameter is discontinued. |
StartTime | String | No | 2020-10-30T06:32:00Z | The time when the elasticity assurance takes effect. The default value is the time when the CreateElasticityAssurance operation is called to create the elasticity assurance. Specify the time in the ISO 8601 standard in the |
ZoneId.N | String | Yes | cn-hangzhou-h | The zone ID of the elasticity assurance. Currently, an elasticity assurance can be used to reserve resources within a single zone. |
InstanceType.N | String | Yes | ecs.c6.xlarge | Instance type N. Currently, an elasticity assurance can be created to reserve the capacity of a single instance type. Set N to 1. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E | The ID of the request. |
PrivatePoolOptionsId | String | eap-bp67acfmxazb4**** | The ID of the elasticity assurance. |
OrderId | String | 1234567890 | The ID of the order. |
Examples
Sample request
http(s)://ecs.aliyuncs.com/?Action=CreateElasticityAssurance
&RegionId=cn-hangzhou
&InstanceType.1=ecs.c6.xlarge
&ZoneId.1=cn-hangzhou-h
&InstanceAmount=2
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateElasticityAssuranceResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
<PrivatePoolOptionsId>eap-bp67acfmxazb4****</PrivatePoolOptionsId>
<OrderId>1234567890</OrderId>
</CreateElasticityAssuranceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PrivatePoolOptionsId" : "eap-bp67acfmxazb4****",
"OrderId" : "1234567890"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | OperationDenied | The specified InstanceType or Zone is not available or not authorized. | The error message returned because the specified instance type or zone is unavailable or because you are not authorized to use resources of the specified instance type or within the specified zone. |
400 | MissingParameter.RegionId | The specified RegionId should not be null. | The error message returned because the required RegionId parameter is not specified. |
400 | InvalidStartTime.NotSupported | The specified StartTime should be within 180 calendar days from the current date, and you must specify a precision to hour. | The error message returned because the specified StartTime parameter is invalid. |
400 | InvalidStartTime.MalFormed | The specified StartTime is out of the permitted range. | The error message returned because the specified StartTime parameter is invalid. |
400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | The error message returned because private pools cannot be used to create instances on dedicated hosts. |
400 | SpotNotSupported | Spot is not supported for PrivatePool. | The error message returned because private pools cannot be used to create preemptible instances. |
400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | The error message returned because private pools cannot be used to create instances of the classic network type. |
400 | Invalid.InstanceId | Instance does not exist. | The error message returned because the instance does not exist. |
400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | The error message returned because the operation is not supported while the PrivatePoolOptions.MatchCriteria parameter is set to Target. |
400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | The error message returned because the PrivatePoolOptions.Id parameter is not specified. |
400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | The error message returned because the private pool does not exist. |
400 | Invalid.InstanceType | The InstanceType does not match the PrivatePool. | The error message returned because the specified instance type does not match the specified private pool. |
400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | The error message returned because the specified billing method of the specified instance does not match the specified private pool. |
400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | The error message returned because the specified zone does not match the specified private pool. |
400 | Invalid.PrivatePoolOptions.MatchCriteria | The PrivatePoolOptions.MatchCriteria does not match the PrivatePool. | The error message returned because the specified PrivatePoolOptions.MatchCriteria parameter does not match the private pool. |
400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | The error message returned because the specified Platform parameter does not match the private pool. |
400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | The error message returned because the specified private pool does not belong to the user who attempted to create the instance. |
400 | Invalid.InstanceId | The Instance dose not attached to a PrivatePool. | The error message returned because the instance does not match the private pool. |
400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | The error message returned because the number of specified elasticity assurance IDs exceeds the upper limit. |
400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | The error message returned because the number of specified zone IDs exceeds the upper limit. |
400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | The error message returned because the number of specified instance types exceeds the upper limit. |
400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | The error message returned because multiple private pools are created but not paid. |
400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | The error message returned because the InstanceCpuCoreCount and InstanceAmount parameters cannot be specified at the same time. |
400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | The error message returned because the private pool is already paid. |
400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | The error message returned because the specified AssuranceTimes parameter is invalid. |
400 | RepeatStartPrivatePool | PrivatePool has already been started. | The error message returned because the private pool is already started. |
400 | AccountForbidden.ProductCreationLimited | The commodity must be officially operated by Aliyun and in pay-as-you-go billing method. | The error message returned because you can use Alibaba Cloud accounts to purchase only pay-as-you-go ECS instances and cannot purchase third-party products, such as images provided in Alibaba Cloud Marketplace. Check parameters. Make sure that all parameters meet the conditions and try again. |
400 | PriceNotFound | The price of your queried resource is not available now, please try other resources. | The error message returned because the price of the specified resource is not found. Modify the parameter value and try again later. |
403 | Zone.NotOpen | The specified zone is not granted to you to buy resources yet. | The error message returned because you are not authorized to purchase resources in the specified zone. |
403 | OperationDenied.NoStock | The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones. | The error message returned because the specified resource is unavailable in the specified zone. Try another resource type or select another region or zone. |
403 | InvalidInstanceType.NotSupported | The specified InstanceType is invalid. | The error message returned because the specified InstanceType parameter is invalid. |
403 | Zone.NotOnSale | The specified zone is not available for purchase. | The error message returned because requested resources are unavailable in the specified zone. Try another instance type or select a different region or zone. |
404 | InvalidZoneId.NotFound | The specified zoneId does not exist. | The error message returned because the specified zone ID does not exist. |
404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | The error message returned because the specified ResourceGroupId parameter does not exist. |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | The error message returned because an internal error has occurred. Try again later. |
For a list of error codes, see Service error codes.