文档

CreateEciScalingConfiguration

更新时间:

调用API CreateEciScalingConfiguration接口创建一个ECI类型的伸缩配置,弹性伸缩会以该伸缩配置作为ECI实例使用的模板,在触发弹性扩容活动时自动创建ECI实例满足您的业务需求。

接口说明

伸缩配置用来指定弹性扩张时使用的ECI实例模板。

参数Cpu和Memory用于指定CPU和内存定义实例规格的范围,弹性伸缩会结合IO优化、可用区等因素确定可用实例规格集合,并根据价格排序为您创建价格最低的实例。该方式仅适用于伸缩组的扩缩容策略为成本优化策略,且伸缩配置未指定实例规格的场景。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称

类型

是否必选

示例值

描述

Action String CreateEciScalingConfiguration

系统规定参数。取值:CreateEciScalingConfiguration

ScalingGroupId String asg-bp14wlu85wrpchm0****

伸缩配置所属的伸缩组的ID。

ScalingConfigurationName String scalingconfig****

伸缩配置的名称。长度为2~64个英文或中文字符组成,以数字、大小写字母或中文开头,可包含数字、下划线(_)、短划线(-)或半角句号(.)。

在同一地域下同一伸缩组内伸缩配置名称唯一。如果您没有指定该参数,则默认使用伸缩配置的ID。

SecurityGroupId String sg-uf66jeqopgqa9hdn****

ECI实例所属的安全组ID。同一个安全组内的ECI实例之间可以互相访问。

如果没有指定安全组,系统将自动使用您选择的地域下的默认安全组,您需要确保该安全组的入方向规则中包含容器需要暴露的协议和端口。如果您在该地域下没有默认安全组,系统将自动创建一个默认安全组,并将您声明的容器协议和端口添加到该安全组的入方向规则中。

ContainerGroupName String nginx-test

ECI实例名称,即容器组名称。

RestartPolicy String Always

ECI实例重启策略。取值范围:

  • Always:总是重启。
  • Never:从不重启。
  • OnFailure:失败时重启。

默认值:Always。

Cpu Float 1.0

实例级别vCPU大小。单位:核。

Memory Float 2.0

实例级别内存大小。单位:GiB。

ResourceGroupId String rg-uf66jeqopgqa9hdn****

资源组ID。

DnsPolicy String Default

DNS策略。取值范围:

  • None:使用DnsConfig字段设置的DNS。
  • Default:继承运行环境的DNS设置。
ImageSnapshotId String imc-2zebxkiifuyzzlhl****

镜像缓存ID。

RamRoleName String RamTestRole

实例RAM角色名称。其中,ECI与ECS共用实例RAM角色,更多信息,请参见通过API使用实例RAM角色

TerminationGracePeriodSeconds Long 60

程序的缓冲时间,用于处理关闭之前的操作。单位为秒。

AutoMatchImageCache Boolean false

是否自动匹配镜像缓存。取值范围:

  • true:是。
  • false:否。

默认值:false。

Ipv6AddressCount Integer 1

IPv6地址数。

ActiveDeadlineSeconds Long 1000

有效期限。单位为秒。

SpotStrategy String SpotWithPriceLimit

实例的抢占策略。取值范围:

  • NoSpot:正常按量付费实例。
  • SpotWithPriceLimit:设置上限价格的抢占式实例。
  • SpotAsPriceGo:系统自动出价,跟随当前市场实际价格的抢占式实例。

默认值:NoSpot。

SpotPriceLimit Float 0.025

设置抢占式实例的每小时最高价格,最多精确到小数点后3位。

SpotStrategy取值为SpotWithPriceLimit时,必须设置SpotPriceLimit

AutoCreateEip Boolean true

是否自动创建弹性公网IP,并绑定ECI实例。

EipBandwidth Integer 5

弹性公网IP的带宽。默认为5 M。

HostName String test

主机名称,即容器组名称。

IngressBandwidth Long 1024000

入方向带宽限制。单位:Byte。

EgressBandwidth Long 1024000

出方向带宽限制。单位:Byte。

CpuOptionsCore Integer 2

CPU物理核心数。仅部分规格支持自定义设置。更多信息,请参见自定义CPU选项

CpuOptionsThreadsPerCore Integer 2

每核线程数。仅部分规格支持自定义设置。配置为1时表示关闭超线程。更多信息,请参见自定义CPU选项

