Obtient les détails d'une garantie d'élasticité, y compris son état, son mode de correspondance, son mode d'activation, son heure d'expiration et le nombre d'instances utilisées.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:DescribeElasticityAssurances |
get |
*ElasticityAssurance
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région où se trouve la garantie d'élasticité. Vous pouvez appeler l'opération DescribeRegions pour interroger la liste la plus récente des régions d'Alibaba Cloud. |
cn-hangzhou |
| ResourceGroupId |
string |
Non |
L'identifiant du groupe de ressources. Lorsque vous utilisez ce paramètre pour filtrer les ressources, le nombre de ressources correspondantes ne peut pas dépasser 1 000. Remarque
Le filtrage par le groupe de ressources par défaut n'est pas pris en charge. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
Non |
Les balises utilisées pour filtrer les garanties d'élasticité. |
|
|
object |
Non |
Une balise composée d'une paire clé-valeur. |
||
| Key |
string |
Non |
La clé de balise. Vous pouvez spécifier jusqu'à 20 clés de balise pour filtrer les ressources. La requête renvoie un maximum de 1 000 ressources correspondant aux balises spécifiées. Si plus de 1 000 ressources correspondent aux balises, appelez l'opération ListTagResources pour interroger toutes les ressources. |
TestKey |
| Value |
string |
Non |
La valeur de balise. Vous pouvez spécifier jusqu'à 20 valeurs de balise. |
TestValue |
| MaxResults |
integer |
Non |
Le nombre maximal d'entrées à renvoyer sur chaque page. Valeur maximale : 100. Valeur par défaut : 10. |
10 |
| NextToken |
string |
Non |
Le jeton de pagination utilisé dans la requête suivante pour récupérer une nouvelle page de résultats. Vous n'avez pas besoin de spécifier ce paramètre pour la première requête. Vous devez spécifier le jeton obtenu lors de la requête précédente comme valeur de NextToken. |
caeba0bbb2be03f84eb48b699f0a4883 |
| PrivatePoolOptions.Ids |
string |
Non |
Les identifiants des garanties d'élasticité. Vous pouvez spécifier un tableau JSON contenant jusqu'à 100 identifiants de garantie d'élasticité. |
["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"] |
| Platform |
string |
Non |
Remarque
Ce paramètre est obsolète. |
null |
| InstanceType |
string |
Non |
Le type d'instance. Vous pouvez utiliser ce paramètre pour interroger uniquement les garanties d'élasticité actives. Pour interroger les garanties d'élasticité libérées, vous devez utiliser PrivatePoolOptions.Ids. |
ecs.c6.large |
| ZoneId |
string |
Non |
L'identifiant de la zone où se trouve la garantie d'élasticité. |
cn-hangzhou-h |
| InstanceChargeType |
string |
Non |
Le mode de facturation des instances. Seul Valeur par défaut : |
PostPaid |
| Status |
string |
Non |
L'état de la Garantie d'élasticité. Valeurs valides :
Si vous ne spécifiez pas ce paramètre, les garanties d'élasticité dans tous les états sont renvoyées, à l'exception de celles dans les états |
Active |
| PackageType |
string |
Non |
Le type de la garantie d'élasticité. Valeurs valides :
|
ElasticityAssurance |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| NextToken |
string |
Le jeton utilisé pour récupérer la page de résultats suivante. |
caeba0bbb2be03f84eb48b699f0a4883 |
| RequestId |
string |
L'identifiant de la requête. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
Le nombre total d'entrées correspondantes. |
1 |
| MaxResults |
integer |
Le nombre d'entrées par page. |
10 |
| ElasticityAssuranceSet |
object |
||
| ElasticityAssuranceItem |
array<object> |
Les détails des garanties d'élasticité. |
|
|
array<object> |
Les détails d'une garantie d'élasticité. |
||
| Status |
string |
The status of the elasticity assurance service. Valid values:
|
Active |
| PrivatePoolOptionsMatchCriteria |
string |
The matching mode of the elasticity assurance service. Valid values:
|
Target |
| PrivatePoolOptionsId |
string |
The ID of the elasticity assurance service. |
eap-bp1ir35kqtn8ywci**** |
| UsedAssuranceTimes |
integer |
Remarque
This parameter is not publicly available. |
0 |
| LatestStartTime |
string |
Remarque
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 service belongs. |
cn-hangzhou |
| EndTime |
string |
The expiration time of the elasticity assurance service. |
2021-12-03T16:00Z |
| StartTime |
string |
The effective period of the elasticity assurance service. |
2020-12-03T05:25Z |
| Description |
string |
The description of the elasticity assurance service. |
This is description. |
| ResourceGroupId |
string |
The ID of the resource group. |
rg-bp67acfmxazb4p**** |
| TotalAssuranceTimes |
string |
The total number of times that the elasticity assurance service can be applied. Currently, only the unlimited mode within the service 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 specific instance type. |
2 |
| AvailableAmount |
integer |
Remarque
This parameter is not publicly available. |
5 |
| FailedAmount |
integer |
1 |
|
| LockedAmount |
integer |
1 |
|
| zoneId |
string |
The zone ID in the region to which the elasticity assurance service belongs. |
cn-hangzhou-h |
| InstanceType |
string |
The instance type. |
ecs.c6.large |
| ElasticityAssuranceUsages |
object |
||
| ElasticityAssuranceUsage |
array<object> |
Remarque
This parameter is not publicly available. |
|
|
object |
Remarque
This parameter is not publicly available. |
||
| AccountId |
string |
Remarque
This parameter is not publicly available. |
1144775968548340 |
| ServiceName |
string |
Remarque
This parameter is not publicly available. |
name |
| UsedAmount |
integer |
Remarque
This parameter is not publicly available. |
1 |
| Tags |
object |
||
| Tag |
array<object> |
The list of tag key-value pairs bound to the elasticity assurance service. |
|
|
object |
The tag key-value pair information bound to the elasticity assurance service. |
||
| TagValue |
string |
The tag value. |
TestValue |
| TagKey |
string |
The tag key. |
TestKey |
| InstanceChargeType |
string |
The billing method of instances. Currently, only pay-as-you-go is supported. Valid values: PostPaid. |
PostPaid |
| StartTimeType |
string |
The effective method of the elasticity assurance service. Valid values:
|
Now |
| ElasticityAssuranceOwnerId |
string |
Remarque
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 execution 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 service. Valid values:
|
ElasticityAssurance |
Exemples
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"
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
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 required parameter PackageType 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 |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.