调用API DescribeEciScalingConfigurationDetail,通过伸缩组的伸缩配置ID查询对应的伸缩配置信息(例如临时存储空间大小、IPv6地址数、弹性公网IP的带宽等),支持输出为YAML格式。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
ess:DescribeEciScalingConfigurationDetail | get |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | 伸缩规则所属伸缩组的地域 ID。 | cn-beijing |
ScalingGroupId | string | 否 | 伸缩配置所属的伸缩组的 ID。 | asg-bp1ffogfdauy0jw0**** |
ScalingConfigurationId | string | 是 | ECI 类型伸缩组的伸缩配置 ID。 | asc-bp1ffogfdauy0nu5**** |
OutputFormat | string | 否 | Output 输出格式,现仅支持 YAML。 | YAML |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "6EF9BFEE-FE07-4627-B8FB-14326FB9****",
"ScalingConfiguration": {
"CreationTime": "2023-05-10T02:39:15Z",
"ScalingConfigurationName": "scalingconfi****",
"SecurityGroupId": "sg-bp18kz60mefs****",
"ActiveDeadlineSeconds": 60,
"SpotStrategy": "NoSpot",
"AutoCreateEip": true,
"ScalingGroupId": "asg-bp1frlu04fq4zv65b1bh",
"EphemeralStorage": 20,
"Ipv6AddressCount": 1,
"Description": "This is an example.",
"EipBandwidth": 5,
"ImageSnapshotId": "imc-2zebxkiifuyzzlhl****",
"Memory": 4,
"RestartPolicy": "Always",
"SpotPriceLimit": 0.025,
"IngressBandwidth": 1024000,
"CpuOptionsThreadsPerCore": 2,
"TerminationGracePeriodSeconds": 60,
"LoadBalancerWeight": 50,
"DnsPolicy": "Default",
"HostName": "hostname",
"EgressBandwidth": 10485760,
"RegionId": "cn-shanghai",
"RamRoleName": "ram:PassRole\n",
"Cpu": 2,
"AutoMatchImageCache": true,
"ResourceGroupId": "rg-acfmwozpmmksakq",
"ContainerGroupName": "test",
"ScalingConfigurationId": "asc-2zec39vg84usxdocme6a",
"CpuOptionsCore": 2,
"SlsEnable": false,
"Containers": [
{
"ReadinessProbeHttpGetPath": "/usr/local",
"ReadinessProbeSuccessThreshold": 1,
"LivenessProbePeriodSeconds": 5,
"LivenessProbeTcpSocketPort": 80,
"LivenessProbeHttpGetScheme": "HTTP",
"WorkingDir": "/usr/local/nginx",
"Tty": true,
"LivenessProbeHttpGetPort": 8080,
"Gpu": 2,
"ReadinessProbeInitialDelaySeconds": 5,
"Stdin": true,
"Memory": 2,
"Name": "nginx",
"SecurityContextReadOnlyRootFilesystem": true,
"LivenessProbeHttpGetPath": "/usr/nginx/\n",
"Image": "registry-vpc.aliyuncs.com/eci_open/alpine:3.5",
"ReadinessProbeTcpSocketPort": 80,
"ReadinessProbeHttpGetScheme": "HTTP",
"ReadinessProbeHttpGetPort": 80,
"LivenessProbeSuccessThreshold": 1,
"ReadinessProbeTimeoutSeconds": 5,
"SecurityContextRunAsUser": 1000,
"LivenessProbeInitialDelaySeconds": 10,
"ReadinessProbePeriodSeconds": 5,
"ImagePullPolicy": "Always",
"StdinOnce": true,
"Cpu": 2,
"LivenessProbeTimeoutSeconds": 10,
"ReadinessProbeFailureThreshold": 3,
"LivenessProbeFailureThreshold": 3,
"Ports": [
{
"Port": 8083,
"Protocol": "TCP"
}
],
"VolumeMounts": [
{
"ReadOnly": true,
"SubPath": "data2/\n",
"Name": "default-volume1",
"MountPropagation": "None",
"MountPath": "/pod/data"
}
],
"EnvironmentVars": [
{
"Key": "PATH",
"Value": "/usr/bin/\n",
"FieldRefFieldPath": "fieldPath"
}
],
"Commands": [
"sleep"
],
"LivenessProbeExecCommands": [
"cat /tmp/healthy"
],
"Args": [
"100"
],
"ReadinessProbeExecCommands": [
"cat /tmp/healthy\n"
],
"SecurityContextCapabilityAdds": [
"NET_ADMIN"
],
"LifecyclePostStartHandlerHttpGetHost": "10.0.XX.XX",
"LifecyclePostStartHandlerHttpGetPort": 80,
"LifecyclePostStartHandlerHttpGetPath": "/healthyz\n",
"LifecyclePostStartHandlerHttpGetScheme": "HTTP",
"LifecyclePostStartHandlerExecs": [
"[\"/bin/sh\", \"-c\",\"echo Hello from the preStop handler > /usr/share/message\"]"
],
"LifecyclePostStartHandlerTcpSocketHost": "10.0.XX.XX\n",
"LifecyclePostStartHandlerTcpSocketPort": 80,
"LifecyclePreStopHandlerHttpGetHost": "10.0.XX.XX\n",
"LifecyclePreStopHandlerHttpGetPort": 80,
"LifecyclePreStopHandlerHttpGetPath": "/healthyz",
"LifecyclePreStopHandlerHttpGetScheme": "HTTP",
"LifecyclePreStopHandlerExecs": [
"[\"/bin/sh\", \"-c\",\"echo Hello from the preStop handler > /usr/share/message\"]"
],
"LifecyclePreStopHandlerTcpSocketHost": "10.0.XX.XX",
"LifecyclePreStopHandlerTcpSocketPort": 80
}
],
"InitContainers": [
{
"SecurityContextReadOnlyRootFilesystem": true,
"ImagePullPolicy": "Always",
"WorkingDir": "/www",
"Cpu": 0.5,
"Image": "registry-vpc.cn-hongkong.aliyuncs.com/eci_open/nginx:alpine",
"Gpu": 1,
"SecurityContextRunAsUser": "1000",
"Memory": 1,
"Name": "test-init\n",
"InitContainerEnvironmentVars": [
{
"Key": "PATH",
"Value": "/usr/local/bin\n",
"FieldRefFieldPath": "path"
}
],
"InitContainerPorts": [
{
"Port": 1024,
"Protocol": "UDP"
}
],
"InitContainerVolumeMounts": [
{
"ReadOnly": false,
"SubPath": "/usr/sub/",
"Name": "test-empty\n",
"MountPropagation": "None",
"MountPath": "/usr/share/\n"
}
],
"SecurityContextCapabilityAdds": [
"NET_ADMIN"
],
"InitContainerCommands": [
"sleep"
],
"InitContainerArgs": [
"10"
]
}
],
"Tags": [
{
"Key": "version",
"Value": "3"
}
],
"Volumes": [
{
"Type": "EmptyDirVolume",
"DiskVolumeDiskId": "d-xx",
"DiskVolumeFsType": "xfs",
"EmptyDirVolumeMedium": "memory",
"NFSVolumePath": "/share\n",
"DiskVolumeDiskSize": 15,
"NFSVolumeReadOnly": false,
"FlexVolumeFsType": "ext4",
"ConfigFileVolumeDefaultMode": 644,
"FlexVolumeDriver": "flexvolume",
"FlexVolumeOptions": "{\"volumeId\":\"d-2zehdahrwoa7srg****\",\"performanceLevel\": \"PL2\"}\n",
"NFSVolumeServer": "3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com\n",
"Name": "default-volume1\n",
"ConfigFileVolumeConfigFileToPaths": [
{
"Path": "/usr/bin/\n",
"Mode": 644,
"Content": "bGl1bWk=\n"
}
],
"EmptyDirVolumeSizeLimit": "256Mi",
"HostPathVolumeType": "Directory",
"HostPathVolumePath": "/pod/data\n"
}
],
"ImageRegistryCredentials": [
{
"Password": "yourpaasword",
"Server": "registry-vpc.cn-shanghai.aliyuncs.com\n",
"UserName": "yourusername"
}
],
"DnsConfigOptions": [
{
"Name": "name",
"Value": "value"
}
],
"HostAliases": [
{
"Ip": "192.0.XX.XX\n",
"Hostnames": [
"['hehe.com', 'haha.com']\n"
]
}
],
"SecurityContextSysCtls": [
{
"Name": "kernel.msgmax\n",
"Value": "65536"
}
],
"AcrRegistryInfos": [
{
"InstanceId": "cri-nwj395hgf6f3****\n",
"InstanceName": "acr-test\n",
"RegionId": "cn-hangzhou\n",
"Domains": [
"*****-****-registry.cn-beijing.cr.aliyuncs.com\n"
]
}
],
"DnsConfigNameServers": [
"172.10.*.**\n"
],
"DnsConfigSearches": [
"svc.local.kubenetes\n"
],
"NtpServers": [
"ntp.cloud.aliyuncs.com\n"
],
"LifecycleState": "Active",
"CostOptimization": false,
"InstanceFamilyLevel": "EnterpriseLevel",
"InstanceTypes": [
"ecs.g6.large\n"
],
"DataCacheBucket": "default",
"DataCachePL": "PL1\n",
"DataCacheProvisionedIops": 40000,
"DataCacheBurstingEnabled": false,
"EipPublicIpAddressPoolId": "pippool-bp187arfugi543y1s****",
"EipCommonBandwidthPackage": "cbwp-bp1rxai1z4b1an454xl8m",
"EipISP": "BGP",
"ComputeCategory": [
"economy"
]
},
"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"
}
错误码
HTTP status code | 错误码 | 错误信息 |
---|---|---|
403 | Forbidden.RiskControl | Forbidden.RiskControl |
访问错误中心查看更多错误码。