EphemeralStorage Integer 20

临时存储空间大小,默认使用ESSD PL1类型的云盘。单位:GiB。

LoadBalancerWeight Integer 50

ECI实例作为负载均衡后端服务器时的权重,取值范围:1~100。

默认值:50。

Tag.N.Key String version

实例的标签键。N的取值范围:1~20。

如果传入该值,则不允许为空字符串。最多支持128个字符,不能以aliyunacs:开头,不能包含http://或者https://

Tag.N.Value String 3

实例的标签值。N的取值范围:1~20。

如果传入该值,则允许为空字符串。最多支持128个字符,不能以acs:开头,不能包含http://或者https://

ImageRegistryCredential.N.Password String yourpassword

镜像仓库密码。

ImageRegistryCredential.N.Server String registry-vpc.cn-shanghai.aliyuncs.com

镜像仓库注册地址。

ImageRegistryCredential.N.UserName String yourusername

镜像仓库用户名。

Container.N.ReadinessProbe.TimeoutSeconds Integer 5

检查超时的时间,默认值为1秒,最小值为1秒。

Container.N.ReadinessProbe.SuccessThreshold Integer 1

从上次检查失败后重新认定检查成功的检查次数阈值(必须是连续成功),默认值为1。当前值必须为1。

Container.N.SecurityContext.Capability.Add.N String NET_ADMIN

为容器内的进程授予某些特定的权限。目前仅支持配置为NET_ADMIN和NET_RAW。

说明 NET_RAW默认不支持,需提交工单申请。
Container.N.ReadinessProbe.TcpSocket.Port Integer 8000

使用TCP Socket方式进行健康检查时,TCP Socket检测的端口。

Container.N.ReadinessProbe.HttpGet.Scheme String HTTP

使用HTTP请求方式进行健康检查时,HTTP Get请求对应的协议类型,取值范围:

  • HTTP。
  • HTTPS。
Container.N.LivenessProbe.PeriodSeconds Integer 5

检查执行的周期,默认值为10秒,最小值为1秒。

Container.N.Port.N.Protocol String TCP

协议类型。取值范围:

  • TCP。
  • UDP。
Container.N.Port.N.Port Integer 80

端口号。取值范围:1~65535。

Container.N.EnvironmentVar.N.Key String PATH

环境变量名。长度为1~128个字符。格式要求:[0-9a-zA-Z],以及下划线(_),不能以数字开头。

Container.N.EnvironmentVar.N.Value String /usr/local/bin

环境变量值。长度为0~256位。

Container.N.LivenessProbe.TcpSocket.Port Integer 8000

使用TCP Socket方式进行健康检查时,TCP Socket检测的端口。

Container.N.Tty Boolean false

是否开启交互。取值范围:

  • true:开启。
  • false:未开启。

默认值:false。

当Command为/bin/bash命令时,需要设置为true。

Container.N.WorkingDir String /usr/local/

容器工作目录。

Container.N.LivenessProbe.HttpGet.Scheme String HTTP

使用HTTP请求方式进行健康检查时,HTTP Get请求对应的协议类型,取值范围:

  • HTTP。
  • HTTPS。
Container.N.ReadinessProbe.HttpGet.Port Integer 8080

使用HTTP请求方式进行健康检查时,HTTP Get请求检测的端口号。

Container.N.Arg.N String 100

容器启动命令对应的参数。最多10个。

Container.N.Gpu Integer 1

指定容器使用的GPU个数。

Container.N.ReadinessProbe.InitialDelaySeconds Integer 3

检查开始执行的时间,以容器启动完成为起点计算。单位为秒。

Container.N.Stdin Boolean false

此容器是否应在容器运行时为标准输入分配缓冲区。如果未设置,则容器中标准输入的读取值将导致EOF。

默认值:false。

Container.N.Memory Float 0.5

容器内存大小。单位:GiB。

Container.N.Name String nginx

容器镜像名称。

Container.N.Image String registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest

容器镜像。

Container.N.LivenessProbe.InitialDelaySeconds Integer 5

检查开始执行的时间,以容器启动完成为起点计算。单位为秒。

Container.N.VolumeMount.N.MountPropagation String None

