您可以通过调用API DescribeScalingGroupDetail查询该伸缩组详情,例如,查看指定伸缩组的基本信息、伸缩组内实例、伸缩配置等信息。当ECI类型的伸缩组指定OutputFormat参数为YAML时,可以输出Kubernetes Deployment YAML格式内容。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
ess:DescribeScalingGroupDetail | get |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | 伸缩组所属的地域 ID。更多信息,请参见地域与可用区。 | cn-hangzhou |
ScalingGroupId | string | 是 | 伸缩组的 ID。 | asg-bp18p2yfxow2dloq**** |
OutputFormat | string | 否 | Output 输出格式,现仅支持 YAML 格式。 | YAML |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"ScalingGroup": {
"VpcId": "vpc-wz9fcq97y1vqkd8bijcq6",
"CreationTime": "2014-08-14T10:58Z\n",
"TotalInstanceCount": 1,
"ScalingGroupName": "dyrSuvBOtO1dEdIlIbp****\n",
"SpotInstancePools": 5,
"StoppedCapacity": 1,
"OnDemandPercentageAboveBaseCapacity": 20,
"ModificationTime": "2014-08-14T10:58Z\n",
"MinSize": 1,
"ScalingGroupId": "asg-bp14wlu85wrpchm0****\n",
"CompensateWithOnDemand": true,
"ScalingPolicy": "recycle",
"RemovingWaitCapacity": 1,
"ActiveCapacity": 1,
"OnDemandBaseCapacity": 30,
"ProtectedCapacity": 1,
"HealthCheckType": "ECS",
"LifecycleState": "Active",
"GroupDeletionProtection": true,
"ActiveScalingConfigurationId": "asc-bp1et2qekq3ojr33****\n",
"GroupType": "ECS",
"MultiAZPolicy": "PRIORITY",
"RemovingCapacity": 0,
"PendingWaitCapacity": 0,
"StandbyCapacity": 1,
"CurrentHostName": "hostname",
"PendingCapacity": 0,
"LaunchTemplateId": "lt-m5e3ofjr1zn1aw7****\n",
"TotalCapacity": 1,
"DesiredCapacity": 5,
"SpotInstanceRemedy": true,
"LaunchTemplateVersion": "Default",
"RegionId": "cn-shenzhen",
"VSwitchId": "vsw-bp1whw2u46cn8zubm****\n",
"MaxSize": 2,
"DefaultCooldown": 60,
"VServerGroups": [
{
"LoadBalancerId": "147b46d767c-cn-qingdao-cm5****\n",
"VServerGroupAttributes": [
{
"VServerGroupId": "rsp-bp12bjrny****\n",
"Weight": 1,
"Port": 80
}
]
}
],
"LaunchTemplateOverrides": [
{
"WeightedCapacity": 4,
"InstanceType": "ecs.c5.xlarge\n",
"SpotPriceLimit": 0.025
}
],
"AlbServerGroups": [
{
"AlbServerGroupId": "sgp-ddwb0y0g6y9bjm****\n",
"Weight": 100,
"Port": 80
}
],
"ServerGroups": [
{
"ServerGroupId": "sgp-i9ouakeaerr*****\n",
"Type": "ALB",
"Weight": 100,
"Port": 80
}
],
"RemovalPolicies": [
"OldestScalingConfiguration"
],
"DBInstanceIds": [
"rm-bp15556qzebg1****\n"
],
"LoadBalancerIds": [
"lb-bp19byhscefk3x0li****\n"
],
"VSwitchIds": [
"vsw-bp1whw2u46cn8zubm****\n"
],
"SuspendedProcesses": [
"ScaleIn"
],
"SystemSuspended": true,
"IsElasticStrengthInAlarm": false,
"MonitorGroupId": "1497****\n",
"AzBalance": false,
"AllocationStrategy": "priority",
"SpotAllocationStrategy": "lowestPrice",
"MaxInstanceLifetime": 0,
"CustomPolicyARN": "null",
"InitCapacity": 0,
"ResourceGroupId": "rg-aek2epf32c4uyji",
"LoadBalancerConfigs": [
{
"LoadBalancerId": "lb-2zein3ytoeq49cmkbyxr0",
"Weight": 100
}
],
"EnableDesiredCapacity": true,
"Tags": [
{
"TagKey": "Department",
"TagValue": "Finance",
"Propagate": false
}
],
"HealthCheckTypes": [
"ECS"
]
},
"Output": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: nginx-deployment\n labels:\n app: nginx\n spec:\n replicas: 3\n selector:\n matchLabels:\n app: nginx\n template:\n metadata:\n labels:\n app: nginx\n annotations:\n k8s.aliyun.com/eip-bandwidth: 10\n k8s.aliyun.com/eci-with-eip: true\n spec:\n containers:\n - name: nginx\n image: nginx:1.14.2\n ports:\n - containerPort: 80"
}
错误码
访问错误中心查看更多错误码。