调用CreateContainerGroup创建一个ECI实例(即容器组)。
接口使用说明
调用CreateContainerGroup创建ECI实例时,系统将自动为您创建一个服务关联角色AliyunServiceRoleForECI,用于访问ECS、VPC等相关云服务。更多信息,请参见弹性容器实例服务关联角色。
功能参数说明
创建ECI实例时,您可以根据需要配置实例、镜像、存储等相关功能。各功能涉及的参数及其说明,请参见以下功能文档:
实例ECI支持以下两种方式创建实例:
以下功能两种创建方式均支持:
镜像 网络 存储 容器配置 日志与运维调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateContainerGroup | 系统规定参数。取值:CreateContainerGroup。 |
RegionId | String | 是 | cn-hangzhou | 地域ID。 |
ZoneId | String | 否 | cn-hangzhou-b | 实例所属的可用区。如果取值为空,则表示由系统选择。 默认值为空。 |
SecurityGroupId | String | 否 | sg-uf66jeqopgqa9hdn**** | 实例所属的安全组ID。同一个安全组内的实例之间可以互相访问。 如果没有指定安全组,系统将自动使用您选择的地域下的默认安全组,您需要确保该安全组的入方向规则中包含容器需要暴露的协议和端口。如果您在该地域下没有默认安全组,系统将自动创建一个默认安全组,并将您声明的容器协议和端口添加到该安全组的入方向规则中。 |
VSwitchId | String | 否 | vsw-bp1xpiowfm5vo8o3c****,vsw-bp1rkyjgr1xwoho6k**** | 实例所属的交换机ID。支持指定多个交换机ID(单次最多10个),各交换机ID之间可以用半角逗号(,)进行分割,例如 如果没有指定交换机,系统将自动使用您选择的地域下的默认VPC下的默认交换机,如果您在该地域下没有默认VPC和默认交换机,系统将自动创建一个默认VPC和一个默认交换机。
说明 交换机网段内的IP个数决定了该交换机下最大可以创建的ECI实例数量,请务必提前规划好网段。
|
ContainerGroupName | String | 是 | nginx-test | ECI实例名称,即容器组名称。格式要求如下:
|
RestartPolicy | String | 否 | Always | 实例重启策略。取值范围:
默认值:Always。 |
EipInstanceId | String | 否 | eip-uf66jeqopgqa9hdn**** | 弹性公网IP ID。 |
Cpu | Float | 否 | 1.0 | 实例级别vCPU大小。单位:核。 |
Memory | Float | 否 | 2.0 | 实例级别内存大小。单位:GiB。 |
ResourceGroupId | String | 否 | rg-uf66jeqopgqa9hdn**** | 资源组ID。 |
DnsPolicy | String | 否 | Default | DNS策略。取值范围:
|
ClientToken | String | 否 | 123e4567-xxxx-12d3-xxxx-426655440000 | 保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。只支持ASCII字符,且不能超过64个字符。更多详情,请参阅如何保证幂等性。 |
InstanceType | String | 否 | ecs.c5.xlarge | 指定的ECS实例规格,支持多规格。更多信息,请参见指定ECS规格创建实例。 |
ImageSnapshotId | String | 否 | imc-2zebxkiifuyzzlhl**** | 镜像缓存ID。更多信息,请参见使用镜像缓存加速创建实例。 |
RamRoleName | String | 否 | RamTestRole | 实例RAM角色名称。ECI与ECS共用实例RAM角色,更多信息,请参见通过API使用实例RAM角色。 |
TerminationGracePeriodSeconds | Long | 否 | 60 | 程序的缓冲时间,用于处理关闭之前的操作。 |
AutoMatchImageCache | Boolean | 否 | false | 是否自动匹配镜像缓存。默认为false。 |
Ipv6AddressCount | Integer | 否 | 1 | IPv6地址数。固定为1,即一个ECI实例支持绑定一个IPv6地址。 |
ActiveDeadlineSeconds | Long | 否 | 1000 | ECI实例的有效期限,超出该时间后,实例会被强制退出。单位为秒。 |
SpotStrategy | String | 否 | SpotPriceLimit | 实例的抢占策略。取值范围:
默认值:NoSpot。 |
SpotPriceLimit | Float | 否 | 0.025 | 设置抢占式实例的每小时最高价格,最多精确到小数点后3位。 当SpotStrategy取值为SpotWithPriceLimit时,必须设置SpotPriceLimit。 |
ScheduleStrategy | String | 否 | VSwitchOrdered | 配置了多可用区(通过VSwitchId参数指定多个交换机)时,ECI实例的调度策略。取值范围:
更多信息,请参见多可用区创建实例。 |
CorePattern | String | 否 | /xx/xx/core | 自定义设置coredump生成的core文件的保存目录。更多信息,请参见设置core文件保存到数据卷。
说明 配置的路径不能以
| 开头,即不能通过Core dump来配置可执行程序。
|
ShareProcessNamespace | Boolean | 否 | false | 是否使用共享命名空间。默认为false。 |
AutoCreateEip | Boolean | 否 | true | 是否自动创建一个EIP,并绑定到ECI实例上。 |
EipBandwidth | Integer | 否 | 5 | EIP的带宽,默认为5 Mbps。 当AutoCreateEip取值为true时,可以设置该参数。 |
EipISP | String | 否 | BPG | 设置EIP的线路类型。取值范围:
|
EipCommonBandwidthPackage | String | 否 | cbwp-2zeukbj916scmj51m**** | 绑定已有的共享带宽包。 |
HostName | String | 否 | test | 主机名称。 |
IngressBandwidth | Long | 否 | 1024000 | 入方向带宽限制。单位:Byte。 |
EgressBandwidth | Long | 否 | 1024000 | 出方向带宽限制。单位:Byte。 |
CpuOptionsCore | Integer | 否 | 2 | CPU物理核心数。仅部分规格支持自定义设置。更多信息,请参见自定义CPU选项。 |
CpuOptionsThreadsPerCore | Integer | 否 | 2 | 每核线程数。仅部分规格支持自定义设置。配置为1时表示关闭超线程。更多信息,请参见自定义CPU选项。 |
CpuOptionsNuma | String | 否 | 1 | 该参数暂不支持设置。 |
EphemeralStorage | Integer | 否 | 20 | 增加的临时存储空间大小。单位:GiB。 更多信息,请参见自定义临时存储空间大小。 |
Tag.N.Key | String | 否 | version | 标签键。如果传入该值,则不允许为空字符串,且不允许重复。最多支持64个字符,不能以 |
Tag.N.Value | String | 否 | 3 | 标签值。如果传入该值,可以为空字符串。最多支持128个字符,不能以 |
ImageRegistryCredential.N.Password | String | 否 | yourpaasword | 镜像仓库密码。 |
ImageRegistryCredential.N.Server | String | 否 | registry-vpc.cn-shanghai.aliyuncs.com | 镜像仓库注册地址。 |
ImageRegistryCredential.N.UserName | String | 否 | yourusername | 镜像仓库用户名。 |
Container.N.ReadinessProbe.TimeoutSeconds | Integer | 否 | 1 | 检查超时的时间,默认为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请求对应的协议类型,取值范围:
|
Container.N.LivenessProbe.PeriodSeconds | Integer | 否 | 5 | 检查执行的周期,默认为10秒,最小为1秒。 |
Container.N.SecurityContext.ReadOnlyRootFilesystem | Boolean | 否 | true | 容器运行的根文件系统是否为只读,目前仅支持配置为true。 |
Container.N.EnvironmentVar.N.Key | String | 否 | PATH | 环境变量名。长度为1~128位。格式要求: |
Container.N.EnvironmentVar.N.Value | String | 否 | /usr/local/bin | 环境变量值。长度为0~256位。 |
Container.N.EnvironmentVar.N.FieldRef.FieldPath | String | 否 | status.podIP | 环境变量值引用。目前只支持配置为status.podIP。 |
Container.N.LivenessProbe.TcpSocket.Port | Integer | 否 | 8080 | 使用TCP Socket方式进行健康检查时,TCP Socket检测的端口。 |
Container.N.Tty | Boolean | 否 | false | 是否开启交互。默认为false。 当Command为/bin/bash命令时,需要设置为true。 |
Container.N.WorkingDir | String | 否 | /usr/local/ | 容器工作目录。 |
Container.N.Arg.N | String | 否 | 100 | 容器启动命令对应的参数。最多10个。 |
Container.N.Stdin | Boolean | 否 | false | 此容器是否应在容器运行时为标准输入分配缓冲区。如果未设置,则容器中标准输入的读取值将导致EOF。默认为false。 |
Container.N.LivenessProbe.InitialDelaySeconds | Integer | 否 | 5 | 检查开始执行的时间,以容器启动完成为起点计算。 |
Container.N.VolumeMount.N.MountPropagation | String | 否 | None | 数据卷的挂载传播设置。挂载传播允许将Container挂载的卷共享到同一Pod中的其他Container,甚至可以共享到同一节点上的其他Pod。取值范围:
默认值:None |
Container.N.VolumeMount.N.MountPath | String | 否 | /pod/data | 容器挂载数据卷的目录。
说明 容器挂载目录下的内容会被Volume的内容直接覆盖,请谨慎使用。
|
Container.N.VolumeMount.N.ReadOnly | Boolean | 否 | false | 数据卷是否只读。默认为false。 |
Container.N.VolumeMount.N.SubPath | String | 否 | data2/ | 数据卷子路径。 |
Container.N.VolumeMount.N.Name | String | 否 | default-volume1 | 数据卷名称。同Volume中的Name。 |
Container.N.ImagePullPolicy | String | 否 | Always | 镜像拉取策略。取值范围:
|
Container.N.StdinOnce | Boolean | 否 | false | 当标准输入为true时,标准输入流将在多个附加会话中是否保持开启状态。 如果StdinOnce设为true,标准输入在容器开启时被打开,在首个客户端附加到标准输入之前都为空,然后会一直保持开启状态,接收数据,直到客户端连接断开,此时标准输入被关闭,在容器重启前一直保持关闭状态。 |
Container.N.LifecyclePreStopHandlerTcpSocketPort | Integer | 否 | 90 | 使用TCPSocket方式设置preStop回调函数时,TCP Socket检测的端口。 |
Container.N.LifecyclePostStartHandlerHttpGetScheme | String | 否 | HTTPS | 使用HTTP请求方式设置postStart回调函数时,HTTP Get请求对应的协议类型,取值范围:
|
Container.N.ReadinessProbe.PeriodSeconds | Integer | 否 | 3 | 检查执行的周期,默认为10秒,最小为1秒。 |
Container.N.LivenessProbe.SuccessThreshold | Integer | 否 | 1 | 从上次检查失败后重新认定检查成功的检查次数阈值(必须是连续成功),默认为1。当前必须为1。 |
Container.N.Command.N | String | 否 | sleep | 容器启动命令。最多20个。每个命令最多包含256个字符。 |
Container.N.LifecyclePostStartHandlerHttpGetHost | String | 否 | 10.0.XX.XX | 使用HTTP请求方式设置postStart回调函数时,接收HTTP Get请求的主机地址。 |
Container.N.TerminationMessagePolicy | String | 否 | FallbackToLogsOnError | 消息通知策略,默认为无,目前仅支持mns队列消息通知。 |
Container.N.ReadinessProbe.HttpGet.Path | String | 否 | /healthz | 使用HTTP请求方式进行健康检查时,HTTP Get请求检测的路径。 |
Container.N.LivenessProbe.Exec.Command.N | String | 否 | cat /tmp/healthy | 使用命令行方式进行健康检查时,在容器内执行的命令。 |
Container.N.LifecyclePostStartHandlerTcpSocketPort | Integer | 否 | 80 | 使用TCPSocket方式设置postStart回调函数时,TCP Socket检测的端口。 |
Container.N.LifecyclePostStartHandlerHttpGetPath | String | 否 | /healthyz | 使用HTTP请求方式设置postStart回调函数时,HTTP Get请求检测的路径。 |
Container.N.LifecyclePostStartHandlerExec.N | String | 否 | ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] | 使用命令行方式设置postStart回调函数时,在容器内执行的命令。 |
Container.N.LifecyclePreStopHandlerHttpGetPath | String | 否 | /healthyz | 使用HTTP请求方式设置preStop回调函数时,HTTP Get请求检测的路径。 |
Container.N.Port.N.Protocol | String | 否 | TCP | 协议类型。取值范围:
|
Container.N.Port.N.Port | Integer | 否 | 80 | 端口号。取值范围:1~65535。 |
Container.N.TerminationMessagePath | String | 否 | /tmp/termination-log | 容器的报错地址。 |
Container.N.LifecyclePreStopHandlerHttpGetScheme | String | 否 | HTTP | 使用HTTP请求方式设置preStop回调函数时,HTTP Get请求对应的协议类型,取值范围:
|
Container.N.LivenessProbe.HttpGet.Scheme | String | 否 | HTTP | 使用HTTP请求方式进行健康检查时,HTTP Get请求对应的协议类型,取值范围:
|
Container.N.ReadinessProbe.HttpGet.Port | Integer | 否 | 8080 | 使用HTTP请求方式进行健康检查时,HTTP Get请求检测的端口号。 |
Container.N.LifecyclePostStartHandlerTcpSocketHost | String | 否 | 10.0.XX.XX | 使用TCP Socket方式设置postStart回调函数时,TCP Socket检测的端口。 |
Container.N.Gpu | Integer | 否 | 1 | 指定容器使用的GPU个数。 |
Container.N.ReadinessProbe.InitialDelaySeconds | Integer | 否 | 3 | 检查开始执行的时间,以容器启动完成为起点计算。 |
Container.N.LifecyclePreStopHandlerExec.N | String | 否 | ["/bin/sh", "-c","echo Hello from the preStop handler > /usr/share/message"] | 使用命令行方式设置preStop回调函数时,在容器内执行的命令。 |
Container.N.Memory | Float | 否 | 0.5 | 容器的内存大小。单位:GiB。 |
Container.N.Name | String | 是 | nginx | 容器名称。 |
Container.N.LifecyclePreStopHandlerHttpGetHost | String | 否 | 10.0.XX.XX | 使用HTTP请求方式设置preStop回调函数时,接收HTTP Get请求的主机地址。 |
Container.N.LifecyclePreStopHandlerTcpSocketHost | String | 否 | 10.0.XX.XX | 使用TCP Socket方式设置preStop回调函数时,TCP Socket检测的主机地址。 |
Container.N.Image | String | 是 | registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest | 容器镜像。 |
Container.N.LifecyclePreStopHandlerHttpGetPort | Integer | 否 | 88 | 使用HTTP请求方式设置preStop回调函数时,HTTP Get请求检测的端口号。 |
Container.N.LivenessProbe.FailureThreshold | Integer | 否 | 3 | 从上次检查成功后认定检查失败的检查次数阈值(必须是连续失败),默认为3。 |
Container.N.ReadinessProbe.Exec.Command.N | String | 否 | cat /tmp/healthy | 容器内检测的命令。 |
Container.N.LifecyclePreStopHandlerHttpGetHttpHeader.N.Value | String | 否 | test-preStop | 使用HTTP请求方式设置preStop回调函数时,HTTP Get请求头中自定义设置的字段值。 |
Container.N.LifecyclePreStopHandlerHttpGetHttpHeader.N.Name | String | 否 | Xiao-Custom-Header | 使用HTTP请求方式设置preStop回调函数时,HTTP Get请求头中自定义设置的字段值。 |
Container.N.ReadinessProbe.FailureThreshold | Integer | 否 | 3 | 从上次检查成功后认定检查失败的检查次数阈值(必须是连续失败),默认为3。 |
Container.N.Cpu | Float | 否 | 0.25 | 容器的vCPU大小。单位:核。 |
Container.N.LivenessProbe.HttpGet.Port | Integer | 否 | 8888 | 使用HTTP请求方式进行健康检查时,HTTP Get请求检测的端口号。 |
Container.N.LivenessProbe.HttpGet.Path | String | 否 | /healthz | 使用HTTP请求方式进行健康检查时,HTTP Get请求检测的路径。 |
Container.N.LivenessProbe.TimeoutSeconds | Integer | 否 | 1 | 检查超时的时间,默认为1秒,最小为1秒。 |
Container.N.SecurityContext.RunAsUser | Long | 否 | 1000 | 设置运行容器的用户ID。 |
Container.N.LifecyclePostStartHandlerHttpGetPort | Integer | 否 | 5050 | 使用HTTP请求方式设置postStart回调函数时,HTTP Get请求检查的端口号。 |
Container.N.LifecyclePostStartHandlerHttpGetHttpHeader.N.Value | String | 否 | test-postStart | 使用HTTP请求方式设置postStart回调函数时,HTTP Get请求头中自定义设置的字段值。 |
Container.N.LifecyclePostStartHandlerHttpGetHttpHeader.N.Name | String | 否 | Xiao-Custom-Header | 使用HTTP请求方式设置postStart回调函数时,HTTP Get请求头中自定义设置的字段名。 |
Volume.N.Type | String | 否 | ConfigFileVolume | 数据卷类型。取值范围:
|
Volume.N.DiskVolume.DiskSize | Integer | 否 | 15 | DiskVolume的大小。单位为GiB。 |
Volume.N.NFSVolume.Path | String | 否 | /share | NFS数据卷路径。 |
Volume.N.DiskVolume.FsType | String | 否 | xfs | DiskVolume的系统类型。 |
Volume.N.FlexVolume.FsType | String | 否 | ext4 | 挂载的文件系统类型,默认取决于FlexVolume的script。 |
Volume.N.HostPathVolume.Type | String | 否 | Socket | HostPath Volume的类型。取值范围:
|
Volume.N.ConfigFileVolume.DefaultMode | Integer | 否 | 0644 | ConfigFileVolume默认的权限。 |
Volume.N.NFSVolume.ReadOnly | Boolean | 否 | false | NFS数据卷是否只读。默认为false。 |
Volume.N.ConfigFileVolume.ConfigFileToPath.N.Path | String | 否 | liu/name | 配置文件所在的相对文件路径。 |
Volume.N.ConfigFileVolume.ConfigFileToPath.N.Mode | Integer | 否 | 0644 | 配置文件的权限,如果没有设置,则采用ConfigFileVolume.DefaultMode的值。采用四位八进制数表示,例如0644表示权限为rw-r–r--,即用户权限为rw-,用户所在组权限为r--,其他用户权限为r--。 权限说明如下:
|
Volume.N.ConfigFileVolume.ConfigFileToPath.N.Content | String | 否 | bGl1bWk= | 配置文件内容 (32 KB)。 |
Volume.N.HostPathVolume.Path | String | 否 | /pod/data | HostPath Volume在主机上的目录路径。 |
Volume.N.FlexVolume.Options | String | 否 | {"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"}` | FlexVolume对象选项列表。为KV形式,采用JSON传递。 例如通过FlexVolume挂载云盘时,Options表示云盘的配置参数,可配置的参数如下: |
Volume.N.FlexVolume.Driver | String | 否 | alicloud/disk | 使用FlexVolume插件挂载数据卷时的驱动类型。目前支持alicloud/disk,表示挂载阿里云云盘。 |
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.EmptyDirVolume.SizeLimit | String | 否 | 2 | EmptyDirVolume的大小。单位为GiB。 |
InitContainer.N.SecurityContext.Capability.Add.N | String | 否 | NET_ADMIN | 为容器内的进程授予某些特定的权限。目前仅支持配置为NET_ADMIN和NET_RAW。
说明 NET_RAW默认不支持,需提交工单申请。
|
InitContainer.N.Image | String | 否 | nginx | 容器使用的镜像。 |
InitContainer.N.VolumeMount.N.MountPropagation | String | 否 | None | 数据卷的挂载传播设置。挂载传播允许将Container挂载的卷共享到同一Pod中的其他Container,甚至可以共享到同一节点上的其他Pod。取值范围:
默认值:None |
InitContainer.N.VolumeMount.N.MountPath | String | 否 | /usr/share/ | 挂载目录,容器的挂载目录下的内容被volume的内容直接覆盖,所以要慎用。 |
InitContainer.N.VolumeMount.N.ReadOnly | Boolean | 否 | false | 挂载路径是否只读。默认为false。 |
InitContainer.N.VolumeMount.N.SubPath | String | 否 | /usr/sub/ | 数据卷下的子目录,方便Pod将同一个Volume下不同目录挂载到容器不同目录。 |
InitContainer.N.VolumeMount.N.Name | String | 否 | test-empty | 挂载数据卷的名称。 |
InitContainer.N.Port.N.Protocol | String | 否 | TCP | 协议类型。取值范围:
|
InitContainer.N.Port.N.Port | Integer | 否 | 8888 | 端口号。取值范围:1~65535。 |
InitContainer.N.SecurityContext.ReadOnlyRootFilesystem | Boolean | 否 | true | 容器运行的根文件系统是否为只读。目前仅支持配置为true。 |
InitContainer.N.TerminationMessagePath | String | 否 | /tmp/termination-log | 容器退出的消息来源。当容器退出时,从指定的终止消息文件中检索终止消息。 |
InitContainer.N.EnvironmentVar.N.Key | String | 否 | Path | 环境变量名。长度为1~128位。格式要求: |
InitContainer.N.EnvironmentVar.N.Value | String | 否 | /usr/bin/ | 环境变量值。长度为0~256位。 |
InitContainer.N.EnvironmentVar.N.FieldRef.FieldPath | String | 否 | status.podIP | 环境变量值引用。目前只支持配置为status.podIP。 |
InitContainer.N.ImagePullPolicy | String | 否 | Always | 镜像拉取策略。取值范围:
|
InitContainer.N.WorkingDir | String | 否 | /usr/local | 工作目录。 |
InitContainer.N.Cpu | Float | 否 | 0.5 | 容器的vCPU大小。单位:核。 |
InitContainer.N.Arg.N | String | 否 | 10 | 容器启动参数。 |
InitContainer.N.Command.N | String | 否 | sleep | 容器启动指令。 |
InitContainer.N.Gpu | Integer | 否 | 1 | 指定容器使用的GPU个数。 |
InitContainer.N.SecurityContext.RunAsUser | Long | 否 | 587 | 设置运行容器的用户ID。 |
InitContainer.N.Memory | Float | 否 | 1.0 | 容器的内存大小。单位:GiB。 |
InitContainer.N.TerminationMessagePolicy | String | 否 | ***** | 挂载信息,默认为空。 |
InitContainer.N.Name | String | 否 | test-init | 容器名称。 |
DnsConfig.NameServer.N | String | 否 | 172.10.*.** | DNS服务器的IP地址列表。 |
DnsConfig.Search.N | String | 否 | svc.local.kubenetes | DNS搜索域列表。 |
DnsConfig.Option.N.Value | String | 否 | value | 对象的Value。 |
DnsConfig.Option.N.Name | String | 否 | name | 对象的Name。 |
HostAliase.N.Ip | String | 否 | 1.1.1.1 | 添加IP。 |
HostAliase.N.Hostname.N | String | 否 | hehe.com | 添加主机名。 |
SecurityContext.Sysctl.N.Value | String | 否 | 65536 | 通过安全上下文修改sysctl参数时,安全sysctl参数的取值。 |
SecurityContext.Sysctl.N.Name | String | 否 | kernel.msgmax | 通过安全上下文修改sysctl参数时,安全sysctl参数的名称。取值范围:
|
HostSecurityContext.Sysctl.N.Value | String | 否 | 65536 | 通过安全上下文修改sysctl参数时,非安全sysctl参数的取值。 |
HostSecurityContext.Sysctl.N.Name | String | 否 | kernel.msgmax | 通过安全上下文修改sysctl参数时,非安全sysctl参数的名称。取值范围:
|
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企业版实例所属地域。 |
SpotDuration | Long | 否 | 1 | 抢占式实例的保护期。单位为小时。取值范围为0~6,默认为1。 |
StrictSpot | Boolean | 否 | true | 是否周期执行:
|
PlainHttpRegistry | String | 否 | "harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80" | 自建镜像仓库地址。使用HTTP协议的自建镜像仓库中的镜像创建ECI实例时,需配置该参数,使得ECI使用HTTP协议拉取镜像,避免因协议不同而导致镜像拉取失败。 |
InsecureRegistry | String | 否 | "harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80" | 自建镜像仓库地址。使用自签发证书的自建镜像仓库中的镜像创建ECI实例时,需配置该参数来跳过证书认证,避免因证书认证失败而导致镜像拉取失败。 |
ImageAccelerateMode | String | 否 | imc | 镜像加速模式。取值范围:
|
Ipv6GatewayBandwidthEnable | Boolean | 否 | true | 是否开通ECI的IPv6公网通信能力。 |
Ipv6GatewayBandwidth | String | 否 | 100 | 当Ipv6GatewayBandwidthEnable配置为true时,配置IPv6地址的公网带宽峰值。取值如下:
默认值为网关对应带宽范围的最大值。 |
ContainerResourceView | Boolean | 否 | false | 当ECI规格比申请规格大时,可以开启该配置,确保容器内看到的资源跟申请的资源保持一致。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 89945DD3-9072-47D0-A318-353284CFC7B3 | 请求ID,唯一标识。 |
ContainerGroupId | String | eci-uf6fonnghi50u374**** | 实例ID,即容器组ID。 |
示例
请求示例
https://eci.aliyuncs.com/?Action=CreateContainerGroup
&Container.1.Image=registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest
&Container.1.Name=nginx
&ContainerGroupName=nginx-test
&RegionId=cn-hangzhou
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateContainerGroupResponse>
<RequestId>89945DD3-9072-47D0-A318-353284CFC7B3 </RequestId>
<ContainerGroupId>eci-uf6fonnghi50u374****</ContainerGroupId>
</CreateContainerGroupResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "89945DD3-9072-47D0-A318-353284CFC7B3\t",
"ContainerGroupId" : "eci-uf6fonnghi50u374****"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Account.Arrearage | Your account has an outstanding payment. | 账号已经欠费。 |
400 | DryRunOperation | Request validation has been passed with DryRun flag set. | 此次DryRun预检请求合格。 |
400 | InvalidParameter.CPU.Memory | The specified cpu and memory are not allowed | cpu,mem不符合规格 |
400 | InvalidParameter.DuplicatedName | The container group include containers with duplicate names. | 容器组内有重复名字的容器。 |
400 | InvalidParameter.DuplicatedVolumeName | The container group includes volumes with duplicate names. | 容器组内有重复名字的数据卷。 |
400 | IncorrectStatus | %s | 指定的实例状态不正确。 |
400 | ServiceNotEnabled | %s | 该次请求所依赖的服务没有开通,请开通后再试。 |
400 | ImageSnapshot.IncorrectStatus | %s | 用于镜像缓存的快照状态不正确。 |
400 | ImageSnapshot.NotSupport | %s | 基于数据盘快照的镜像缓存功能暂未全网开放,如有需要请联系我们。 |
400 | DiskVolume.NotSupport | The disk volume is not supported. | 云盘卷暂不支持,如有需要请联系我们。 |
400 | RamRole.NotSupport | The RAM role is not supported. | ram实例角色不支持 |
400 | DiskNumber.LimitExceed | The maximum number of disks in an instance is exceeded. | 实例下云盘数目超过限制。 |
400 | InvalidPaymentMethod.InsufficientBalance | No payment method is specified for your account. We recommend that you add a payment method or add funds to the prepayment balance. | 您的账户暂无有效支付方式,请添加支付方式或保持预付款余额充足。 |
400 | DiskVolume.NotInSameZone | The instance to be created and the disk are not in the same zone. | 即将创建的实例和云盘不在同一可用区。 |
400 | NoPermission | You are not authorized to use the "Product on ECI" feature. | 您没有云产品on ECI的权限 |
400 | HighCpuMemConfigRequired | You need to apply to be added to the whitelist of the specified CPU and memory. | 您需要申请CPU高配白名单 |
400 | RecommendEmpty.InstanceTypeFamilyNotMatched | The recommended instance type is unavailable in the current zone. Try again later. | 当前可用区没有推荐的规格可使用,请稍后重试或者到其他的可用区创建。 |
400 | LocalDiskAmountNotMatch | The number of local volumes does not match the instance type. | 本地盘数量跟实例规格不匹配 |
400 | Payfor.CreditPayInsufficientBalance | Your payment credit line is insufficient. | 您的付款信用额度不足。 |
400 | InvalidOperation.KMS.InstanceTypeNotSupport | The specified instance is invalid. Only I/O optimized instances support KMS key. | 指定的实例无效,只有 I/O 优化类型的实例支持设置“KMS Key”。 |
400 | InvalidParameter.Encrypted.KmsNotEnabled | KMS must be enabled for encrypted disks. | 加密磁盘需要启用密钥管理服务。 |
400 | InvalidParameter.KMS.EncryptedIllegal | After configuring the parameter KmsKeyId, you must enable encryption. | 设置参数“KmsKeyId”后,您必须开启加密属性。 |
400 | InvalidSpotCpuMemorySpec | The specified CPU and memory are not allowed. You must create spot ECI using standard ECS specifications for CPU and memory. | 必须采用标准的ECS规格来创建ECI spot。 |
400 | Ipv6AddressNotSupportVsw | IPv6 is not supported in the specified vSwitch. | 该交换机暂未开通ipv6地址。 |
400 | Ipv6AddressNotSupport | Ipv6 is not supported in specified region. | 当前地域还不支持IPV6地址。 |
400 | Ipv6AddressNotSupportInstanceType | IPv6 is not supported for the specified instance type. | 当前创建的规格不支持IPv6。 |
400 | EipPayInsufficientBalance | Your account does not have enough balance to purchase eip. | 当前账户余额不足以购买eip。 |
400 | EipPurchaseFlowControl | Request was denied due to eip frequent purchase. | 当前购买eip过于频繁,请稍后重试。 |
400 | Throttling | You have made too many requests within a short time; your request is denied due to request throttling | 短时间内请求过多 |
400 | Throttling | You have made too many requests within a short time; your request is denied due to request throttling. | 短时间内请求过多 |
400 | JobInstanceBatchCreateNotSupport | ECI job instance not support batch create | ECI Job型实例不支持批量创建 |
400 | JobInstanceDiskNotSupport | ECI job instance not support disk volume | ECI Job型实例不支持挂载阿里云云盘 |
400 | JobInstanceEipNotSupport | ECI job instance not support eip | ECI Job型实例不支持挂载eip |
400 | JobInstanceFeatureNotMatch | ECI job instance feature not match | 指定的参数与Job型实例的限制存在冲突 |
400 | JobInstanceImageCacheNotSupport | ECI job instance not support image cache | ECI Job型实例不支持镜像缓存 |
400 | JobInstanceIPv6NotSupport | ECI job instance not support IPv6 | ECI Job型实例不支持IPv6 |
400 | JobInstanceRamRoleNotSupport | ECI job instance not support ram role | ECI Job型实例不支持实例RAM角色 |
400 | JobInstanceRegionNotSupport | ECI job instance not support in this region | ECI Job优化型实例在此地域不支持 |
400 | JobInstanceSpotNotSupport | ECI job instance not support spot | Job型实例不支持Spot付费模式 |
400 | LocalDiskAmountNotMatch | The amount of local volume is not matched with instance type. | 指定的规格与定义的本地盘存储卷数据不匹配,请确保指定的规格有足够的本地盘数量。 |
400 | InvalidInstanceTypeForEciSpotDurationBuy | Current instance type does not support spot duration instance. | 当前规格不支持eci自定义时长类型的spot实例。 |
400 | InvalidInstanceTypeForEciBuy | Sales of this current instance type is not supported in eci. | 当前规格不在eci售卖规格范围内。 |
403 | OperationDenied.VswZoneMisMatch | The specified VSwitchId is not in the specified Zone. | 指定的交换机不在可用区 |
403 | QuotaExceeded | %s quota exceeded. | 用户允许创建的实例已经超过限制 |
403 | Zone.NotOnSale | The specified zone is not available for purchase. | 创建实例的可用区已经关闭售卖,请更换其他可用区。或者无法在该可用区使用指定 VPC 的虚拟交换机。 |
403 | Forbidden.RiskControl | This operation has been identified as an abnormal operation and cannot be processed. | 此操作已被确定为一个操作异常,无法处理。 |
403 | Forbidden.SubUser | The specified action is not available for you. | 当前用户无法执行该操作 |
403 | Forbidden.OnlyForInvitedTest | Eci create action is only open to invited users during public beta. | Eci公测阶段只对受邀的用户开放。 |
403 | OperationDenied.SecurityGroupMisMatch | The specified VSwitchId and SecurityGroupId are not in the same VPC. | 指定的交换机和安全组不在同一个VPC下 |
403 | InvalidVSwitchId.IpNotEnough | The specified VSwitch does not have enough IP addresses. | 交换机没有足够ip地址 |
403 | Forbidden.UserBussinessStatus | This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again. | 用户处于欠费状态不允许创建,请充值后再尝试。 |
403 | Forbidden.UserNotRealNameAuthentication | This operation is not allowed, because you have not passed the real-name verification. | 操作被禁止,因为用户还未进行实名认证。 |
403 | InvalidUser.PassRoleForbidden | The RAM user is not authorized to assume a RAM role. | 子账号用户没有权限使用RAM实例角色 |
403 | OperationDenied.NoStock | Sales of this resource are temporarily suspended in the specified zone. We recommend that you use the multi-zone creation function to avoid the risk of insufficient resource. For more information, see https://help.aliyun.com/document_detail/157290.html | 库存不足,请尝试其它系列或者其它可用区/地域的实例,推荐使用多可用区多规格配置来避免库存不足,更多信息见:https://help.aliyun.com/document_detail/157290.html |
403 | InvalidParameter.KMS.KeyId.Forbidden | You are not authorized to access the specified KMSKeyId. | 无权访问指定的 KMSKeyId。 |
403 | Forbidden.AccountClosed | The operation is forbidden. Your account has been closed. | 操作被禁止,因为用户账户已注销。 |
403 | InvalidOperation.ResourceManagedByCloudProduct | The operation is forbidden. The security group has been managed by another cloud product. | 安全组由其他云产品管理,禁止操作。 |
403 | Spot.NotMatched | %s. We recommend that you use the create multi-zone function to avoid insufficient inventory. For more information, see https://help.aliyun.com/document_detail/157290.html | %s. 推荐使用多可用区多规格配置来避免库存不足,更多信息见:https://help.aliyun.com/document_detail/157290.html |
403 | SecurityRisk.3DVerification | We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. | 我们检测到您的默认信用卡或借记卡存在安全风险。请通过电子邮件中的链接进行验证。 |
403 | CreateServiceLinkedRole.Denied | Please make sure the account has ram:CreateServiceLinkedRole permission. | 请确保账号拥有ram:CreateServiceLinkedRole权限 |
403 | Throttling.Vcpu.PerDay | The maximum number of request for the day has been exceeded. | 当天的请求配额已经超出。 |
403 | OperationDenied.NoStock | Sales of this resource with specified features are temporarily suspended in the specified region; please check the instance type features and try again later. | 具有指定特征的资源在指定区域暂时停止销售;请检查与实例类型特征有关的参数,并稍后再试。 |
404 | ImageSnapshot.NotFound | The specified snapshot does not exist. | 镜像缓存,快照不存在。 |
404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的云盘不存在。 |
404 | InvalidParameter.KMS.KeyId.NotFound | The specified KMSKeyId does not exist. | 指定的参数“KMSKeyId”不存在。 |
访问错误中心查看更多错误码。