数据卷的挂载传播设置。挂载传播允许将Container挂载的卷共享到同一Pod中的其他Container,甚至可以共享到同一节点上的其他Pod。取值范围:

  • None:该卷不感知任何后续在此卷或其子目录上执行的挂载操作。
  • HostToCotainer:该卷将会感知到后续在此卷或其子目录上的挂载操作。
  • Bidirectional:和HostToCotainer类似,能感知挂载操作。另外,该卷将被传播回主机和使用同一卷的所有Pod的所有容器。

默认值:None。

Container.N.VolumeMount.N.MountPath String /pod/data

容器挂载数据卷的目录。

说明 容器挂载目录下的内容会被Volume的内容直接覆盖,请谨慎使用。
Container.N.VolumeMount.N.ReadOnly Boolean false

数据卷是否只读。取值范围:

  • true:是。
  • false:否。

默认值:false。

Container.N.VolumeMount.N.Name String default-volume1

数据卷名称。同Volume中的Name。

Container.N.VolumeMount.N.SubPath String data2/

数据卷子路径。

Container.N.LivenessProbe.FailureThreshold Integer 3

从上次检查成功后认定检查失败的检查次数阈值(必须是连续失败)。

默认值:3。

Container.N.ReadinessProbe.Exec.Command.N String cat /tmp/healthy

使用命令行方式进行健康检查时,在容器内执行的命令。

Container.N.ReadinessProbe.FailureThreshold Integer 3

从上次检查成功后认定检查失败的检查次数阈值(必须是连续失败)。默认值:3。

Container.N.ImagePullPolicy String Always

容器的镜像拉取策略。取值范围:

  • Always:总是拉取。每次都拉取镜像。
  • IfNotPresent:按需拉取。优先使用本地镜像,本地没有镜像时则拉取镜像。
  • Never:从不拉取。使用本地镜像,不拉取镜像。
Container.N.StdinOnce Boolean false

当标准输入为true时,标准输入流将在多个附加会话中是否保持开启状态。

如果StdinOnce设为true,标准输入在容器开启时被打开,在首个客户端附加到标准输入之前都为空,然后会一直保持开启状态,接收数据,直到客户端连接断开,此时标准输入被关闭,在容器重启前一直保持关闭状态。

Container.N.Cpu Float 0.25

容器CPU核数。

Container.N.LivenessProbe.HttpGet.Port Integer 8888

使用HTTP请求方式进行健康检查时,HTTP Get请求检测的端口号。

Container.N.LivenessProbe.HttpGet.Path String /healthyz

使用HTTP请求方式进行健康检查时,HTTP Get请求检测的路径。

Container.N.LivenessProbe.SuccessThreshold Integer 1

从上次检查失败后重新认定检查成功的检查次数阈值(必须是连续成功),默认值为1。当前值必须为1。

Container.N.ReadinessProbe.PeriodSeconds Integer 3

检查执行的周期,默认值为10秒,最小值为1秒。

Container.N.LivenessProbe.TimeoutSeconds Integer 1

检查超时的时间,默认值为1秒,最小值为1秒。

Container.N.Command.N String sleep

容器启动命令。最多20个。每个命令最多包含256个字符。

Container.N.SecurityContext.RunAsUser Long 1000

设置运行容器的用户ID。

Container.N.ReadinessProbe.HttpGet.Path String /healthz

使用HTTP请求方式进行健康检查时,HTTP Get请求检测的路径。

Container.N.LivenessProbe.Exec.Command.N String cat/tmp/healthy

使用命令行方式进行健康检查时,在容器内执行的命令。

Container.N.LifecyclePostStartHandlerHttpGetHost String 10.0.XX.XX

使用HTTP请求方式设置PostStart回调函数时,接收HTTP Get请求的主机地址。

Container.N.LifecyclePostStartHandlerHttpGetPort Integer 5050

使用HTTP请求方式设置PostStart回调函数时,HTTP Get请求检查的端口号。

Container.N.LifecyclePostStartHandlerHttpGetPath String /healthyz

使用HTTP请求方式设置PostStart回调函数时,HTTP Get请求检测的路径。

Container.N.LifecyclePostStartHandlerHttpGetScheme String HTTPS

使用HTTP请求方式设置postStart回调函数时,HTTP Get请求对应的协议类型,取值范围:

  • HTTP。
  • HTTPS。
Container.N.LifecyclePostStartHandlerExec.N String [ "/bin/sh", "-c", "echo Hello from the postStart handler /usr/share/message" ]

