すべてのプロダクト
Search
ドキュメントセンター

:CreateContainerGroup

最終更新日:Jun 22, 2026

CreateContainerGroup を呼び出して ECI インスタンス(コンテナグループ)を作成します。

操作説明

CreateContainerGroup を呼び出して ECI インスタンスを作成すると、システムは ECS や VPC などの関連クラウドサービスにアクセスするためのサービスリンクロール AliyunServiceRoleForECI を自動的に作成します。詳細については、ECI サービスリンクロールを参照してください。

ECI インスタンスを作成する際、必要に応じてインスタンス、イメージ、ストレージ、その他の関連特徴を設定できます。各特徴のパラメーターと説明については、以下のドキュメントを参照してください:

インスタンス

ECI はインスタンスを作成するための以下の 2 つのメソッドをサポートしています:

以下の特徴は両方の作成メソッドでサポートされています:

イメージ

ネットワーク

ストレージ

コンテナ構成

ログと運用保守

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

eci:CreateContainerGroup

create

*ContainerGroup

acs:eci:{#regionId}:{#accountId}:containergroup/*

  • eci:tag
なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

RegionId

string

必須

リージョン ID。

cn-hangzhou

RegionId

string

必須

The region ID.

cn-hangzhou

ZoneId

string

任意

インスタンスのゾーン。値が空の場合、システムが自動的にゾーンを選択します。

デフォルト値: 空。

cn-hangzhou-b

SecurityGroupId

string

任意

インスタンスが属するセキュリティグループの ID。同じセキュリティグループ内のインスタンスは相互にアクセスできます。

セキュリティグループが指定されていない場合、システムは選択したリージョンのデフォルトのセキュリティグループを自動的に使用します。セキュリティグループのインバウンドルールに、公開するコンテナのプロトコルとポート番号が含まれていることを確認してください。リージョンにデフォルトのセキュリティグループがない場合、システムはデフォルトのセキュリティグループを作成し、宣言されたコンテナのプロトコルとポート番号をセキュリティグループのインバウンドルールに追加します。

sg-uf66jeqopgqa9hdn****

VSwitchId

string

任意

インスタンスが接続する vSwitch の ID。一度に最大 10 個の vSwitch ID をカンマ(,)で区切って指定できます。例: vsw-***,vsw-***

vSwitch が指定されていない場合、システムは選択したリージョンのデフォルト VPC のデフォルト vSwitch を自動的に使用します。リージョンにデフォルト VPC とデフォルト vSwitch がない場合、システムはデフォルト VPC とデフォルト vSwitch を作成します。

説明

vSwitch の CIDR ブロック内の IP アドレス数によって、vSwitch 内に作成できる ECI インスタンスの最大数が決まります。事前に CIDR ブロックを計画してください。

vsw-bp1xpiowfm5vo8o3c****,vsw-bp1rkyjgr1xwoho6k****

ContainerGroupName

string

必須

ECI インスタンス(コンテナグループ)の名前。フォーマット要件:

  • 名前は 2〜128 文字である必要があります。

  • 名前には小文字、数字、ハイフン(-)を含めることができます。ハイフンで開始または終了することはできません。

nginx-test

RestartPolicy

string

任意

インスタンスの再起動ポリシー。有効な値:

  • Always: 常に再起動します。

  • Never: 再起動しません。

  • OnFailure: 失敗時に再起動します。

デフォルト値: Always。

Always

EipInstanceId

string

任意

Elastic IP アドレス(EIP)の ID。

eip-uf66jeqopgqa9hdn****

Cpu

number

任意

インスタンスレベルの vCPU サイズ。単位: コア。

1.0

Memory

number

任意

インスタンスレベルのメモリサイズ。単位: GiB。

2.0

ResourceGroupId

string

任意

リソースグループ ID。

rg-uf66jeqopgqa9hdn****

DnsPolicy

string

任意

DNS ポリシー。有効な値:

  • None: DnsConfig フィールドで設定された DNS を使用します。

  • Default: ランタイム環境の DNS 設定を継承します。

Default

ClientToken

string

任意

リクエストのべき等性を保証するために使用されるクライアントトークン。クライアントで値を生成できますが、異なるリクエスト間で値が一意であることを確認する必要があります。トークンには ASCII 文字のみを含めることができ、64 文字を超えることはできません。詳細については、べき等性を確保する方法を参照してください。

123e4567-xxxx-12d3-xxxx-426655440000

InstanceType

string

任意

指定された ECS インスタンスタイプ。複数のインスタンスタイプがサポートされています。詳細については、ECS インスタンスタイプを指定してインスタンスを作成するを参照してください。

ecs.c5.xlarge

ImageSnapshotId

string

任意

イメージキャッシュ ID。詳細については、イメージキャッシュを使用してインスタンス作成を高速化するを参照してください。

imc-2zebxkiifuyzzlhl****

RamRoleName

string

任意

インスタンス RAM ロールの名前。ECI と ECS はインスタンス RAM ロールを共有します。詳細については、API 操作を呼び出してインスタンス RAM ロールを使用するを参照してください。

RamTestRole

TerminationGracePeriodSeconds

integer

任意

シャットダウン前にプログラムが操作をハンドルするためのバッファー期間。単位: 秒。

60

AutoMatchImageCache

boolean

任意

イメージキャッシュを自動的にマッチングするかどうかを指定します。デフォルト値: false。

false

Ipv6AddressCount

integer

任意

IPv6 アドレスの数。値は 1 に固定されており、ECI インスタンスは 1 つの IPv6 アドレスのバインドをサポートします。

1

ActiveDeadlineSeconds

integer

任意

ECI インスタンスの有効期間。この期間が経過するとインスタンスは強制的に終了されます。単位: 秒。

1000

SpotStrategy

string

任意

インスタンスの入札戦略。有効な値:

  • NoSpot: 従量課金インスタンス。

  • SpotWithPriceLimit: 最大価格制限付きのプリエンプティブルインスタンス。

  • SpotAsPriceGo: 実際の市場価格に基づいて課金されるプリエンプティブルインスタンス。

デフォルト値: NoSpot。

SpotWithPriceLimit

SpotPriceLimit

number

任意

プリエンプティブルインスタンスの最大時間単価。値は 10 進数で小数点以下 3 桁まで指定できます。

このパラメーターは SpotStrategy が SpotWithPriceLimit に設定されている場合に必須です。

0.025

ScheduleStrategy

string

任意

複数のゾーンが設定されている場合(VSwitchId パラメーターで複数の vSwitch を指定)の ECI インスタンスのスケジューリング戦略。有効な値:

  • VSwitchOrdered: 順序どおりにスケジューリングします。

  • VSwitchRandom: Alibaba Cloud により最適にスケジューリングします。

詳細については、複数のゾーンにまたがるインスタンスを作成するを参照してください。

VSwitchOrdered

CorePattern

string

任意

coredump によって生成されるコアダンプファイルを保存するためのカスタムディレクトリ。詳細については、コアファイルをデータボリュームに保存するを参照してください。

説明

設定されたパスは | で開始できません。つまり、コアダンプを通じて実行可能プログラムを設定することはできません。

/xx/xx/core

ShareProcessNamespace

boolean

任意

共有名前空間を使用するかどうかを指定します。デフォルト値: false。

false

AutoCreateEip

boolean

任意

EIP を自動的に作成して ECI インスタンスにバインドするかどうかを指定します。

true

EipBandwidth

integer

任意

EIP の帯域幅。デフォルト値: 5 Mbps。 このパラメーターは AutoCreateEip が true に設定されている場合に設定できます。

5

EipISP

string

任意

EIP の回線タイプ。有効な値:

  • BGP(デフォルト): BGP(マルチ ISP)回線。

  • BGP_PRO: BGP(マルチ ISP)プレミアム回線。

BGP

EipCommonBandwidthPackage

string

任意

関連付ける既存の共有帯域幅パッケージの ID。

cbwp-2zeukbj916scmj51m****

HostName

string

任意

ホスト名。

test

IngressBandwidth

integer

任意

インバウンド帯域幅制限。単位: Bps。

1024000

EgressBandwidth

integer

任意

アウトバウンド帯域幅制限。単位: Bps。

1024000

CpuOptionsCore

integer

任意

物理 CPU コア数。一部のインスタンスタイプのみカスタム設定をサポートしています。

2

CpuOptionsThreadsPerCore

integer

任意

コアあたりのスレッド数。一部のインスタンスタイプのみカスタム設定をサポートしています。1 に設定するとハイパースレッディングが無効になります。

2

CpuOptionsNuma

string

任意

このパラメーターはサポートされていません。

1

EphemeralStorage

integer

任意

追加の一時ストレージスペースのサイズ。単位: GiB。 詳細については、一時ストレージのサイズをカスタマイズするを参照してください。

20

Tag

array<object>

任意

タグのリスト。最大 20 個のタグをバインドできます。詳細については、タグを使用してインスタンスを管理するを参照してください。

object

任意

タグのリスト。最大 20 個のタグをバインドできます。詳細については、タグを使用してインスタンスを管理するを参照してください。

Key

string

任意

タグキー。この値は空文字列にできず、重複できません。タグキーは最大 64 文字で、aliyun または acs: で開始できず、http:// または https:// を含めることはできません。

version

Value

string

任意

タグ値。この値は空文字列にできます。タグ値は最大 128 文字で、acs: で開始できず、http:// または https:// を含めることはできません。

3

ImageRegistryCredential

array<object>

任意

イメージリポジトリの認証情報。

object

任意

イメージリポジトリの認証情報。

Password

string

任意

イメージリポジトリのパスワード。

yourpassword

Server

string

任意

イメージリポジトリレジストリのアドレス。

registry-vpc.cn-shanghai.aliyuncs.com

UserName

string

任意

イメージリポジトリのユーザー名。

yourusername

Container

array<object>

必須

コンテナ情報。

array<object>

任意

コンテナ情報。

ReadinessProbe.TimeoutSeconds

integer

任意

The timeout period for the check. Default value: 1 second. Minimum value: 1 second.

1

ReadinessProbe.SuccessThreshold

integer

任意

The minimum number of consecutive successes required to consider the check successful after a failure. Default value: 1. Must be 1.

1

SecurityContext.Capability.Add

array

任意

The permissions granted to processes in the container. Currently, only NET_ADMIN and NET_RAW are supported.

説明

NET_RAW is not supported by default and requires a ticket submission.

string

任意

The permissions granted to processes in the container. Currently, only NET_ADMIN and NET_RAW are supported.

説明

NET_RAW is not supported by default and requires a ticket submission.

NET_ADMIN

ReadinessProbe.TcpSocket.Port

integer

任意

The port for TCP Socket health checks.

説明

When setting ReadinessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

8000

ReadinessProbe.HttpGet.Scheme

string

任意

The protocol type for HTTP request health checks. Valid values:

  • HTTP

  • HTTPS

説明

When setting ReadinessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

HTTP

LivenessProbe.PeriodSeconds

integer

任意

The interval at which the check is performed. Default value: 10 seconds. Minimum value: 1 second.

5

SecurityContext.ReadOnlyRootFilesystem

boolean

任意

Specifies whether the root file system of the container is read-only. Currently, only true is supported.

true

EnvironmentVar

array<object>

任意

コンテナの環境変数。

object

任意

コンテナの環境変数。

Key

string

任意

環境変数の名前。名前は 1〜128 文字である必要があります。フォーマット: [0-9a-zA-Z] およびアンダースコア。数字で開始できません。

PATH

Value

string

任意

環境変数の値。値は 0〜256 文字である必要があります。

/usr/local/bin

FieldRef.FieldPath

string

任意

The reference for the environment variable value. Currently, only status.podIP is supported.

status.podIP

LivenessProbe.TcpSocket.Port

integer

任意

The port for TCP Socket health checks.

説明

When setting LivenessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

8080

Tty

boolean

任意

インタラクションを有効にするかどうかを指定します。デフォルト値: false。

Command が /bin/bash の場合、true に設定する必要があります。

false

WorkingDir

string

任意

コンテナの作業ディレクトリ。

/usr/local/

Arg

array

任意

コンテナ起動コマンドの引数。最大: 10。

100

string

任意

コンテナ起動コマンドの引数。最大: 10。

100

Stdin

boolean

任意

このコンテナがコンテナランタイムで標準入力用のバッファーを割り当てるかどうかを指定します。設定されていない場合、コンテナ内の標準入力からの読み取りは EOF になります。デフォルト値: false。

false

LivenessProbe.InitialDelaySeconds

integer

任意

The time to start the check, calculated from when the container finishes starting.

5

VolumeMount

array<object>

任意

ボリュームマウント情報。

object

任意

ボリュームマウント情報。

MountPropagation

string

任意

ボリュームのマウント伝播設定。マウント伝播により、コンテナによってマウントされたボリュームを同じ Pod 内の他のコンテナや、同じノード上の他の Pod と共有できます。有効な値:

  • None: ボリュームはこのボリュームまたはそのサブディレクトリに対する後続のマウント操作を検知しません。

  • HostToContainer: ボリュームはこのボリュームまたはそのサブディレクトリに対する後続のマウント操作を検知します。

  • Bidirectional: HostToContainer と同様にマウント操作を検知します。さらに、ボリュームはホストおよび同じボリュームを使用するすべての Pod のすべてのコンテナに伝播されます。

デフォルト値: None。

None

MountPath

string

任意

コンテナがボリュームをマウントするディレクトリ。

説明

コンテナのマウントディレクトリ配下の内容はボリュームの内容で直接上書きされます。注意して使用してください。

/pod/data

ReadOnly

boolean

任意

ボリュームが読み取り専用かどうかを指定します。デフォルト値: false。

false

SubPath

string

任意

ボリュームのサブパス。

data2/

Name

string

任意

ボリュームの名前。Volume の Name と同じです。

default-volume1

ImagePullPolicy

string

任意

イメージプルポリシー。有効な値:

  • Always: 常にプルします。毎回イメージをプルします。

  • IfNotPresent: オンデマンドでプルします。まずローカルイメージを使用します。ローカルイメージが利用できない場合にイメージをプルします。

  • Never: プルしません。ローカルイメージのみを使用します。

Always

StdinOnce

boolean

任意

標準入力が true に設定されている場合、複数のアタッチセッション間で標準入力ストリームが開いたままになるかどうかを指定します。 StdinOnce が true に設定されている場合、標準入力はコンテナの起動時に開かれ、最初のクライアントが標準入力にアタッチするまで空のままになり、その後開いたままデータを受け入れ、クライアントが切断されるまで続きます。その後、標準入力は閉じられ、コンテナが再起動するまで閉じたままになります。

false

LifecyclePreStopHandlerTcpSocketPort

integer

任意

TCPSocket メソッドを使用する場合の preStop コールバック関数の TCP Socket ポート。

90

LifecyclePostStartHandlerHttpGetScheme

string

任意

HTTP リクエストメソッドを使用して postStart コールバック関数を設定する場合の HTTP Get リクエストのプロトコルタイプ。有効な値:

  • HTTP

  • HTTPS

HTTPS

ReadinessProbe.PeriodSeconds

integer

任意

The interval at which the check is performed. Default value: 10 seconds. Minimum value: 1 second.

3

LivenessProbe.SuccessThreshold

integer

任意

The minimum number of consecutive successes required to consider the check successful after a failure. Default value: 1. Must be 1.

1

Command

array

任意

コンテナ起動コマンド。最大: 20。各コマンドは最大 256 文字です。

sleep

string

任意

コンテナ起動コマンド。最大: 20。各コマンドは最大 256 文字です。

sleep

LifecyclePostStartHandlerHttpGetHost

string

任意

HTTP リクエストメソッドを使用して postStart コールバック関数を設定する場合に HTTP Get リクエストを受信するホストアドレス。

10.0.XX.XX

TerminationMessagePolicy

string

任意

メッセージ通知ポリシー。デフォルト値: 空。現在、軽量メッセージキュー通知のみがサポートされています。

FallbackToLogsOnError

ReadinessProbe.HttpGet.Path

string

任意

The path for HTTP Get request health checks.

説明

When setting ReadinessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

/healthz

LivenessProbe.Exec.Command

array

任意

The commands executed in the container for command-based health checks.

説明

When setting LivenessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

string

任意

The commands executed in the container for command-based health checks.

cat /tmp/healthy

LifecyclePostStartHandlerTcpSocketPort

integer

任意

TCPSocket メソッドを使用する場合の postStart コールバック関数の TCP Socket ポート。

80

LifecyclePostStartHandlerHttpGetPath

string

任意

HTTP リクエストメソッドを使用して postStart コールバック関数を設定する場合の HTTP Get リクエストパス。

/healthyz

LifecyclePostStartHandlerExec

array

任意

コマンドメソッドを使用して postStart コールバック関数を設定する場合にコンテナ内で実行するコマンド。

["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]

string

任意

コマンドメソッドを使用して postStart コールバック関数を設定する場合にコンテナ内で実行するコマンド。

["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]

LifecyclePreStopHandlerHttpGetPath

string

任意

HTTP リクエストメソッドを使用して preStop コールバック関数を設定する場合の HTTP Get リクエストパス。

/healthyz

Port

array<object>

任意

ポート番号。

object

任意

ポート番号。

Protocol

string

任意

プロトコルタイプ。有効な値:

  • TCP

  • UDP。

TCP

Port

integer

任意

ポート番号。有効な値: 1〜65535。

80

TerminationMessagePath

string

任意

コンテナエラーメッセージのパス。

/tmp/termination-log

LifecyclePreStopHandlerHttpGetScheme

string

任意

HTTP リクエストメソッドを使用して preStop コールバック関数を設定する場合の HTTP Get リクエストのプロトコルタイプ。有効な値:

  • HTTP

  • HTTPS

HTTP

LivenessProbe.HttpGet.Scheme

string

任意

The protocol type for HTTP request health checks. Valid values:

  • HTTP

  • HTTPS

説明

When setting LivenessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

HTTP

ReadinessProbe.HttpGet.Port

integer

任意

The port number for HTTP Get request health checks.

説明

When setting ReadinessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

8080

LifecyclePostStartHandlerTcpSocketHost

string

任意

TCP Socket メソッドを使用して postStart コールバック関数を設定する場合の TCP Socket 検出のホストアドレス。

10.0.XX.XX

Gpu

integer

任意

コンテナに割り当てられる GPU の数。

1

ReadinessProbe.InitialDelaySeconds

integer

任意

The time to start the check, calculated from when the container finishes starting.

3

LifecyclePreStopHandlerExec

array

任意

コマンドメソッドを使用して preStop コールバック関数を設定する場合にコンテナ内で実行するコマンド。 [_

["/bin/sh", "-c","echo Hello from the preStop handler > /usr/share/message"]

string

任意

The commands executed in the container when using the command method to set the preStop callback function.

["/bin/sh", "-c","echo Hello from the preStop handler > /usr/share/message"]

Memory

number

任意

コンテナのメモリサイズ。単位: GiB。

0.5

Name

string

必須

コンテナ名。

nginx

LifecyclePreStopHandlerHttpGetHost

string

任意

The host address that receives the HTTP Get request when using the HTTP request method to set the preStop callback function.

10.0.XX.XX

LifecyclePreStopHandlerTcpSocketHost

string

任意

The host address for TCP Socket detection when using the TCP Socket method to set the preStop callback function.

10.0.XX.XX

Image

string

必須

コンテナイメージ。

registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest

LifecyclePreStopHandlerHttpGetPort

integer

任意

The HTTP Get request port number when using the HTTP request method to set the preStop callback function.

88

LivenessProbe.FailureThreshold

integer

任意

The minimum number of consecutive failures required to consider the check failed after a success. Default value: 3.

3

ReadinessProbe.Exec.Command

array

任意

The commands executed in the container for command-based health checks.

説明

When setting ReadinessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

string

任意

The commands executed in the container for command-based health checks.

cat /tmp/healthy

LifecyclePreStopHandlerHttpGetHttpHeader

array<object>

任意

HTTP リクエストヘッダーパラメーター。

object

任意

HTTP リクエストヘッダーパラメーター。

Value

string

任意

The custom field value in the HTTP Get request header when using the HTTP request method to set the preStop callback function.

test-preStop

Name

string

任意

The custom field name in the HTTP Get request header when using the HTTP request method to set the preStop callback function.

Xiao-Custom-Header

ReadinessProbe.FailureThreshold

integer

任意

The minimum number of consecutive failures required to consider the check failed after a success. Default value: 3.

3

Cpu

number

任意

The vCPU size of the container. Unit: cores.

0.25

LivenessProbe.HttpGet.Port

integer

任意

The port number for HTTP Get request health checks.

説明

When setting LivenessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

8888

LivenessProbe.HttpGet.Path

string

任意

The path for HTTP Get request health checks.

説明

When setting LivenessProbe parameters, only one of the three check methods (HttpGet, Exec, and TcpSocket) can be selected.

/healthz

LivenessProbe.TimeoutSeconds

integer

任意

The timeout period for the check. Default value: 1 second. Minimum value: 1 second.

1

SecurityContext.RunAsUser

integer

任意

The user ID used to run the container.

1000

LifecyclePostStartHandlerHttpGetPort

integer

任意

The HTTP Get request port number when using the HTTP request method to set the postStart callback function.

5050

LifecyclePostStartHandlerHttpGetHttpHeader

array<object>

任意

HTTP リクエストヘッダーパラメーター。

object

任意

HTTP リクエストヘッダーパラメーター。

Value

string

任意

The custom field value in the HTTP Get request header when using the HTTP request method to set the postStart callback function.

test-postStart

Name

string

任意

The custom field name in the HTTP Get request header when using the HTTP request method to set the postStart callback function.

Xiao-Custom-Header

EnvironmentVarHide

boolean

任意

Specifies whether to hide environment variable information when querying ECI instance details. Valid values:

  • false (default): environment variable information is returned when querying ECI instance details.

  • true: environment variable information is not returned when querying ECI instance details. Setting this to true improves security when environment variables contain sensitive information.

false

SecurityContextRunAsGroup

integer

任意

The user group ID used to run the container.

3000

SecurityContextRunAsNonRoot

boolean

任意

Specifies whether to run the container in non-root mode. Valid values:

  • true: non-root mode.

  • false (default): root mode.

true

SecurityContextPrivileged

boolean

任意

Specifies whether to enable privilege mode for the container. Valid values:

  • true: enable privilege mode.

  • false (default): disable privilege mode.

説明

The privileged container feature is in beta. To use it, submit a ticket.

true

Volume

array<object>

任意

The volume information.

array<object>

任意

The volume information.

Type

string

任意

The volume type. Valid values:

  • EmptyDirVolume: an EmptyDir volume, which represents an empty directory.

  • NFSVolume: an NFS volume, which represents a Network File System.

  • ConfigFileVolume: a ConfigFile volume, which represents a configuration file.

  • FlexVolume: uses the FlexVolume plugin to extend storage types. Supports mounting cloud disks.

  • HostPathVolume: a HostPath volume, which represents a file or directory on the host node. This type is available only to allowlisted users.

  • DiskVolume (not recommended): a cloud disk volume. We recommend that you use FlexVolume to mount cloud disks.

ConfigFileVolume

DiskVolume.DiskSize

integer

任意

The size of the DiskVolume. Unit: GiB.

15

NFSVolume.Path

string

任意

The NFS volume path.

/share

DiskVolume.FsType

string

任意

The file system type of the DiskVolume.

xfs

FlexVolume.FsType

string

任意

The file system type to mount. Default value depends on the FlexVolume script.

ext4

HostPathVolume.Type

string

任意

The type of the HostPath volume. Valid values:

  • Directory: a directory.

  • File: a file.

説明

HostPath volumes are available only to allowlisted users.

Directory

ConfigFileVolume.DefaultMode

integer

任意

The default permissions of the ConfigFileVolume.

0644

NFSVolume.ReadOnly

boolean

任意

Specifies whether the NFS volume is read-only. Default value: false.

false

ConfigFileVolume.ConfigFileToPath

array<object>

任意

The ConfigFile volume information.

If multiple ConfigFileToPath entries are configured, the total length of all corresponding Content values cannot exceed 60 KB.

object

任意

The ConfigFile volume information.

Path

string

任意

The relative file path of the configuration file relative to the mount directory.

test/config-test.cnf

Mode

integer

任意

The permissions of the configuration file. If not set, the value of ConfigFileVolume.DefaultMode is used. Represented as a four-digit octal number. For example, 0644 means the permissions are rw-r--r--, where the user permission is rw-, the group permission is r--, and the other permission is r--.

Permission descriptions:

  • ---: no permissions, octal value 0.

  • --x: execute only, octal value 1.

  • -w-: write only, octal value 2.

  • -wx: write and execute, octal value 3.

  • r--: read only, octal value 4.

  • r-x: read and execute, octal value 5.

  • rw-: read and write, octal value 6.

  • rwx: read, write, and execute, octal value 7.

0644

Content

string

任意

The content of the configuration file, which must be Base64-encoded. A single configuration file cannot exceed 32 KB.

bGl1bWk=

HostPathVolume.Path

string

任意

The directory path of the HostPath volume on the host.

/pod/data

FlexVolume.Options

string

任意

The FlexVolume option list. This is in key-value format and passed as JSON.

For example, when mounting a cloud disk via FlexVolume, Options represents the cloud disk configuration parameters. The configurable parameters are as follows:

  • volumeId: the ID of an existing cloud disk.

  • volumeSize: the size of the cloud disk. Unit: GiB. Valid values: 20 to 32768.

  • performanceLevel: the performance level of the cloud disk. For more information, see Cloud disk performance levels.

  • deleteWithInstance: specifies whether to release the disk with the instance. Default value: false.

  • encrypted: specifies whether to encrypt the cloud disk. Default value: false. For more information, see Encryption overview.

  • kmsKeyId: the KMS key ID used for cloud disk encryption.

{"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"}

FlexVolume.Driver

string

任意

The driver type when using the FlexVolume plugin to mount volumes. Valid values:

  • alicloud/disk: mount a cloud disk.

  • alicloud/nas: mount NAS.

  • alicloud/oss: mount OSS.

alicloud/disk

NFSVolume.Server

string

任意

The NFS server address.

3f9cd4a596-naw76.cn-shanghai.nas.aliyuncs.com

DiskVolume.DiskId

string

任意

The ID of the DiskVolume.

d-xx

Name

string

任意

The volume name.

default-volume1

EmptyDirVolume.Medium

string

任意

The storage medium for the EmptyDirVolume. Default value: empty, which uses the node file system. The value memory is supported, indicating the use of memory.

memory

EmptyDirVolume.SizeLimit

string

任意

The size of the EmptyDirVolume. Unit: GiB.

2

InitContainer

array<object>

任意

The list of init containers.

array<object>

任意

The list of init containers.

SecurityContext.Capability.Add

array

任意

The permissions granted to processes in the container. Currently, only NET_ADMIN and NET_RAW are supported.

説明

NET_RAW is not supported by default and requires a ticket submission.

string

任意

The permissions granted to processes in the container. Currently, only NET_ADMIN and NET_RAW are supported.

説明

NET_RAW is not supported by default and requires a ticket submission.

NET_ADMIN

Image

string

任意

The image used by the container.

nginx

VolumeMount

array<object>

任意

The list of volume mount information.

object

任意

The list of volume mount information.

MountPropagation

string

任意

ボリュームのマウント伝播設定。マウント伝播により、コンテナによってマウントされたボリュームを同じ Pod 内の他のコンテナや、同じノード上の他の Pod と共有できます。有効な値:

  • None: ボリュームはこのボリュームまたはそのサブディレクトリに対する後続のマウント操作を検知しません。

  • HostToContainer: ボリュームはこのボリュームまたはそのサブディレクトリに対する後続のマウント操作を検知します。

  • Bidirectional: HostToContainer と同様にマウント操作を検知します。さらに、ボリュームはホストおよび同じボリュームを使用するすべての Pod のすべてのコンテナに伝播されます。

デフォルト値: None。

None

MountPath

string

任意

The mount directory. The contents under the container mount directory will be directly overwritten by the volume contents. Use with caution.

/usr/share/

ReadOnly

boolean

任意

Specifies whether the mount path is read-only. Default value: false.

false

SubPath

string

任意

The sub-directory of the volume, allowing the pod to mount different directories from the same volume to different container directories.

/usr/sub/

Name

string

任意

The name of the volume to mount.

test-empty

Port

array<object>

任意

The init container port numbers.

object

任意

The init container port numbers.

Protocol

string

任意

プロトコルタイプ。有効な値:

  • TCP

  • UDP。

TCP

Port

integer

任意

ポート番号。有効な値: 1〜65535。

8888

SecurityContext.ReadOnlyRootFilesystem

boolean

任意

Specifies whether the root file system of the container is read-only. Currently, only true is supported.

true

TerminationMessagePath

string

任意

The source of the container exit message. When the container exits, the termination message is retrieved from the specified termination message file.

/tmp/termination-log

EnvironmentVar

array<object>

任意

The list of container environment variables.

object

任意

The list of container environment variables.

Key

string

任意

環境変数の名前。名前は 1〜128 文字である必要があります。フォーマット: [0-9a-zA-Z] およびアンダースコア。数字で開始できません。

Path

Value

string

任意

環境変数の値。値は 0〜256 文字である必要があります。

/usr/bin/

FieldRef.FieldPath

string

任意

The reference for the environment variable value. Currently, only status.podIP is supported.

status.podIP

ImagePullPolicy

string

任意

The image pull policy. Valid values:

  • Always: always pull. Pulls the image every time.

  • IfNotPresent: pull on demand. Uses the local image first. Pulls the image if no local image is available.

  • Never: never pull. Uses the local image only.

Always

WorkingDir

string

任意

The working directory.

/usr/local

Cpu

number

任意

The vCPU size of the container. Unit: cores.

0.5

Arg

array

任意

The container startup arguments.

10

string

任意

The container startup arguments.

10

Command

array

任意

The container startup commands.

sleep

string

任意

The container startup commands.

sleep

Gpu

integer

任意

コンテナに割り当てられる GPU の数。

1

SecurityContext.RunAsUser

integer

任意

The user ID used to run the container.

587

Memory

number

任意

コンテナのメモリサイズ。単位: GiB。

1.0

TerminationMessagePolicy

string

任意

The mount information. Default value: empty.

*****

Name

string

任意

コンテナ名。

test-init

DnsConfig.NameServer

array

任意

The list of IP addresses of DNS servers.

172.10.*.**

string

任意

The list of IP addresses of DNS servers.

172.10.*.**

DnsConfig.Search

array

任意

The list of DNS search domains.

svc.local.kubenetes

string

任意

The list of DNS search domains.

svc.local.kubernetes

DnsConfig.Option

array<object>

任意

The list of options.

object

任意

The list of options.

Value

string

任意

The value of the option.

value

Name

string

任意

The name of the option.

name

HostAliase

array<object>

任意

The host aliases for the ECI instance.

object

任意

The host aliases for the ECI instance.

Ip

string

任意

The IP address to add.

1.1.1.1

Hostname

array

任意

The host names to add.

hehe.com

string

任意

The host names to add.

hehe.com

SecurityContext.Sysctl

array<object>

任意

Modifies safe sysctl parameters through the security context. For more information, see Configure Security Context.

object

任意

Modifies safe sysctl parameters through the security context. For more information, see Configure Security Context.

Value

string

任意

The value of the safe sysctl parameter when modifying sysctl parameters through the security context.

65536

Name

string

任意

The name of the safe sysctl parameter when modifying sysctl parameters through the security context. Valid values:

  • net.ipv4.ping_group_range

  • net.ipv4.ip_unprivileged_port_start

net.ipv4.ping_group_range

HostSecurityContext.Sysctl

array<object>

任意

Modifies unsafe sysctl parameters through the security context. For more information, see Configure Security Context.

object

任意

Modifies unsafe sysctl parameters through the security context. For more information, see Configure Security Context.

Value

string

任意

The value of the unsafe sysctl parameter when modifying sysctl parameters through the security context.

65536

Name

string

任意

The name of the unsafe sysctl parameter when modifying sysctl parameters through the security context. Valid values:

  • kernel.shm* (except kernel.shm_rmid_forced)

  • kernel.msg*

  • kernel.sem

  • fs.mqueue.*

  • net.* (except net.ipv4.tcp_syncookies, net.ipv4.ping_group_range, and net.ipv4.ip_unprivileged_port_start)

kernel.msgmax

NtpServer

array

任意

The NTP servers.

ntp.cloud.aliyuncs.com

string

任意

The NTP servers.

ntp.cloud.aliyuncs.com

AcrRegistryInfo

array<object>

任意

The list of ACR Enterprise Edition instance information. For more information, see Pull images from ACR without a password.

object

任意

The list of ACR Enterprise Edition instance information.

Domain

array

任意

The domains of the ACR Enterprise Edition instance. By default, all domains of the instance are used. You can specify individual domains, separated by commas.

*****-****-registry.cn-beijing.cr.aliyuncs.com

string

任意

The domains of the ACR Enterprise Edition instance. By default, all domains of the instance are used. You can specify individual domains, separated by commas.

*****-****-registry.cn-beijing.cr.aliyuncs.com

InstanceName

string

任意

The name of the ACR Enterprise Edition instance.

acr-test

InstanceId

string

任意

The ID of the ACR Enterprise Edition instance.

cri-nwj395hgf6f3****

RegionId

string

任意

The region of the ACR Enterprise Edition instance.

cn-beijing

ArnService

string

任意

The ARN of the RAM role under the account that owns the ECI instance and other resources.

acs:ram::1609982529******:role/role-assume

ArnUser

string

任意

The ARN of the RAM role under the account that owns the ACR instance.

acs:ram::1298452580******:role/role-acr

SpotDuration

integer

任意

The protection period of the preemptible instance. Unit: hours. Default value: 1. Set this to 0 for no protection period.

1

StrictSpot

boolean

任意

Specifies whether to enable strict spot mode. Valid values:

  • true: enables strict spot mode.

  • false: does not enable strict spot mode.

true

PlainHttpRegistry

string

任意

The address of a self-managed image repository. When creating ECI instances using images from a self-managed image repository that uses the HTTP protocol, configure this parameter so that ECI uses the HTTP protocol to pull images, avoiding image pull failures caused by protocol mismatch.

"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80"

InsecureRegistry

string

任意

The address of a self-managed image repository. When creating ECI instances using images from a self-managed image repository that uses self-signed certificates, configure this parameter to skip certificate verification, avoiding image pull failures caused by certificate verification failure.

"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80"

ImageAccelerateMode

string

任意

The image acceleration mode. Valid values:

  • nydus: uses Nydus acceleration. The image must support it.

  • dadi: uses DADI acceleration. The image must support it.

  • p2p: uses P2P acceleration. The image must support it.

  • imc: uses image cache acceleration.

imc

Ipv6GatewayBandwidthEnable

boolean

任意

Specifies whether to enable IPv6 public network communication for the ECI instance.

true

Ipv6GatewayBandwidth

string

任意

When Ipv6GatewayBandwidthEnable is set to true, specifies the peak public bandwidth for the IPv6 address. Valid values:

  • When the IPv6 gateway uses pay-by-fixed-bandwidth billing, the IPv6 public bandwidth range is 1 to 2000 Mbps.

  • When the IPv6 gateway uses pay-by-traffic billing, the IPv6 public bandwidth range depends on the gateway specification:
    • Free edition: 1 to 200 Mbps.

    • Enterprise edition: 1 to 500 Mbps.

    • Enhanced enterprise edition: 1 to 1000 Mbps.

Default value: the maximum value within the corresponding bandwidth range of the gateway.

100

ContainerResourceView

boolean

任意

When the ECI specification is larger than the requested specification, you can enable this setting to ensure that the resources visible inside the container are consistent with the requested resources.

false

FixedIp

string

任意

Set to true to enable fixed IP addresses for the instance. For details, see Configure ECI instances to use fixed IP addresses.

true

FixedIpRetainHour

integer

任意

The retention period of the fixed IP address after it becomes idle, i.e., the retention period after the instance with the fixed IP address is released. Unit: hours. Default value: 48.

24

DataCacheBucket

string

任意

The data cache bucket.

default

DataCachePL

string

任意

The performance level of the cloud disk used by the data cache. ESSDs are used preferentially, and the default performance level is PL1.

PL1

DataCacheProvisionedIops

integer

任意

The provisioned read/write IOPS when the data cache uses ESSD AutoPL cloud disks. Valid values: 0 to min{50000, 1000 × capacity - baseline performance}. Baseline performance = min{1800 + 50 × capacity, 50000}. For more information, see ESSD AutoPL cloud disks.

40000

DataCacheBurstingEnabled

boolean

任意

Specifies whether to enable burst performance when the data cache uses ESSD AutoPL cloud disks. For more information, see ESSD AutoPL cloud disks.

false

DryRun

boolean

任意

Specifies whether to perform a dry run. Valid values:

  • true: performs a dry run without creating an ECI instance. The system checks required parameters, request format, service limits, and inventory. If the check fails, the corresponding error is returned. If the check passes, the error code DryRun.Success is returned.

  • false (default): sends a normal request. After the check passes, the ECI instance is created.

false

PrivateIpAddress

string

任意

The private IP address of the ECI instance. Currently, only IPv4 addresses are supported. Make sure that the IP address is not already in use.

172.16.0.1

OsType

string

任意

The operating system of the ECI instance. Valid values:

  • Linux (default)

  • Windows

説明

Windows instances are in beta. To use them, submit a ticket.

Windows

CpuArchitecture

string

任意

The CPU architecture of the ECI instance. Valid values:

  • AMD64 (default)

  • ARM64.

ARM64

ComputeCategory

array

任意

The compute categories. For more information, see Create instances by specifying compute categories.

string

任意

The compute categories. Valid values:

  • economy: economy type.

  • general: general-purpose type.

Multiple compute categories are supported. The system creates instances in the specified order.

economy

GpuDriverVersion

string

任意

The GPU driver version.

説明

Only some instance types support switching GPU driver versions. For more information, see Create instances by specifying GPU specifications.

tesla=535

MaxPendingMinute

integer

任意

レスポンスフィールド

フィールド

説明

object

RequestId

string

The request ID, which is a unique identifier.

89945DD3-9072-47D0-A318-353284CFC7B3

ContainerGroupId

string

The instance ID, which is also the container group ID.

eci-uf6fonnghi50u374****

成功レスポンス

JSONJSON

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

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 Account.Arrearage Your account has an outstanding payment. Your account has an outstanding payment.
400 DryRunOperation Request validation has been passed with DryRun flag set. Request validation has been passed with DryRun flag set.
400 InvalidParameter.CPU.Memory The specified cpu and memory are not allowed
400 InvalidParameter.DuplicatedName The container group include containers with duplicate names.
400 InvalidParameter.DuplicatedVolumeName The container group includes volumes with duplicate names. 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. The RAM role is not supported.
400 DiskNumber.LimitExceed The maximum number of disks in an instance is exceeded. 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. 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.
400 HighCpuMemConfigRequired You need to apply to be added to the whitelist of the specified CPU and memory. You need to apply to be added to the whitelist of the specified CPU and memory.
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. Your payment credit line is insufficient.
400 InvalidOperation.KMS.InstanceTypeNotSupport The specified instance is invalid. Only I/O optimized instances support KMS key. The specified instance is invalid. Only I/O optimized instances support 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. After configuring the parameter KmsKeyId, you must enable encryption.
400 InvalidSpotCpuMemorySpec The specified CPU and memory are not allowed. You must create spot ECI using standard ECS specifications for CPU and memory.
400 Ipv6AddressNotSupportVsw IPv6 is not supported in the specified vSwitch.
400 Ipv6AddressNotSupport Ipv6 is not supported in specified region.
400 Ipv6AddressNotSupportInstanceType IPv6 is not supported for the specified instance type.
400 EipPayInsufficientBalance Your account does not have enough balance to purchase eip.
400 EipPurchaseFlowControl Request was denied due to eip frequent purchase.
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
400 JobInstanceDiskNotSupport ECI job instance not support disk volume
400 JobInstanceEipNotSupport ECI job instance not support eip
400 JobInstanceFeatureNotMatch ECI job instance feature not match
400 JobInstanceImageCacheNotSupport ECI job instance not support image cache
400 JobInstanceIPv6NotSupport ECI job instance not support IPv6
400 JobInstanceRamRoleNotSupport ECI job instance not support ram role
400 JobInstanceRegionNotSupport ECI job instance not support in this region
400 JobInstanceSpotNotSupport ECI job instance not support spot
400 InvalidInstanceTypeForEciSpotDurationBuy Current instance type does not support spot duration instance.
400 InvalidInstanceTypeForEciBuy Sales of this current instance type is not supported in eci.
400 InstanceTypeNotMatchCpuArch %s.
400 JobInstanceEcsInstanceTypeNotSupport Job-optimized elastic container instances cannot be created by specifying ECS instance types.
400 PrivatePoolInstanceSpotNotSupport Spot is not supported for PrivatePool.
400 DryRun.Success This request is a dryrun request with successful result.
400 PrivateIpAddress.Already.InUse The specific PrivateIpAddress already in use.
400 IncorrectOperation %s
400 FeatureBasedConstraintConflict A conflict occurs in specified feature constraints: [%s].
400 OperationFailed.RiskControl %s.
400 RISK.RISK_CONTROL_REJECTION To protect the security of your account, your request has been denied by the risk control system. Please contact Alibaba Cloud Customer Service for details.
400 InvalidInstanceTypeForRaid %s.
400 RegionDissolved %s.
400 MultiAttachedCloudDiskNotSupport %s.
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.
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.
403 OperationDenied.SecurityGroupMisMatch The specified VSwitchId and SecurityGroupId are not in the same VPC.
403 InvalidVSwitchId.IpNotEnough The specified VSwitch does not have enough IP addresses.
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. The RAM user is not authorized to assume a RAM role.
403 NoPermission The RAM role does not belong to ECS.
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://www.alibabacloud.com/help/document_detail/157290.html
403 InvalidParameter.KMS.KeyId.Forbidden You are not authorized to access the specified KMSKeyId. You are not authorized to access the specified 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://www.alibabacloud.com/help/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.
403 Throttling.Vcpu.PerDay The maximum number of request for the day has been exceeded. The maximum number of request for the day has been exceeded.
403 FeatureAccessRestricted Access to this feature:[%s] is restricted. Please contact Alibaba Cloud ECI support to request access.
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. The specified KMSKeyId does not exist.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。