本文中含有需要您注意的重要提示信息,忽略该信息可能对您的业务造成影响,请务必仔细阅读。
伸缩组配置的有效性很大程度决定了扩容过程的成功率。弹性伸缩通过弹性强度描述伸缩配置的有效性,让配置的优良程度量化,帮助您针对性的优化伸缩配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 |
类型 |
是否必选 |
示例值 |
描述 |
名称 |
类型 |
是否必选 |
示例值 |
描述 |
Action | String | 是 | DescribeElasticStrength | 系统规定参数。取值:DescribeElasticStrength。 |
RegionId | String | 是 | cn-qingdao | 伸缩组所属地域的ID。 |
ScalingGroupId | String | 否 | asg-bp18p2yfxow2dloq**** | 伸缩组的ID。 |
InstanceTypes.N | String | 否 | ecs.g6.large | ECS实例的实例规格。 |
PriorityStrategy | String | 否 | NoSpot | 此字段已废弃,请使用SpotStrategy。 后付费实例的抢占策略。传入时覆盖伸缩组配置的抢占策略,取值范围:
默认值:NoSpot。 |
SystemDiskCategories.N | String | 否 | cloud | 系统盘的多磁盘类型。取值范围:
|
ScalingGroupIds.N | String | 否 | asg-bp14wlu85wrpchm0**** | 伸缩组的ID。 |
SpotStrategy | String | 否 | NoSpot | 实例的抢占策略。取值范围:
默认值:NoSpot。 |
VSwitchIds.N | String | 否 | vsw-bp1whw2u46cn8zubm**** | 指定多个交换机ID。 当不指定伸缩组ID时,需要传入此参数。 |
ImageId | String | 否 | centos6u5_64_20G_aliaegis****.vhd | 镜像文件ID,自动创建实例时使用的镜像资源。 当不指定伸缩组ID时,需要至少指定ImageId、ImageName、ImageFamily中的一个。 |
ImageName | String | 否 | ubuntu_18_04_x64_20G_alibase_20231225.vhd | 镜像文件名称,同一个地域内镜像名称唯一。如果设置了ImageId,ImageName将被忽略。 不支持通过ImageName设置镜像市场镜像。 当不指定伸缩组ID时,需要至少指定ImageId、ImageName、ImageFamily中的一个。 |
ImageFamily | String | 否 | CentOS7 | 镜像族系名称,通过设置该参数来获取当前镜像族系内最新的可用镜像,用于创建实例。如果已经设置了参数ImageId,则不能设置该参数。 当不指定伸缩组ID时,需要至少指定ImageId、ImageName、ImageFamily中的一个。 |
DataDiskCategories.N | String | 否 | cloud_essd | 数据盘类型。可能值:
|
Ipv6AddressCount | Integer | 否 | 1 | IPv6地址数。当实例规格不满足IPv6地址数量要求时,会导致弹性强度差。 当不指定伸缩组ID时,可以传入此参数。 |
返回数据
示例
请求示例
http(s)://ess.aliyuncs.com/?Action=DescribeElasticStrength
&RegionId=cn-qingdao
&ScalingGroupId=asg-bp18p2yfxow2dloq****
&InstanceTypes=["ecs.g6.large"]
&PriorityStrategy=NoSpot
&SystemDiskCategories=["cloud"]
&ScalingGroupIds=["asg-bp14wlu85wrpchm0****"]
&SpotStrategy=NoSpot
&VSwitchIds=["vsw-bp1whw2u46cn8zubm****"]
&ImageId=centos6u5_64_20G_aliaegis****.vhd
&ImageName=ubuntu_18_04_x64_20G_alibase_20231225.vhd
&ImageFamily=CentOS7
&DataDiskCategories=["cloud_essd"]
&Ipv6AddressCount=1
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeElasticStrengthResponse>
<RequestId>73469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
<TotalStrength>1.5</TotalStrength>
<ElasticStrength>Strong</ElasticStrength>
<ResourcePools>
<Strength>0.6</Strength>
<InstanceType>ecs.c7t.xlarge</InstanceType>
<ZoneId>cn-hangzhou-g</ZoneId>
<VSwitchIds>vsw-2ze0uc933kantv******</VSwitchIds>
<Code>InstanceTypesOrDiskTypesNotSupported</Code>
<Msg>The instanceTypes or diskTypes are not supported.</Msg>
<Status>Available</Status>
<InventoryHealth>
<HealthScore>3</HealthScore>
<AdequacyScore>3</AdequacyScore>
<SupplyScore>3</SupplyScore>
<HotScore>3</HotScore>
</InventoryHealth>
</ResourcePools>
<ElasticStrengthModels>
<ScalingGroupId>asg-wz98mnj7nblv9gc****</ScalingGroupId>
<ElasticStrength>Strong</ElasticStrength>
<TotalStrength>5</TotalStrength>
<ResourcePools>
<InstanceType>ecs.r7.large</InstanceType>
<Strength>0.6</Strength>
<ZoneId>cn-hangzhou-g</ZoneId>
<VSwitchIds>vsw-2ze6e8p4aid08lymlsguv</VSwitchIds>
<Code>InstanceTypesOrDiskTypesNotSupported</Code>
<Msg>The instanceTypes or diskTypes are not supported.</Msg>
<Status>Available</Status>
<InventoryHealth>
<HealthScore>3</HealthScore>
<AdequacyScore>3</AdequacyScore>
<SupplyScore>2</SupplyScore>
<HotScore>0</HotScore>
</InventoryHealth>
</ResourcePools>
</ElasticStrengthModels>
</DescribeElasticStrengthResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "73469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"TotalStrength" : 1.5,
"ElasticStrength" : "Strong",
"ResourcePools" : [ {
"Strength" : 0.6,
"InstanceType" : "ecs.c7t.xlarge",
"ZoneId" : "cn-hangzhou-g",
"VSwitchIds" : [ "vsw-2ze0uc933kantv******" ],
"Code" : "InstanceTypesOrDiskTypesNotSupported",
"Msg" : "The instanceTypes or diskTypes are not supported.",
"Status" : "Available",
"InventoryHealth" : {
"HealthScore" : 3,
"AdequacyScore" : 3,
"SupplyScore" : 3,
"HotScore" : 3
}
} ],
"ElasticStrengthModels" : [ {
"ScalingGroupId" : "asg-wz98mnj7nblv9gc****",
"ElasticStrength" : "Strong",
"TotalStrength" : 5,
"ResourcePools" : [ {
"InstanceType" : "ecs.r7.large",
"Strength" : 0.6,
"ZoneId" : "cn-hangzhou-g",
"VSwitchIds" : [ "vsw-2ze6e8p4aid08lymlsguv" ],
"Code" : "InstanceTypesOrDiskTypesNotSupported",
"Msg" : "The instanceTypes or diskTypes are not supported.",
"Status" : "Available",
"InventoryHealth" : {
"HealthScore" : 3,
"AdequacyScore" : 3,
"SupplyScore" : 2,
"HotScore" : 0
}
} ]
} ]
}
错误码
访问错误中心查看更多错误码。
该文章对您有帮助吗?
- 本页导读 (1)
- 调试
- 请求参数
- 返回数据
- 示例
- 错误码