使用命令行方式设置PostStart回调函数时,在容器内执行的命令。

Container.N.LifecyclePostStartHandlerTcpSocketHost String 10.0.XX.XX

使用TCP Socket方式设置PostStart回调函数时,TCP Socket检测的主机地址。

Container.N.LifecyclePostStartHandlerTcpSocketPort Integer 80

使用TCPSocket方式设置PostStart回调函数时,TCP Socket检测的端口。

Container.N.LifecyclePreStopHandlerHttpGetHost String 10.0.XX.XX

使用HTTP请求方式设置PreStop回调函数时,接收HTTP Get请求的主机地址。

Container.N.LifecyclePreStopHandlerHttpGetPort Integer 88

使用HTTP请求方式设置PreStop回调函数时,HTTP Get请求检测的端口号。

Container.N.LifecyclePreStopHandlerHttpGetPath String /healthyz

使用HTTP请求方式设置PreStop回调函数时,HTTP Get请求检测的路径。

Container.N.LifecyclePreStopHandlerHttpGetScheme String HTTP

使用HTTP请求方式设置PreStop回调函数时,HTTP Get请求对应的协议类型,取值范围:

  • HTTP。
  • HTTPS。
Container.N.LifecyclePreStopHandlerExec.N String [ "/bin/sh", "-c", "echo Hello from the preStop handler /usr/share/message" ]

使用命令行方式设置PreStop回调函数时,在容器内执行的命令。

Container.N.LifecyclePreStopHandlerTcpSocketHost String 10.0.XX.XX

使用TCP Socket方式设置PreStop回调函数时,TCP Socket检测的主机地址。

Container.N.LifecyclePreStopHandlerTcpSocketPort Integer 90

使用TCPSocket方式设置PreStop回调函数时,TCP Socket检测的端口。

Volume.N.Type String ConfigFileVolume

数据卷类型。取值范围:

  • EmptyDirVolume:EmptyDir类型的数据卷,表示空目录。
  • NFSVolume:NFS类型的数据卷,表示网络文件系统。
  • ConfigFileVolume:ConfigFile类型的数据卷,表示配置文件。
  • FlexVolume:使用FlexVolume插件扩展存储类型,支持挂载云盘。
  • HostPathVolume:HostPath类型的数据卷,表示主机节点的文件或目录。
  • DiskVolume(不推荐):云盘数据卷。建议使用FlexVolume挂载云盘。
Volume.N.DiskVolume.DiskSize Integer 15

DiskVolume的大小。单位:GiB。

Volume.N.NFSVolume.Path String /share

NFS数据卷路径。

Volume.N.FlexVolume.FsType String ext4

挂载的文件系统类型,默认取决于FlexVolume的script。

Volume.N.DiskVolume.FsType String xfs

该系统类型不推荐使用,建议您使用FlexVolume.FsType参数。

Volume.N.HostPathVolume.Type String Directory

Host目录的类型。例如:File、Directory、Socket等。

Volume.N.NFSVolume.ReadOnly Boolean false

NFS数据卷是否只读。取值范围:

  • true:是。
  • false:否。

默认值:false。

Volume.N.HostPathVolume.Path String /xx/xx/path

Host上的绝对路径。

Volume.N.FlexVolume.Options String {"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"}

FlexVolume对象选项列表。为KV形式,采用JSON传递。

例如:通过FlexVolume挂载云盘时,Options的格式为{"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"}

Volume.N.FlexVolume.Driver String flexvolume

用于FlexVolume的驱动程序名称。

Volume.N.ConfigFileVolumeDefaultMode Integer 0644

ConfigFileVolume默认的权限。

Volume.N.NFSVolume.Server String 3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com

NFS服务器地址。

Volume.N.DiskVolume.DiskId String d-xx

DiskVolume的ID。

Volume.N.Name String default-volume1

数据卷名称。

Volume.N.EmptyDirVolume.Medium String memory

EmptyDirVolume的存储媒介,默认为空,使用node文件系统;支持memory,表示使用内存。

Volume.N.ConfigFileVolumeConfigFileToPath.N.Path String PATH

配置文件所在的相对文件路径。

Volume.N.ConfigFileVolumeConfigFileToPath.N.Mode Integer 0644

ConfigFileVolume目录权限。

Volume.N.ConfigFileVolumeConfigFileToPath.N.Content String bGl1bWk=

