Retrieves the details of an Elasticity Assurance, including its status, matching mode, effective method, expiry time, and the number of used instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeElasticityAssurances |
get |
*ElasticityAssurance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region where the Elasticity Assurance is located. You can call the DescribeRegions operation to query the latest list of Alibaba Cloud regions. |
cn-hangzhou |
| ResourceGroupId |
string |
No |
The ID of the resource group. When you use this parameter to filter resources, the number of matching resources cannot exceed 1,000. Note
Filtering by the default resource group is not supported. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
The tags used to filter Elasticity Assurances. |
|
|
object |
No |
A tag that consists of a key-value pair. |
||
| Key |
string |
No |
The tag key. You can specify up to 20 tag keys to filter resources. The query returns a maximum of 1,000 resources that match the specified tags. If more than 1,000 resources match the tags, call the ListTagResources operation to query all the resources. |
TestKey |
| Value |
string |
No |
The tag value. You can specify up to 20 tag values. |
TestValue |
| MaxResults |
integer |
No |
The maximum number of entries to return on each page. Maximum value: 100. Default value: 10. |
10 |
| NextToken |
string |
No |
The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. |
caeba0bbb2be03f84eb48b699f0a4883 |
| PrivatePoolOptions.Ids |
string |
No |
The IDs of the elasticity assurances. You can specify a JSON array of up to 100 elasticity assurance IDs. |
["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"] |
| Platform |
string |
No |
Note
This parameter is deprecated. |
null |
| InstanceType |
string |
No |
The instance type. You can use this parameter to query only active elasticity assurances. To query released elasticity assurances, you must use |
ecs.c6.large |
| ZoneId |
string |
No |
The ID of the zone where the Elasticity Assurance is located. |
cn-hangzhou-h |
| InstanceChargeType |
string |
No |
The billing method of the instances. Only Default value: |
PostPaid |
| Status |
string |
No |
The status of the Elasticity Assurance. Valid values:
If you do not specify this parameter, elasticity assurances in all states are returned, except for those in the |
Active |
| PackageType |
string |
No |
The type of the Elasticity Assurance. Valid values:
|
ElasticityAssurance |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The token used to retrieve the next page of results. |
caeba0bbb2be03f84eb48b699f0a4883 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
The total number of matching entries. |
1 |
| MaxResults |
integer |
The number of entries per page. |
10 |
| ElasticityAssuranceSet |
object |
||
| ElasticityAssuranceItem |
array<object> |
The details of the elasticity assurances. |
|
|
array<object> |
The details of an elasticity assurance. |
||
| Status |
string |
The status of the elasticity assurance. Valid values:
|
Active |
| PrivatePoolOptionsMatchCriteria |
string |
The matching mode of the elasticity assurance. Valid values:
|
Target |
| PrivatePoolOptionsId |
string |
The ID of the elasticity assurance. |
eap-bp1ir35kqtn8ywci**** |
| UsedAssuranceTimes |
integer |
Note
This parameter is currently unused. |
0 |
| LatestStartTime |
string |
Note
This parameter is currently unused. |
null |
| PrivatePoolOptionsName |
string |
The name of the elasticity assurance. |
eapTestName |
| RegionId |
string |
The ID of the region where the elasticity assurance is located. |
cn-hangzhou |
| EndTime |
string |
The time when the elasticity assurance expires. |
2021-12-03T16:00Z |
| StartTime |
string |
The time when the elasticity assurance takes effect. |
2020-12-03T05:25Z |
| Description |
string |
The description of the elasticity assurance. |
This is description. |
| ResourceGroupId |
string |
The ID of the resource group. |
rg-bp67acfmxazb4p**** |
| TotalAssuranceTimes |
string |
The number of times the elasticity assurance can be used. This value is always |
Unlimited |
| AllocatedResources |
object |
||
| AllocatedResource |
array<object> |
The details of the allocated resources. |
|
|
array<object> |
The details of an allocated resource. |
||
| UsedAmount |
integer |
The number of in-use instances. |
2 |
| TotalAmount |
integer |
The total number of reserved instances for the instance type. |
2 |
| AvailableAmount |
integer |
Note
This parameter is currently unused. |
5 |
| FailedAmount |
integer |
1 |
|
| LockedAmount |
integer |
1 |
|
| zoneId |
string |
The ID of the zone where the elasticity assurance is located. |
cn-hangzhou-h |
| InstanceType |
string |
The instance type. |
ecs.c6.large |
| ElasticityAssuranceUsages |
object |
||
| ElasticityAssuranceUsage |
array<object> |
Note
This parameter is currently unused. |
|
|
object |
Note
This parameter is currently unused. |
||
| AccountId |
string |
Note
This parameter is currently unused. |
1144775968548340 |
| ServiceName |
string |
Note
This parameter is currently unused. |
name |
| UsedAmount |
integer |
Note
This parameter is currently unused. |
1 |
| Tags |
object |
||
| Tag |
array<object> |
The tags attached to the elasticity assurance. |
|
|
object |
Details of a tag attached to the elasticity assurance. |
||
| TagValue |
string |
The tag value. |
TestValue |
| TagKey |
string |
The tag key. |
TestKey |
| InstanceChargeType |
string |
The billing method of the instance. Only pay-as-you-go is supported. The value is always |
PostPaid |
| StartTimeType |
string |
When the elasticity assurance takes effect. Valid values:
|
Now |
| ElasticityAssuranceOwnerId |
string |
Note
This parameter is currently unused. |
e114477596854834 |
| RecurrenceRules |
object |
||
| RecurrenceRule |
array<object> |
The recurrence rules for the time-division elasticity assurance. |
|
|
object |
The recurrence rule for the time-division elasticity assurance. |
||
| RecurrenceType |
string |
The recurrence type. Valid values:
|
Daily |
| RecurrenceValue |
string |
The value of the recurrence rule. The valid values of this parameter depend on the value of the
|
1 |
| StartHour |
integer |
The start hour of the active period for the time-division elasticity assurance. |
4 |
| EndHour |
integer |
The end hour of the active period for the time-division elasticity assurance. |
10 |
| PackageType |
string |
The type of the elasticity assurance. Valid values:
|
ElasticityAssurance |
Examples
Success response
JSON format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TotalCount": 1,
"MaxResults": 10,
"ElasticityAssuranceSet": {
"ElasticityAssuranceItem": [
{
"Status": "Active",
"PrivatePoolOptionsMatchCriteria": "Target",
"PrivatePoolOptionsId": "eap-bp1ir35kqtn8ywci****",
"UsedAssuranceTimes": 0,
"LatestStartTime": "null",
"PrivatePoolOptionsName": "eapTestName",
"RegionId": "cn-hangzhou",
"EndTime": "2021-12-03T16:00Z",
"StartTime": "2020-12-03T05:25Z",
"Description": "This is description.",
"ResourceGroupId": "rg-bp67acfmxazb4p****",
"TotalAssuranceTimes": "Unlimited",
"AllocatedResources": {
"AllocatedResource": [
{
"UsedAmount": 2,
"TotalAmount": 2,
"AvailableAmount": 5,
"FailedAmount": 1,
"LockedAmount": 1,
"zoneId": "cn-hangzhou-h",
"InstanceType": "ecs.c6.large",
"ElasticityAssuranceUsages": {
"ElasticityAssuranceUsage": [
{
"AccountId": "1144775968548340",
"ServiceName": "name",
"UsedAmount": 1
}
]
}
}
]
},
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
},
"InstanceChargeType": "PostPaid",
"StartTimeType": "Now",
"ElasticityAssuranceOwnerId": "e114477596854834",
"RecurrenceRules": {
"RecurrenceRule": [
{
"RecurrenceType": "Daily",
"RecurrenceValue": "1",
"StartHour": 4,
"EndHour": 10
}
]
},
"PackageType": "ElasticityAssurance"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | The RegionId parameter is required. |
| 400 | InvalidParameter.Name | The specified PrivatePoolOptions.Name is invalid. | |
| 400 | InvalidParameter.PrivatePoolOptions.Ids | The specified PrivatePoolOptions.Ids is invalid. | |
| 400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | The private pool does not support dedicated hosts. |
| 400 | SpotNotSupported | Spot is not supported for PrivatePool. | The private pool does not support spot instances. |
| 400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | The private pool does not support instances in the classic network. |
| 400 | Invalid.InstanceId | Instance does not exist. | The specified instance does not exist. |
| 400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | 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 PrivatePoolOptions.Id parameter is required. |
| 400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | The private pool does not exist. |
| 400 | Invalid.InstanceType | The InstanceType does not match the PrivatePool. | The instance type and the private pool do not match. |
| 400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | The instance billing method and the private pool do not match. |
| 400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | The zone and the private pool do not match. |
| 400 | Invalid.PrivatePoolOptions.status | The PrivatePool has been used up. | The resource is exhausted. |
| 400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | The specified Platform parameter does not match the private pool. |
| 400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | The specified private pool does not belong to the user who attempted to create the instance. |
| 400 | MissingParameter.PackageType | The specified parameter "PackageType" can not be empty. | |
| 400 | MissingParameter.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" can not be empty. | Specifies that the parameter "PrivatePoolOptions.ids" cannot be empty. |
| 400 | MissingParameter.InstanceCpuCoreCount | The specified parameter "InstanceCpuCoreCount" can not be empty. | The specified parameter 'InstanceCpuCocount' cannot be empty. |
| 400 | MissingParameter.InstanceAmount | The specified parameter "InstanceAmount" can not be empty. | The specified parameter InstanceAmount cannot be empty. |
| 400 | MissingParameter.InstanceCpuCoreCountOrInstanceAmount | The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. | The specified parameter InstanceCpuCoreCount and InstanceAmount cannot be both empty. |
| 400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | The number of specified private pool IDs exceeds the upper limit. |
| 400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | The number of specified zone IDs exceeds the upper limit. |
| 400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | The number of specified instance types exceeds the upper limit. |
| 400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | Multiple private pools are created but not paid. |
| 400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | The InstanceCpuCoreCount and InstanceAmount parameters cannot be both specified. |
| 400 | Invalid.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. | The specified private pool ID does not exist. |
| 400 | Invalid.PackageType | The specified parameter "PackageType" is invalid. | The specified parameter PackageType is invalid. |
| 400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | The private pool is already paid. |
| 400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | The specified AssuranceTimes parameter is invalid. |
| 400 | RepeatStartPrivatePool | PrivatePool has already been started. | The private pool is already started. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 404 | InvalidResourceGroup.NotFound | The specified resource group is not found. | Cannot find the corresponding resource group |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.