调用DescribeElasticityAssurances查询弹性保障服务的详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeElasticityAssurances |
系统规定参数。取值:DescribeElasticityAssurances。 |
RegionId | String | 是 | cn-hangzhou |
弹性保障服务所属地域ID。您可以调用DescribeRegions查看最新的阿里云地域列表。 |
ResourceGroupId | String | 否 | rg-bp67acfmxazb4p**** |
资源组ID。使用该参数过滤资源时,资源数量不能超过1000个。 说明 不支持默认资源组过滤。
|
Tag.N.Key | String | 否 | TestKey |
标签键。N表示可以设置多个标签键进行过滤,N的取值范围为1~20。 使用一个标签过滤资源,查询到该标签下的资源数量不能超过1000个;使用多个标签过滤资源,查询到同时绑定了多个标签的资源数量不能超过1000个。如果资源数量超过1000个,请使用ListTagResources接口进行查询。 |
Tag.N.Value | String | 否 | TestValue |
标签值。N表示可以设置多个标签键进行过滤,N的取值范围为1~20。 |
MaxResults | Integer | 否 | 10 |
分页查询时每页行数。 最大值为100。 默认值为10。 |
NextToken | String | 否 | caeba0bbb2be03f84eb48b699f0a4883 |
弹性保障服务查询起始标志。由上一次的请求结果中获取。 |
PrivatePoolOptions.Ids | String | 否 | ["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"] |
弹性保障服务ID列表。取值可以由多个ID组成一个JSON数组,最多支持100个ID,ID之间用半角逗号(,)隔开。 |
Platform | String | 否 | null |
说明 该参数已废弃。
|
InstanceType | String | 否 | ecs.c6.large |
实例规格。 |
ZoneId | String | 否 | cn-hangzhou-h |
弹性保障服务所属地域下的可用区ID。 |
InstanceChargeType | String | 否 | PostPaid |
实例的计费方式。取值:PostPaid,目前仅支持按量付费。 默认值为PostPaid。 |
Status | String | 否 | Active |
弹性保障服务的状态。取值范围:
默认值为Active。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
NextToken | String | caeba0bbb2be03f84eb48b699f0a4883 |
弹性保障服务下一个查询起始标志。 |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
请求ID。 |
TotalCount | Integer | 1 |
符合查询条件的记录条数。 |
MaxResults | Integer | 10 |
弹性保障服务每页显示行数。 |
ElasticityAssuranceSet | Array of ElasticityAssuranceItem |
弹性保障服务详细信息组成的集合。 |
|
ElasticityAssuranceItem | |||
Status | String | Active |
弹性保障服务的状态。可能值:
|
PrivatePoolOptionsMatchCriteria | String | Target |
弹性保障服务的匹配模式。可能值:
|
PrivatePoolOptionsId | String | eap-bp1ir35kqtn8ywci**** |
弹性保障服务ID。 |
UsedAssuranceTimes | Integer | 0 |
说明 该参数暂未开放使用。
|
LatestStartTime | String | null |
说明 该参数暂未开放使用。
|
PrivatePoolOptionsName | String | eapTestName |
弹性保障服务名称。 |
RegionId | String | cn-hangzhou |
弹性保障服务所属地域ID。 |
EndTime | String | 2021-12-03T16:00Z |
弹性保障服务失效时间。 |
StartTime | String | 2020-12-03T05:25Z |
弹性保障服务生效时间。 |
Description | String | This is description. |
弹性保障服务描述。 |
ResourceGroupId | String | rg-bp67acfmxazb4p**** |
资源组ID。 |
TotalAssuranceTimes | String | Unlimited |
弹性保障服务的总次数。 |
AllocatedResources | Array of AllocatedResource |
资源分配详情。 |
|
AllocatedResource | |||
UsedAmount | Integer | 2 |
已使用的实例的数量。 |
TotalAmount | Integer | 2 |
在一个实例规格内,需要预留的实例的总数量。 |
zoneId | String | cn-hangzhou-h |
可用区ID。 |
InstanceType | String | ecs.c6.large |
实例规格。 |
Tags | Array of Tag |
弹性保障服务绑定的标签键值对信息。 |
|
Tag | |||
TagValue | String | TestValue |
标签值。 |
TagKey | String | TestKey |
标签键。 |
InstanceChargeType | String | PostPaid |
实例的计费方式。可能值:PostPaid,目前仅支持按量付费。 |
StartTimeType | String | Now |
弹性保障生效方式。可能值:
|
示例
请求示例
https://ecs.aliyuncs.com/?Action=DescribeElasticityAssurances
&RegionId=cn-hangzhou
&PrivatePoolOptions.Ids=["eap-bp1ir35kqtn8ywci****", "eap-bp67acfmxazb5****"]
&InstanceType=ecs.c6.large
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeElasticityAssurancesResponse>
<ElasticityAssuranceSet>
<ElasticityAssuranceItem>
<Status>Active</Status>
<UsedAssuranceTimes>0</UsedAssuranceTimes>
<Description>This is description.</Description>
<EndTime>2021-12-03T16:00Z</EndTime>
<ResourceGroupId>rg-bp67acfmxazb4p****</ResourceGroupId>
<PrivatePoolOptionsName>eapTestName</PrivatePoolOptionsName>
<LatestStartTime/>
<InstanceChargeType>PostPaid</InstanceChargeType>
<StartTime>2020-12-03T05:25Z</StartTime>
<StartTimeType>Now</StartTimeType>
<PrivatePoolOptionsMatchCriteria>Target</PrivatePoolOptionsMatchCriteria>
<AllocatedResources>
<AllocatedResource>
<UsedAmount>2</UsedAmount>
<zoneId>cn-hangzhou-h</zoneId>
<TotalAmount>2</TotalAmount>
<InstanceType>ecs.c6.large</InstanceType>
</AllocatedResource>
</AllocatedResources>
<PrivatePoolOptionsId>eap-bp1ir35kqtn8ywci****</PrivatePoolOptionsId>
<TotalAssuranceTimes>Unlimited</TotalAssuranceTimes>
<RegionId>cn-hangzhou</RegionId>
<Tags>
<Tag>
<TagKey>TestKey</TagKey>
<TagValue>TestValue</TagValue>
</Tag>
</Tags>
</ElasticityAssuranceItem>
</ElasticityAssuranceSet>
<TotalCount>1</TotalCount>
<NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
<MaxResults>10</MaxResults>
</DescribeElasticityAssurancesResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"ElasticityAssuranceSet" : {
"ElasticityAssuranceItem" : [ {
"Status" : "Active",
"UsedAssuranceTimes" : 0,
"Description" : "This is description.",
"EndTime" : "2021-12-03T16:00Z",
"ResourceGroupId" : "rg-bp67acfmxazb4p****",
"PrivatePoolOptionsName" : "eapTestName",
"LatestStartTime" : "",
"InstanceChargeType" : "PostPaid",
"StartTime" : "2020-12-03T05:25Z",
"StartTimeType" : "Now",
"PrivatePoolOptionsMatchCriteria" : "Target",
"AllocatedResources" : {
"AllocatedResource" : [ {
"UsedAmount" : 2,
"zoneId" : "cn-hangzhou-h",
"TotalAmount" : 2,
"InstanceType" : "ecs.c6.large"
} ]
},
"PrivatePoolOptionsId" : "eap-bp1ir35kqtn8ywci****",
"TotalAssuranceTimes" : "Unlimited",
"RegionId" : "cn-hangzhou",
"Tags" : {
"Tag" : [ {
"TagKey" : "TestKey",
"TagValue" : "TestValue"
} ]
}
} ]
},
"TotalCount" : 1,
"NextToken" : "caeba0bbb2be03f84eb48b699f0a4883",
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"MaxResults" : 10
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | MissingParameter.RegionId | The specified RegionId should not be null. | RegionId是必选参数。 |
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.InstanceType | The InstanceType does not match the PrivatePool. | 实例类型与私有池不匹配。 |
400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | 实例计费类型与私有池不匹配。 |
400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | 可用区与私有池不匹配。 |
400 | Invalid.PrivatePoolOptions.MatchCriteria | The PrivatePoolOptions.MatchCriteria does not match the PrivatePool. | 指定的PrivatePoolOptions.MatchCriteria参数与私有池不匹配。 |
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 | Invalid.InstanceId | The Instance dose not attached to a PrivatePool. | 实例未与私有池匹配。 |
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.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. | 私有池已经启动。 |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 内部错误,请重试。 |
访问错误中心查看更多错误码。