配置文件内容(32 KB)。

Volume.N.EmptyDirVolume.SizeLimit String 256 Mi

EmptyDir数据卷的大小。取值时请带上单位,建议使用Gi或Mi。

InitContainer.N.InitContainerEnvironmentVar.N.Key String Path

环境变量名。长度为1~128个字符。格式要求:[0-9a-zA-Z],以及下划线(_),不能以数字开头。

InitContainer.N.InitContainerEnvironmentVar.N.Value String /usr/bin/

环境变量值。长度为0~256位。

InitContainer.N.SecurityContext.Capability.Add.N String NET_ADMIN

为容器内的进程授予某些特定的权限。目前仅支持配置为NET_ADMIN和NET_RAW。

说明 NET_RAW默认不支持,需提交工单申请。
InitContainer.N.Image String nginx

容器使用的镜像。

InitContainer.N.InitContainerVolumeMount.N.MountPropagation String None

数据卷的挂载传播设置。挂载传播允许将Container挂载的卷共享到同一Pod中的其他Container,甚至可以共享到同一节点上的其他Pod。可能值:

  • None:该卷不感知任何后续在此卷或其子目录上执行的挂载操作。
  • HostToCotainer:该卷将会感知到后续在此卷或其子目录上的挂载操作。
  • Bidirectional:和HostToCotainer类似,能感知挂载操作。另外,该卷将被传播回主机和使用同一卷的所有Pod的所有容器。
InitContainer.N.InitContainerVolumeMount.N.MountPath String /usr/share/

挂载目录,容器的挂载目录下的内容被Volume的内容直接覆盖。

InitContainer.N.InitContainerVolumeMount.N.ReadOnly Boolean false

挂载路径是否只读。

默认值:false。

InitContainer.N.InitContainerVolumeMount.N.Name String test-empty

挂载数据卷的名称。

InitContainer.N.InitContainerVolumeMount.N.SubPath String /usr/sub/

数据卷下的子目录,方便Pod将同一个Volume下不同目录挂载到容器不同目录。

InitContainer.N.ImagePullPolicy String Always

镜像拉取策略。

InitContainer.N.Cpu Float 0.5

容器的vCPU大小。单位:核。

InitContainer.N.WorkingDir String /usr/local

工作目录。

InitContainer.N.Command.N String sleep

容器启动指令。

InitContainer.N.Arg.N String 10

容器启动参数。

InitContainer.N.SecurityContext.RunAsUser Long 587

设置运行容器的用户ID。

InitContainer.N.Gpu Integer 1

指定容器使用的GPU个数。

InitContainer.N.Memory Float 1.0

内存大小。单位:GiB。

InitContainer.N.Name String test-init

容器名称。

DnsConfigNameServer.N String 172.10.*.**

DNS服务器的IP地址列表。

DnsConfigSearch.N String svc.local.kubenetes

DNS搜索域列表。

DnsConfigOption.N.Value String value

对象变量值。

DnsConfigOption.N.Name String name

对象变量名。

HostAliase.N.Ip String 1.1.1.1

添加IP。

HostAliase.N.Hostname.N String hehe.com

添加主机名。

SecurityContextSysctl.N.Value String 65536

实例运行的安全上下文的变量值。

SecurityContextSysctl.N.Name String kernel.msgmax

实例运行的安全上下文系统名称。

NtpServer.N String ntp.cloud.aliyuncs.com

NTP服务器。

AcrRegistryInfo.N.Domain.N String *****-****-registry.cn-beijing.cr.aliyuncs.com

ACR企业版实例的域名。默认为相应实例的所有域名。支持指定个别域名,多个以半角逗号(,)分隔。

AcrRegistryInfo.N.InstanceName String acr-test

ACR企业版实例的名称。

AcrRegistryInfo.N.InstanceId String cri-nwj395hgf6f3****

ACR企业版实例ID。

AcrRegistryInfo.N.RegionId String cn-beijing

ACR企业版实例所属地域。

CostOptimization Boolean false

是否开启成本优化开关。取值范围:

  • true:开启。
  • false:未开启。

默认值:false。

InstanceFamilyLevel String EnterpriseLevel

