Queries the details of an elasticity assurance. For example, you can query the status, match mode, effective mode, expiration time, and number of used instances of an elasticity assurance.
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 to which the elasticity assurance belongs. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| ResourceGroupId |
string |
No |
The ID of the resource group. When you use this parameter to filter resources, the resource count cannot exceed 1,000. Note
Filtering by the default resource group is not supported. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
The list of tag key-value pairs bound to the elasticity assurance. |
|
|
object |
No |
The tag information. |
||
| Key |
string |
No |
The tag key. N indicates that you can set multiple tag keys for filtering. Valid values of N: 1 to 20. If you use a single tag to filter resources, the resource count with this tag cannot exceed 1,000. If you use multiple tags to filter resources, the resource count of resources that have all specified tags attached cannot exceed 1,000. If the resource count exceeds 1,000, call the ListTagResources operation to query resources. |
TestKey |
| Value |
string |
No |
The tag value. N indicates that you can specify multiple tag keys for filtering. Valid values of N: 1 to 20. |
TestValue |
| MaxResults |
integer |
No |
The maximum number of entries per page for a paged query. Maximum value: 100. Default value: 10. |
10 |
| NextToken |
string |
No |
The pagination token for the elasticity assurance query. Obtain the value from the result of the previous request. |
caeba0bbb2be03f84eb48b699f0a4883 |
| PrivatePoolOptions.Ids |
string |
No |
The list of elasticity assurance IDs. The value can be a JSON array that consists of up to 100 IDs. Separate multiple IDs with commas (,). |
["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"] |
| Platform |
string |
No |
Note
This parameter is deprecated. |
null |
| InstanceType |
string |
No |
The instance type. You can use the instance type to query only active elasticity assurances. Released elasticity assurances can be queried only by using |
ecs.c6.large |
| ZoneId |
string |
No |
The zone ID in the region to which the elasticity assurance belongs. |
cn-hangzhou-h |
| InstanceChargeType |
string |
No |
The billing method of the instance. Valid values: PostPaid. Only pay-as-you-go is supported. Default value: PostPaid. |
PostPaid |
| Status |
string |
No |
The status of the elasticity assurance. Valid values:
If you do not specify this parameter, elasticity assurances in all states except Pending and Released are queried. |
Active |
| PackageType |
string |
No |
The type of the elasticity assurance. Valid values:
|
ElasticityAssurance |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination token for the next query. |
caeba0bbb2be03f84eb48b699f0a4883 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
The total number of entries that match the query conditions. |
1 |
| MaxResults |
integer |
The maximum number of entries per page for the elasticity assurance. |
10 |
| ElasticityAssuranceSet |
object |
||
| ElasticityAssuranceItem |
array<object> |
The collection of elasticity assurance details. |
|
|
array<object> |
The details of the elasticity assurance. |
||
| Status |
string |
The status of the elasticity assurance. Valid values:
|
Active |
| PrivatePoolOptionsMatchCriteria |
string |
The match mode of the elasticity assurance. Valid values:
|
Target |
| PrivatePoolOptionsId |
string |
The ID of the elasticity assurance. |
eap-bp1ir35kqtn8ywci**** |
| UsedAssuranceTimes |
integer |
Note
This parameter is not publicly available. |
0 |
| LatestStartTime |
string |
Note
This parameter is not publicly available. |
null |
| PrivatePoolOptionsName |
string |
The service name of the elasticity assurance. |
eapTestName |
| RegionId |
string |
The ID of the region to which the elasticity assurance belongs. |
cn-hangzhou |
| EndTime |
string |
The expiration time of the elasticity assurance. The time is in ISO 8601 standard in UTC. |
2021-12-03T16:00Z |
| StartTime |
string |
The effective period of the elasticity assurance. The time is in ISO 8601 format in UTC. |
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 total number of times that the elasticity assurance is applied. Currently, only the unlimited mode within the effective period is supported. |
Unlimited |
| AllocatedResources |
object |
||
| AllocatedResource |
array<object> |
The list of resource allocation details. |
|
|
array<object> |
The resource allocation details. |
||
| UsedAmount |
integer |
The number of used instances. |
2 |
| TotalAmount |
integer |
The total number of instances to be reserved for a single instance type. |
2 |
| AvailableAmount |
integer |
Note
This parameter is not publicly available. |
5 |
| FailedAmount |
integer |
The failed capacity. |
1 |
| LockedAmount |
integer |
The locked capacity. |
1 |
| zoneId |
string |
The zone ID in the region to which the elasticity assurance belongs. |
cn-hangzhou-h |
| InstanceType |
string |
The instance type. |
ecs.c6.large |
| ElasticityAssuranceUsages |
object |
||
| ElasticityAssuranceUsage |
array<object> |
Note
This parameter is not publicly available. |
|
|
object |
Note
This parameter is not publicly available. |
||
| AccountId |
string |
Note
This parameter is not publicly available. |
1144775968548340 |
| ServiceName |
string |
Note
This parameter is not publicly available. |
name |
| UsedAmount |
integer |
Note
This parameter is not publicly available. |
1 |
| Tags |
object |
||
| Tag |
array<object> |
The list of tag key-value pairs bound to the elasticity assurance. |
|
|
object |
The tag key-value pair information bound to the elasticity assurance. |
||
| TagValue |
string |
The tag value. |
TestValue |
| TagKey |
string |
The tag key. |
TestKey |
| InstanceChargeType |
string |
The billing method of the instance. Currently, only pay-as-you-go is supported. Valid values: PostPaid. |
PostPaid |
| StartTimeType |
string |
The effective mode of the elasticity assurance. Valid values:
|
Now |
| ElasticityAssuranceOwnerId |
string |
Note
This parameter is not publicly available. |
e114477596854834 |
| RecurrenceRules |
object |
||
| RecurrenceRule |
array<object> |
The list of recurrence rules for the time-division elasticity assurance. |
|
|
object |
The recurrence rule for the time-division elasticity assurance. |
||
| RecurrenceType |
string |
The policy type of the recurrence rule. Valid values:
|
Daily |
| RecurrenceValue |
string |
The value of the recurrence rule. Valid values:
|
1 |
| StartHour |
integer |
The effective period of the time-division assurance. |
4 |
| EndHour |
integer |
The end time of the time-division 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. | The PackageType parameter cannot 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.