实例规格族级别,用于筛选符合要求的实例规格范围,当CostOptimization开启时生效。取值范围:

  • EntryLevel:入门级,即共享型实例规格。成本更低,但是无法保证实例计算性能的稳定。适用于平时CPU使用率低的业务场景。更多信息,请参见共享型
  • EnterpriseLevel:企业级。性能稳定且资源独享,适用于对稳定性要求高的业务场景。更多信息,请参见实例规格族
  • CreditEntryLevel:积分入门级,即突发性能实例。通过CPU积分来保证计算性能,适用于平时CPU使用率低、偶有突发CPU使用率的业务场景。更多信息,请参见突发性能实例概述
InstanceType.N String ecs.g6.large

指定的ECS实例规格。支持指定多个规格(最多支持5个),更多信息,请参见指定ECS规格创建实例

DataCacheBucket String default

数据缓存Bucket。

DataCachePL String PL1

数据缓存使用的云盘的性能等级。建议优先使用ESSD云盘,该云盘的性能等级取值范围:

  • PL0:单盘最高随机读写IOPS 1万。
  • PL1:单盘最高随机读写IOPS 5万。
  • PL2:单盘最高随机读写IOPS 10万。
  • PL3:单盘最高随机读写IOPS 100万。

默认值:PL1。

说明 关于ESSD云盘的更多信息,请参见ESSD云盘
DataCacheProvisionedIops Integer 40000

数据缓存使用ESSD AutoPL云盘时,ESSD AutoPL云盘预配置的读写IOPS。取值范围:0~min{50000, 1000*容量-基准性能},其中,基准性能=min{1800+50*容量, 50000}。

说明 关于ESSD AutoPL云盘的更多信息,请参见ESSD AutoPL云盘
DataCacheBurstingEnabled Boolean false

数据缓存使用ESSD AutoPL云盘时,是否开启Burst(性能突发)。取值范围:

  • true:开启。
  • false:未开启。

默认值:false。

说明 关于ESSD AutoPL云盘的更多信息,请参见ESSD AutoPL云盘

返回数据

名称

类型

示例值

描述

ScalingConfigurationId String eci-uf6fonnghi50u374****

实例ID,即容器组ID。

RequestId String 89945DD3-9072-47D0-A318-353284CF****

请求ID,唯一标识。

示例

请求示例

http(s)://ess.aliyuncs.com/?Action=CreateEciScalingConfiguration
&ScalingGroupId=asg-bp14wlu85wrpchm0****
&ScalingConfigurationName=scalingconfig****
&SecurityGroupId=sg-uf66jeqopgqa9hdn****
&ContainerGroupName=nginx-test
&RestartPolicy=Always
&Cpu=1.0
&Memory=2.0
&ResourceGroupId=rg-uf66jeqopgqa9hdn****
&DnsPolicy=Default
&ImageSnapshotId=imc-2zebxkiifuyzzlhl****
&RamRoleName=RamTestRole
&TerminationGracePeriodSeconds=60
&AutoMatchImageCache=false
&Ipv6AddressCount=1
&ActiveDeadlineSeconds=1000
&SpotStrategy=SpotWithPriceLimit
&SpotPriceLimit=0.025
&AutoCreateEip=true
&EipBandwidth=5
&HostName=test
&IngressBandwidth=1024000
&EgressBandwidth=1024000
&CpuOptionsCore=2
&CpuOptionsThreadsPerCore=2
&EphemeralStorage=20
&LoadBalancerWeight=50
&Tag=[{"Key":"version","Value":"3"}]
&ImageRegistryCredential=[{"Password":"yourpassword","Server":"registry-vpc.cn-shanghai.aliyuncs.com","UserName":"yourusername"}]
&Container=[{"ReadinessProbe.TimeoutSeconds":5,"ReadinessProbe.SuccessThreshold":1,"SecurityContext.Capability.Add":["NET_ADMIN"],"ReadinessProbe.TcpSocket.Port":8000,"ReadinessProbe.HttpGet.Scheme":"HTTP","LivenessProbe.PeriodSeconds":5,"Port":[{"Protocol":"TCP","Port":80}],"EnvironmentVar":[{"Key":"PATH","Value":"/usr/local/bin"}],"LivenessProbe.TcpSocket.Port":8000,"Tty":false,"WorkingDir":"/usr/local/","LivenessProbe.HttpGet.Scheme":"HTTP","ReadinessProbe.HttpGet.Port":8080,"Arg":["100"],"Gpu":1,"ReadinessProbe.InitialDelaySeconds":3,"Stdin":false,"Memory":0.5,"Name":"nginx","Image":"registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest","LivenessProbe.InitialDelaySeconds":5,"VolumeMount":[{"MountPropagation":"None","MountPath":"/pod/data","ReadOnly":false,"Name":"default-volume1","SubPath":"data2/"}],"LivenessProbe.FailureThreshold":3,"ReadinessProbe.Exec.Command":["cat /tmp/healthy"],"ReadinessProbe.FailureThreshold":3,"ImagePullPolicy":"Always","StdinOnce":false,"Cpu":0.25,"LivenessProbe.HttpGet.Port":8888,"LivenessProbe.HttpGet.Path":"/healthyz","LivenessProbe.SuccessThreshold":1,"ReadinessProbe.PeriodSeconds":3,"LivenessProbe.TimeoutSeconds":1,"Command":["sleep"],"SecurityContext.RunAsUser":1000,"ReadinessProbe.HttpGet.Path":"/healthz","LivenessProbe.Exec.Command":["cat/tmp/healthy"],"LifecyclePostStartHandlerHttpGetHost":"10.0.XX.XX","LifecyclePostStartHandlerHttpGetPort":5050,"LifecyclePostStartHandlerHttpGetPath":"/healthyz","LifecyclePostStartHandlerHttpGetScheme":"HTTPS","LifecyclePostStartHandlerExec":["[ \t\"/bin/sh\", \t\"-c\", \t\"echo Hello from the postStart handler  /usr/share/message\" ]"],"LifecyclePostStartHandlerTcpSocketHost":"10.0.XX.XX","LifecyclePostStartHandlerTcpSocketPort":80,"LifecyclePreStopHandlerHttpGetHost":"10.0.XX.XX","LifecyclePreStopHandlerHttpGetPort":88,"LifecyclePreStopHandlerHttpGetPath":"/healthyz","LifecyclePreStopHandlerHttpGetScheme":"HTTP","LifecyclePreStopHandlerExec":["[       \"/bin/sh\",       \"-c\",       \"echo Hello from the preStop handler  /usr/share/message\" ]"],"LifecyclePreStopHandlerTcpSocketHost":"10.0.XX.XX","LifecyclePreStopHandlerTcpSocketPort":90}]
&Volume=[{"Type":"ConfigFileVolume","DiskVolume.DiskSize":15,"NFSVolume.Path":"/share","FlexVolume.FsType":"ext4","DiskVolume.FsType":"xfs","HostPathVolume.Type":"Directory","NFSVolume.ReadOnly":false,"HostPathVolume.Path":"/xx/xx/path","FlexVolume.Options":"{\"volumeId\":\"d-2zehdahrwoa7srg****\",\"performanceLevel\": \"PL2\"}","FlexVolume.Driver":"flexvolume","ConfigFileVolumeDefaultMode":644,"NFSVolume.Server":"3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com","DiskVolume.DiskId":"d-xx","Name":"default-volume1","EmptyDirVolume.Medium":"memory","ConfigFileVolumeConfigFileToPath":[{"Path":"PATH","Mode":644,"Content":"bGl1bWk="}],"EmptyDirVolume.SizeLimit":"256 Mi"}]
&InitContainer=[{"InitContainerEnvironmentVar":[{"Key":"Path","Value":"/usr/bin/"}],"SecurityContext.Capability.Add":["NET_ADMIN"],"Image":"nginx","InitContainerVolumeMount":[{"MountPropagation":"None","MountPath":"/usr/share/","ReadOnly":false,"Name":"test-empty","SubPath":"/usr/sub/"}],"ImagePullPolicy":"Always","Cpu":0.5,"WorkingDir":"/usr/local","Command":["sleep"],"Arg":["10"],"SecurityContext.RunAsUser":587,"Gpu":1,"Memory":1.0,"Name":"test-init"}]
&DnsConfigNameServer=["172.10.*.**"]
&DnsConfigSearch=["svc.local.kubenetes"]
&DnsConfigOption=[{"Value":"value","Name":"name"}]
&HostAliase=[{"Ip":"1.1.1.1","Hostname":["hehe.com"]}]
&SecurityContextSysctl=[{"Value":"65536","Name":"kernel.msgmax"}]
&NtpServer=["ntp.cloud.aliyuncs.com"]
&AcrRegistryInfo=[{"Domain":["*****-****-registry.cn-beijing.cr.aliyuncs.com"],"InstanceName":"acr-test","InstanceId":"cri-nwj395hgf6f3****","RegionId":"cn-beijing"}]
&CostOptimization=false
&InstanceFamilyLevel=EnterpriseLevel
&InstanceType=["ecs.g6.large"]
&DataCacheBucket=default
&DataCachePL=PL1
&DataCacheProvisionedIops=40000
&DataCacheBurstingEnabled=false
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateEciScalingConfigurationResponse>
    <ScalingConfigurationId>eci-uf6fonnghi50u374****</ScalingConfigurationId>
    <RequestId>89945DD3-9072-47D0-A318-353284CF****</RequestId>
</CreateEciScalingConfigurationResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ScalingConfigurationId" : "eci-uf6fonnghi50u374****",
  "RequestId" : "89945DD3-9072-47D0-A318-353284CF****"
}

错误码

访问错误中心查看更多错误码。

HttpCode

错误码

错误信息

描述

400

InstanceType.Mismatch

The specified scaling configuration and existing active scaling configuration have different instance type.

指定的伸缩配置的实例规格与当前的伸缩配置的实例规格不匹配。

404

InvalidDataDiskSnapshotId.NotFound

Snapshot "XXX" does not exist.

不存在指定的快照。

400

InvalidDataDiskSnapshotId.SizeNotSupported

The capacity of snapshot "XXX" exceeds the size limit of the specified disk category.

指定快照的大小超过了磁盘大小的限制。

403

InvalidDevice.InUse

Device "XXX" has been occupied.

数据盘挂载点重复。

400

InvalidImageId.InstanceTypeMismatch

The specified image does not support the specified instance type.

不允许在指定的实例规格下使用该镜像。

404

InvalidImageId.NotFound

The specified image does not exist.

该账号下不存在指定的镜像。

400

InvalidKeyPairName.NotFound

The specified KeyPairName does not exist in our records.

指定的KeyPairName不存在。

400

InvalidNetworkType.ForRAMRole

RAMRole can't be used For classic instance.

经典网络实例不支持RamRoleName参数。

400

InvalidParameter

The specified value of parameter KeyPairName is not valid.

Windows操作系统不支持KeyPairName参数。

400

InvalidParameter.Conflict

The value of parameter SystemDisk.Category and parameter DataDisk.N.Category are conflict.

指定的系统盘类型和数据盘类型冲突。

400

InvalidRamRole.NotFound

The specified RamRoleName does not exist.

不存在指定的RamRoleName。

400

InvalidScalingConfigurationName.Duplicate

The specified value of parameter ScalingConfigurationName is duplicated.

已存在相同的伸缩配置名。

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

该账号下不存在指定的伸缩组。

400

InvalidSecurityGroupId.IncorrectNetworkType

The network type of specified security Group does not support this action.

指定的安全组与伸缩组指定网络类型不一致。

404

InvalidSecurityGroupId.NotFound

The specified security group does not exist.

该账号下不存在指定的安全组。

400

InvalidSecurityGroupId.VPCMismatch

The specified security group and the specified virtual switch are not in the same VPC.

指定的安全组和虚拟交换机不属于同一个虚拟专有网络。

403

InvalidSnapshot.TooOld

This operation is denied because the specified snapshot is created before 2013-07-15.

该快照创建于2013年7月15日或之前,调用被拒绝。

403

InvalidSystemDiskCategory.ValueUnauthorized

The system disk category is not authorized.

没有创建临时磁盘系统盘的权限。

400

InvalidUserData.Base64FormatInvalid

The specified parameter UserData must be base64 encoded.

UserData不符合Base64编码规范。

400

InvalidUserData.SizeExceeded

The specified parameter UserData exceeds the size.

指定的UserData过长。

403

QuotaExceeded.EphemeralDiskSize

Ephemeral disk size quota exceeded.

临时磁盘数据盘总容量超过2 TiB(2048 GiB)。

400

QuotaExceeded.ScalingConfiguration

Scaling configuration quota exceeded in the specified scaling group.

您目前拥有的伸缩配置个数已经达到上限。

400

QuotaExceeded.SecurityGroupInstance

Instance quota exceeded in the specified security group.

指定的安全组中添加的ECI实例个数已经达到上限。

  • 本页导读 (1)
文档反馈