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

Resource Orchestration Service:ALIYUN::ESS::EciScalingConfiguration

最終更新日:Mar 18, 2025

ALIYUN::ESS::EciScalingConfiguration は、Elastic Container Instance タイプのスケーリング設定を定義するために使用されます。

構文

{
  "Type": "ALIYUN::ESS::EciScalingConfiguration",
  "Properties": {
    "ContainerGroupName": String,
    "ScalingConfigurationName": String,
    "ScalingGroupId": String,
    "SecurityGroupId": String,
    "AutoMatchImageCache": Boolean,
    "ActiveDeadlineSeconds": Integer,
    "AcrRegistryInfos": List,
    "AutoCreateEip": Boolean,
    "Containers": List,
    "Cpu": Number,
    "CpuOptionsThreadsPerCore": Integer,
    "CpuOptionsCore": Integer,
    "CostOptimization": Boolean,
    "DnsConfigSearches": List,
    "DataCachePL": String,
    "DataCacheProvisionedIops": Integer,
    "DataCacheBucket": String,
    "DnsConfigOptions": List,
    "DnsConfigNameServers": List,
    "DataCacheBurstingEnabled": Boolean,
    "DnsPolicy": String,
    "EgressBandwidth": Integer,
    "EipBandwidth": Integer,
    "EphemeralStorage": Integer,
    "HostName": String,
    "HostAliases": List,
    "IngressBandwidth": Integer,
    "ImageSnapshotId": String,
    "Ipv6AddressCount": Integer,
    "InstanceTypes": List,
    "InitContainers": List,
    "ImageRegistryCredentials": List,
    "InstanceFamilyLevel": String,
    "LoadBalancerWeight": Integer,
    "Memory": Number,
    "NtpServers": List,
    "ResourceGroupId": String,
    "RamRoleName": String,
    "RestartPolicy": String,
    "SpotPriceLimit": Number,
    "SpotStrategy": String,
    "SecurityContextSysctls": List,
    "Tags": List,
    "TerminationGracePeriodSeconds": Integer,
    "Volumes": List
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

ContainerGroupName

String

はい

いいえ

Elastic Container Instance の名前。

このプロパティは、コンテナグループの名前も指定します。

シーケンシャルな名前を設定する場合は、name_prefix(AUTO_INCREMENT)[begin_number,bits]name_suffix の形式を使用します。次のセクションでは、シーケンシャルなホスト名の設定方法について説明します。

  • name_prefix: ホスト名のプレフィックス。

  • (AUTO_INCREMENT): 並べ替えモードを指定する固定値。

  • begin_number: シーケンシャル値の開始値。有効な値: 0 ~ 999999

  • bits: シーケンシャル値の桁数。有効な値: 1 ~ 6。begin_number フィールドの値の桁数が bits フィールドの値よりも大きい場合、bits フィールドは自動的に 6 に設定されます。

説明

bits フィールドは 3 以上の値に設定することをお勧めします。そうしないと、シーケンシャル値の上限に達しやすくなります。上限に達した後にスケールアウト操作が引き続き必要な場合、システムはエラーを報告し、スケールアウト操作を停止します。この場合、ホスト名を生成するためのルールを再設定する必要があります。

  • name_suffix: ホスト名のサフィックス。このフィールドはオプションです。

説明

[begin_number,bits] の部分にはスペースを含めることはできません。デフォルトでは、シーケンシャルなホスト名は固定値に基づいて増加します。スケールアウトイベント中に Auto Scaling がスケーリンググループで Elastic Container Instance を起動できない場合、Auto Scaling はスケーリンググループから Elastic Container Instance を削除し、別のインスタンスを作成します。この場合、スケーリンググループ内の Elastic Container Instance のホスト名は、断続的に増加するパターンになる可能性があります。

たとえば、このプロパティに nginx-test-(AUTO_INCREMENT)[0,3] を指定した場合、Elastic Container Instance のシーケンシャル名は nginx-test-000、nginx-test-001、nginx-test-002 になります。

Elastic Container Instance のシーケンシャルな名前を設定するためのルールは、Elastic Compute Service (ECS) インスタンスのシーケンシャルな名前を設定するためのルールに似ています。詳細については、「ECS インスタンスの命名規則を設定する」をご参照ください。

ScalingConfigurationName

String

はい

いいえ

スケーリング設定の名前。

名前は 2 ~ 64 文字で、文字、数字、アンダースコア (_)、ハイフン (-)、ピリオド (.) を使用できます。名前は文字または数字で始める必要があります。

スケーリング設定の名前は、リージョン内で一意である必要があります。このプロパティを指定しない場合、スケーリング設定 ID が使用されます。

ScalingGroupId

String

はい

いいえ

スケーリング設定を作成するスケーリンググループの ID。

なし。

SecurityGroupId

String

はい

いいえ

Elastic Container Instance が属するセキュリティグループの ID。

同じセキュリティグループに関連付けられている Elastic Container Instance は、相互に通信できます。

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

AutoMatchImageCache

Boolean

いいえ

はい

イメージキャッシュを自動的に一致させるかどうかを指定します。

有効な値:

  • true

  • false

デフォルト値: false。

ActiveDeadlineSeconds

Integer

いいえ

はい

有効期間。

単位: 秒。

AcrRegistryInfos

List

いいえ

はい

Container Registry Enterprise Edition インスタンスに関する情報。

なし。

AutoCreateEip

Boolean

いいえ

はい

エラスティック IP アドレス (EIP) を自動的に作成するかどうかを指定します。

なし。

Containers

List

いいえ

はい

Elastic Container Instance 上のコンテナ。

詳細については、「コンテナのプロパティ」をご参照ください。

Cpu

Number

いいえ

はい

コンテナの vCPU 数。

なし。

CpuOptionsThreadsPerCore

Integer

いいえ

はい

コアあたりのスレッド数。

このプロパティは、特定のインスタンスタイプに対してのみ指定できます。値 1 は、ハイパースレッディングが無効になっていることを指定します。詳細については、「CPU オプションを指定する」をご参照ください。

CpuOptionsCore

Integer

いいえ

はい

物理 CPU コアの数。

このプロパティは、特定のインスタンスタイプに対してのみ指定できます。詳細については、「CPU オプションを指定する」をご参照ください。

CostOptimization

Boolean

いいえ

はい

コスト最適化機能を有効にするかどうかを指定します。

有効な値:

  • true

  • false

DnsConfigSearches

List

いいえ

はい

ドメイン ネーム システム (DNS) サーバーの検索ドメイン。

なし。

DataCachePL

String

いいえ

はい

データキャッシュの保存に使用するクラウドディスクのパフォーマンスレベル (PL)。

企業向け SSD (ESSD) を使用することをお勧めします。ESSD を使用する場合のこのプロパティの有効な値:

  • PL0: ESSD は最大 10,000 ランダム読み取り/書き込み IOPS を提供できます。

  • PL1: ESSD は最大 50,000 ランダム読み取り/書き込み IOPS を提供できます。

  • PL2: ESSD は最大 100,000 ランダム読み取り/書き込み IOPS を提供できます。

  • PL3: ESSD は最大 1,000,000 ランダム読み取り/書き込み IOPS を提供できます。

DataCacheProvisionedIops

Integer

いいえ

はい

ESSD AutoPL ディスクのプロビジョニングされた読み取り/書き込み IOPS。

このプロパティは、ESSD AutoPL ディスクを使用してデータキャッシュを保存する場合に有効になります。有効な値: 0 ~ min{50000, 1000 × 容量 - ベースライン IOPS}。ベースライン IOPS = min{1800 + 50 × 容量, 50000}。

DataCacheBucket

String

いいえ

はい

データキャッシュの保存に使用するバケット。

なし。

DnsConfigOptions

List

いいえ

はい

オプション。

各オプションは、値がオプションの名前と値のペアです。

DnsConfigNameServers

List

いいえ

はい

DNS サーバーの IP アドレス。

なし。

DataCacheBurstingEnabled

Boolean

いいえ

はい

パフォーマンスバースト機能を有効にするかどうかを指定します。

このプロパティは、ESSD AutoPL ディスクを使用してデータキャッシュを保存する場合に有効になります。有効な値:

  • true

  • false

DnsPolicy

String

いいえ

はい

DNS ポリシー。

有効な値:

  • None: DnsConfig で指定された DNS を使用します。

  • Default: ランタイム環境で指定された DNS を使用します。

EgressBandwidth

Integer

いいえ

はい

最大アウトバウンド帯域幅。

単位: バイト。

EipBandwidth

Integer

いいえ

はい

EIP の帯域幅。

デフォルト値: 5。単位: Mbit/s。

EphemeralStorage

Integer

いいえ

はい

一時ストレージの容量。

デフォルトでは、PL1 ESSD が使用されます。単位: GiB。

HostName

String

いいえ

はい

ホスト名。

なし。

HostAliases

List

いいえ

はい

Elastic Container Instance 内のコンテナのカスタムホスト名マッピング。

なし。

IngressBandwidth

Integer

いいえ

はい

最大インバウンド帯域幅。

単位: バイト。

ImageSnapshotId

String

いいえ

はい

イメージキャッシュの ID。

なし。

Ipv6AddressCount

Integer

いいえ

はい

IPv6 アドレスの数。

なし。

InstanceTypes

List

いいえ

はい

ECS インスタンスタイプ。

最大 5 つの ECS インスタンスタイプを指定できます。詳細については、「ECS インスタンスタイプを指定して Elastic Container Instance を作成する」をご参照ください。

InitContainers

List

いいえ

はい

初期化コンテナ。

なし。

ImageRegistryCredentials

List

いいえ

はい

イメージリポジトリに関する情報。

なし。

InstanceFamilyLevel

String

いいえ

はい

インスタンスファミリのレベル。

このプロパティを使用して、要件を満たすインスタンスタイプをフィルタリングできます。このプロパティは、CostOptimization が true に設定されている場合に有効になります。有効な値:

  • EntryLevel: エントリーレベル (共有インスタンスタイプ)。このレベルのインスタンスタイプは最も費用対効果が高いですが、一貫したコンピューティングパフォーマンスを保証できない場合があります。このレベルのインスタンスタイプは、CPU 使用率が低いビジネスシナリオに適しています。詳細については、「共有インスタンスファミリ」をご参照ください。

  • EnterpriseLevel: エンタープライズレベル。このレベルのインスタンスタイプは、安定したパフォーマンスと専用の resources を提供し、高い安定性を必要とするビジネスシナリオに適しています。詳細については、「インスタンスファミリの概要」をご参照ください。

  • CreditEntryLevel: クレジットベースのエントリーレベル (バースト可能インスタンスタイプ)。CPU クレジットは、コンピューティングパフォーマンスを確保するために使用されます。このレベルのインスタンスタイプは、CPU 使用率が低いものの、特定のシナリオで変動する可能性のあるビジネスシナリオに適しています。詳細については、「概要」をご参照ください。

LoadBalancerWeight

Integer

いいえ

はい

バックエンドサーバーとして機能する Elastic Container Instance の重み。

有効な値: 1 ~ 100。

Memory

Number

いいえ

はい

コンテナのメモリサイズ。

なし。

NtpServers

List

いいえ

はい

ネットワーク タイム プロトコル (NTP) サーバー。

なし。

ResourceGroupId

String

いいえ

はい

リソースグループの ID。

なし。

RamRoleName

String

いいえ

はい

Elastic Container Instance の Resource Access Management (RAM) ロールの名前。

Elastic Container Instance と ECS インスタンスは同じ RAM ロールを共有します。詳細については、「インスタンス RAM ロール」をご参照ください。

RestartPolicy

String

いいえ

はい

Elastic Container Instance の再起動ポリシー。

有効な値:

  • Never: Elastic Container Instance は再起動されません。

  • Always: Elastic Container Instance は常に再起動されます。

  • OnFailure: Elastic Container Instance は障害時に再起動されます。

SpotPriceLimit

Number

いいえ

はい

プリエンプティブルインスタンスの 1 時間あたりの最大価格。

このプロパティは、SpotStrategy が SpotWithPriceLimit に設定されている場合にのみ返されます。

SpotStrategy

String

いいえ

はい

Elastic Container Instance のプリエンプションポリシー。

有効な値:

  • NoSpot: Elastic Container Instance は通常の従量課金インスタンスとして作成されます。

  • SpotWithPriceLimit: Elastic Container Instance は、ユーザー定義の 1 時間あたりの最大価格を持つプリエンプティブルインスタンスとして作成されます。

  • SpotAsPriceGo: Elastic Container Instance は、購入時の市場価格に基づいて入札価格が設定されるプリエンプティブルインスタンスとして作成されます。

SecurityContextSysctls

List

いいえ

はい

Elastic Container Instance が実行される Security Context に関するシステム情報。

なし。

Tags

List

いいえ

はい

Elastic Container Instance のタグ。タグはキーと値のペアの形式です。

詳細については、「タグのプロパティ」をご参照ください。

TerminationGracePeriodSeconds

Integer

いいえ

はい

プログラムのバッファ時間。

プログラムが停止する前に操作を処理するバッファ時間。

Volumes

List

いいえ

はい

ボリュームに関する情報。

詳細については、「ボリュームのプロパティ」をご参照ください。

コンテナの構文

"Containers": [
  {
    "EnvironmentVars": List,
    "ReadinessProbeExecCommands": List,
    "Memory": Number,
    "ReadinessProbeTcpSocketPort": Integer,
    "Cpu": Number,
    "ReadinessProbeHttpGetPath": String,
    "ReadinessProbeHttpGetScheme": String,
    "Image": String,
    "Gpu": Integer,
    "StdinOnce": Boolean,
    "Name": String,
    "LivenessProbeHttpGetScheme": String,
    "LivenessProbeTimeoutSeconds": Integer,
    "LivenessProbeFailureThreshold": Integer,
    "LivenessProbeHttpGetPath": String,
    "VolumeMounts": List,
    "LivenessProbeInitialDelaySeconds": Integer,
    "SecurityContextRunAsUser": Integer,
    "LivenessProbeTcpSocketPort": Integer,
    "Commands": List,
    "Tty": Boolean,
    "ReadinessProbePeriodSeconds": Integer,
    "LivenessProbePeriodSeconds": Integer,
    "LivenessProbeExecCommands": List,
    "LivenessProbeSuccessThreshold": Integer,
    "ReadinessProbeSuccessThreshold": Integer,
    "ReadinessProbeInitialDelaySeconds": Integer,
    "Args": List,
    "ReadinessProbeFailureThreshold": Integer,
    "SecurityContextCapabilitiesAdd": List,
    "Ports": List,
    "ReadinessProbeHttpGetPort": Integer,
    "Stdin": Boolean,
    "WorkingDir": String,
    "ImagePullPolicy": String,
    "LivenessProbeHttpGetPort": Integer,
    "ReadinessProbeTimeoutSeconds": Integer
  }
]

コンテナのプロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

EnvironmentVars

List

いいえ

はい

環境変数。

詳細については、「InitContainerEnvironmentVars プロパティ」をご参照ください。

ReadinessProbeExecCommands

List

いいえ

はい

コンテナ内で実行され、readiness プローブを実行するコマンド。

なし。

Memory

Number

いいえ

はい

メモリサイズ。

なし。

ReadinessProbeTcpSocketPort

Integer

いいえ

はい

readiness プローブ用の TCP ソケットのポート。

なし。

Cpu

Number

いいえ

はい

コンテナの vCPU 数。

なし。

ReadinessProbeHttpGetPath

String

いいえ

はい

システムが readiness プローブの HTTP GET リクエストを送信するパス。

なし。

ReadinessProbeHttpGetScheme

String

いいえ

はい

readiness プローブの HTTP GET リクエストのプロトコルタイプ。

有効な値:

  • HTTP

  • HTTPS

Image

String

はい

はい

コンテナイメージ。

なし。

Gpu

Integer

いいえ

はい

コンテナの GPU 数。

なし。

StdinOnce

Boolean

いいえ

はい

セッション維持機能を有効にするかどうかを指定します。

Stdin が true に設定されている場合、標準入力ストリームは複数の接続セッションで開いたままになります。

StdinOnce が true に設定されている場合、標準入力ストリームはコンテナの起動時に開き、最初のクライアントが接続されるまで空になり、クライアントが切断されるまでデータを受信するために開いたままになります。クライアントが切断されると、標準入力ストリームは閉じられ、コンテナが再起動されるまで閉じたままになります。

Name

String

はい

はい

コンテナのカスタム名。

なし。

LivenessProbeHttpGetScheme

String

いいえ

はい

liveness プローブの HTTP GET リクエストのプロトコルタイプ。

有効な値:

  • HTTP

  • HTTPS

LivenessProbeTimeoutSeconds

Integer

いいえ

はい

liveness プローブのタイムアウト期間。

デフォルト値: 1。最小値: 1。単位: 秒。

LivenessProbeFailureThreshold

Integer

いいえ

はい

正常な liveness プローブが失敗したと宣言されるまでに連続して失敗する必要がある回数。

デフォルト値: 3。

LivenessProbeHttpGetPath

String

いいえ

はい

システムが liveness プローブの HTTP GET リクエストを送信するパス。

なし。

VolumeMounts

List

いいえ

はい

マウントするボリューム。

詳細については、「InitContainerVolumeMounts プロパティ」をご参照ください。

LivenessProbeInitialDelaySeconds

Integer

いいえ

はい

コンテナが起動してから liveness プローブが開始されるまでの期間。

なし。

SecurityContextRunAsUser

Integer

いいえ

はい

コンテナを実行するユーザーの ID。

なし。

LivenessProbeTcpSocketPort

Integer

いいえ

はい

readiness プローブ用の TCP ソケットのポート。

なし。

Commands

List

いいえ

はい

コンテナの起動コマンド。

最大 20 個のコマンドを指定できます。各コマンドの長さは最大 256 文字です。詳細については、「コマンドプロパティ」をご参照ください。

Tty

Boolean

いいえ

はい

対話機能を有効にするかどうかを指定します。

有効な値:

  • true

  • false

ReadinessProbePeriodSeconds

Integer

いいえ

はい

システムが readiness プローブを実行する間隔。

デフォルト値: 10。最小値: 1。単位: 秒。

LivenessProbePeriodSeconds

Integer

いいえ

はい

システムが liveness プローブを実行する間隔。

デフォルト値: 10。最小値: 1。単位: 秒。

LivenessProbeExecCommands

List

いいえ

はい

liveness プローブを実行するために実行されるコマンド。

コマンドはコンテナ内で実行されます。

LivenessProbeSuccessThreshold

Integer

いいえ

はい

失敗した liveness プローブが正常であると宣言されるまでに連続して成功する必要がある回数。

デフォルト値: 1。値を 1 に設定します。

ReadinessProbeSuccessThreshold

Integer

いいえ

はい

失敗した readiness プローブが正常であると宣言されるまでに連続して成功する必要がある回数。

デフォルト値: 1。値を 1 に設定します。

ReadinessProbeInitialDelaySeconds

Integer

いいえ

はい

スケールアウトまたはスケールイン操作のクールダウン期間。

有効な値: 0 ~ 3600。単位: 秒。デフォルト値: 0。

Args

List

いいえ

はい

コンテナの起動コマンドに対応する引数。

最大 10 個の引数を指定できます。

ReadinessProbeFailureThreshold

Integer

いいえ

はい

正常な readiness プローブが失敗したと宣言されるまでに連続して失敗する必要がある回数。

デフォルト値: 3。

SecurityContextCapabilitiesAdd

List

いいえ

はい

初期化コンテナ内のプロセスに付与する権限。

有効な値:

  • NET_ADMIN

  • NET_RAW

Ports

List

いいえ

はい

公開するポートとプロトコル。

詳細については、「ポートのプロパティ」をご参照ください。

ReadinessProbeHttpGetPort

Integer

いいえ

はい

readiness プローブの HTTP GET リクエストのポート。

なし。

Stdin

Boolean

いいえ

はい

コンテナがコンテナランタイムの標準入力ストリームにバッファを割り当てることができるかどうかを指定します。

このプロパティを指定しない場合、ファイルの終わり (EOF) エラーが発生します。

デフォルト値: false。

WorkingDir

String

いいえ

はい

作業ディレクトリ。

なし。

ImagePullPolicy

String

いいえ

はい

イメージプルポリシー。

なし。

LivenessProbeHttpGetPort

Integer

いいえ

はい

liveness プローブの HTTP GET リクエストのポート。

なし。

ReadinessProbeTimeoutSeconds

Integer

いいえ

はい

readiness プローブのタイムアウト期間。

デフォルト値: 1。最小値: 1。単位: 秒。

InitContainerEnvironmentVars 構文

"InitContainerEnvironmentVars": [
  {
    "Value": String,
    "Key": String
  }
]

InitContainerEnvironmentVars プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Value

String

いいえ

はい

環境変数の値。

なし。

Key

String

いいえ

はい

環境変数のキー。

なし。

InitContainerVolumeMounts 構文

"InitContainerVolumeMounts": [
  {
    "ReadOnly": Boolean,
    "MountPath": String,
    "SubPath": String,
    "MountPropagation": String,
    "Name": String
  }
]

InitContainerVolumeMounts プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

ReadOnly

Boolean

いいえ

はい

ボリュームが読み取り専用かどうかを指定します。

なし。

MountPath

String

いいえ

はい

コンテナのマウントディレクトリ。

このディレクトリ内のデータは、ボリューム上のデータによって上書きされます。このプロパティを指定する際は注意してください。

SubPath

String

いいえ

はい

ボリュームのサブディレクトリ。

このプロパティを使用して、同じボリュームのサブディレクトリをポッド内のコンテナのディレクトリにマウントできます。

MountPropagation

String

いいえ

はい

ボリュームのマウント伝播設定。

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

  • None: ボリュームマウントは、このボリュームまたはこのボリュームのサブディレクトリで後続に実行されるマウントを受信しません。

  • HostToCotainer: ボリュームマウントは、このボリュームまたはこのボリュームのサブディレクトリで後続に実行されるマウントを受信します。

  • Bidirectional: この値は HostToCotainer に似ています。ボリュームマウントは、このボリュームまたはこのボリュームのサブディレクトリで後続に実行されるマウントを受信します。さらに、コンテナで実行されるすべてのボリュームマウントはホストに伝播され、同じボリュームを使用するすべてのポッドのすべてのコンテナに伝播されます。

Name

String

はい

はい

マウントするボリュームの名前。

なし。

HostAliases 構文

"HostAliases": [
  {
    "Ip": String,
    "Hostnames": List
  }
]

HostAliases プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

IP アドレス

文字列

はい

はい

IP アドレス。

なし。

Hostnames

List

いいえ

はい

ホスト名。

なし。

SecurityContextSysctls 構文

"SecurityContextSysctls": [
  {
    "Value": String,
    "Name": String
  }
]

SecurityContextSysctls プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Name

String

はい

はい

Elastic Container Instance が実行される Security Context のシステム名。

なし。

Value

String

いいえ

はい

Elastic Container Instance が実行される Security Context の変数値。

なし。

ImageRegistryCredentials 構文

"ImageRegistryCredentials": [
  {
    "UserName": String,
    "Server": String,
    "Password": String
  }
]

ImageRegistryCredentials プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

UserName

String

はい

はい

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

なし。

Server

String

はい

はい

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

なし。

Password

String

はい

はい

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

なし。

タグの構文

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

タグのプロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Key

String

はい

はい

タグのキー。

なし。

Value

String

いいえ

はい

タグの値。

なし。

ボリュームの構文

"Volumes": [
  {
    "HostPathVolumeType": String,
    "EmptyDirVolumeSizeLimit": String,
    "FlexVolumeFsType": String,
    "NFSVolumeServer": String,
    "DiskVolumeDiskSize": Integer,
    "ConfigFileVolumeConfigFileToPaths": List,
    "Name": String,
    "NFSVolumeReadOnly": Boolean,
    "HostPathVolumePath": String,
    "NFSVolumePath": String,
    "Type": String,
    "FlexVolumeDriver": String,
    "DiskVolumeDiskId": String,
    "ConfigFileVolumeDefaultMode": Integer,
    "FlexVolumeOptions": String,
    "EmptyDirVolumeMedium": String
  }
]

ボリュームのプロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

HostPathVolumeType

String

いいえ

はい

hostPath ボリュームのタイプ。

なし。

EmptyDirVolumeSizeLimit

String

いいえ

はい

emptyDir ボリュームのサイズ。

なし。

FlexVolumeFsType

String

いいえ

はい

マウントするファイルシステムのタイプ。

なし。

NFSVolumeServer

String

いいえ

はい

ネットワーク ファイル システム (NFS) サーバーのアドレス。

なし。

DiskVolumeDiskSize

Integer

いいえ

はい

ディスクボリュームのサイズ。

単位: GiB。

ConfigFileVolumeConfigFileToPaths

List

いいえ

はい

ConfigFile ボリュームのパス。

詳細については、「ConfigFileVolumeConfigFileToPaths プロパティ」をご参照ください。

Name

String

はい

はい

ボリュームの名前。

なし。

NFSVolumeReadOnly

Boolean

いいえ

はい

NFS ボリュームが読み取り専用かどうかを指定します。

なし。

HostPathVolumePath

String

いいえ

はい

ホスト上の hostPath ボリュームのパス。

なし。

NFSVolumePath

String

いいえ

はい

NFS ボリュームのパス。

なし。

Type

String

はい

はい

ボリュームのタイプ。

有効な値:

  • EmptyDirVolume: emptyDir ボリューム。

  • NFSVolume: NFS ボリューム。

  • ConfigFileVolume: ConfigFile ボリューム。

  • FlexVolume: FlexVolume を使用してマウントされたボリューム。

FlexVolumeDriver

String

いいえ

はい

FlexVolume ドライバーの名前。

なし。

DiskVolumeDiskId

String

いいえ

はい

ディスクボリュームの ID。

単位: GiB。

ConfigFileVolumeDefaultMode

Integer

いいえ

はい

ConfigFile ボリュームのデフォルト権限。

なし。

FlexVolumeOptions

String

いいえ

はい

FlexVolume オプション。

オプションは JSON 形式のキーと値のペアです。

たとえば、FlexVolume を使用してクラウドディスクをマウントする場合、{"volumeId":"d-2zehdahrwoa7srg****","performanceLevel": "PL2"} 形式でこのプロパティの値を指定します。

EmptyDirVolumeMedium

String

いいえ

はい

emptyDir ボリュームの記憶媒体。

デフォルトでは、このプロパティは空で、ノードファイルシステムが使用されます。このプロパティは memory に設定できます。値 memory は、メモリが使用されることを指定します。

ConfigFileVolumeConfigFileToPaths 構文

"ConfigFileVolumeConfigFileToPaths": [
  {
    "Path": String,
    "Content": String,
    "Mode": Integer
  }
]

ConfigFileVolumeConfigFileToPaths プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Path

String

はい

はい

構成ファイルの相対パス。

なし。

Content

String

いいえ

はい

構成ファイルの内容。

なし。

Mode

Integer

いいえ

いいえ

ConfigFile ボリュームのディレクトリの権限。

なし。

ポートの構文

"Ports": [
  {
    "Port": Integer,
    "Protocol": String
  }
]

ポートのプロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Port

Integer

はい

はい

ポート。

有効な値: 1 ~ 65535。

Protocol

String

はい

はい

プロトコルのタイプ。

有効な値:

  • TCP

  • UDP

戻り値

Fn::GetAtt

ScalingConfigurationId: スケーリング設定の ID。

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SecurityGroupId:
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    Required: true
    Type: String
    Description:
      en: |-
        The ID of the security group with which you want to associate the elastic container instance. Elastic container instances that are associated with the same security group can access each other.
        If you do not specify a security group, the system uses the default security group in the region that you selected. Make sure that the inbound rules of the security group contain the protocols and the port numbers of the containers that you want to expose. If you do not have a default security group in the region, the system creates a default security group and adds the declared container protocols and port numbers to the inbound rules of the security group.
  ContainerGroupName:
    Required: true
    Type: String
    Description:
      en: The name of the elastic container instance.
  ScalingConfigurationName:
    Required: true
    Type: String
    Description:
      en: |-
        The name of the scaling configuration. The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). The name must start with a letter or a digit.
        The name of the scaling configuration must be unique in a region. If you do not specify this parameter, the scaling configuration ID is used.
  ScalingGroupId:
    AssociationProperty: ALIYUN::ESS::AutoScalingGroup::AutoScalingGroupId
    Required: true
    Type: String
    Description:
      en: The ID of the scaling group for which you want to create the scaling configuration.
Resources:
  EciScalingConfiguration:
    Type: ALIYUN::ESS::EciScalingConfiguration
    Properties:
      Containers:
        - LivenessProbeHttpGetPath: ''
          Name: container-1
          Image: registry-vpc.cn-shenzhen.aliyuncs.com/eci_open/nginx:1.14.2-alpine
          Memory: 0
          WorkingDir: ''
          LivenessProbeHttpGetScheme: HTTP
          ReadinessProbeHttpGetScheme: HTTP
          ReadinessProbeHttpGetPath: ''
          ImagePullPolicy: IfNotPresent
          Gpu: 0
          Cpu: 0
      SecurityGroupId:
        Ref: SecurityGroupId
      ScalingGroupId:
        Ref: ScalingGroupId
      ScalingConfigurationName:
        Ref: ScalingConfigurationName
      ContainerGroupName:
        Ref: ContainerGroupName
Outputs:
  ScalingConfigurationId:
    Description: The ID of the elastic container instance.
    Value:
      Fn::GetAtt:
        - EciScalingConfiguration
        - ScalingConfigurationId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SecurityGroupId": {
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "Required": true,
      "Type": "String",
      "Description": {
        "en": "The ID of the security group with which you want to associate the elastic container instance. Elastic container instances that are associated with the same security group can access each other.\nIf you do not specify a security group, the system uses the default security group in the region that you selected. Make sure that the inbound rules of the security group contain the protocols and the port numbers of the containers that you want to expose. If you do not have a default security group in the region, the system creates a default security group and adds the declared container protocols and port numbers to the inbound rules of the security group."
      }
    },
    "ContainerGroupName": {
      "Required": true,
      "Type": "String",
      "Description": {
        "en": "The name of the elastic container instance."
      }
    },
    "ScalingConfigurationName": {
      "Required": true,
      "Type": "String",
      "Description": {
        "en": "The name of the scaling configuration. The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). The name must start with a letter or a digit.\nThe name of the scaling configuration must be unique in a region. If you do not specify this parameter, the scaling configuration ID is used."
      }
    },
    "ScalingGroupId": {
      "AssociationProperty": "ALIYUN::ESS::AutoScalingGroup::AutoScalingGroupId",
      "Required": true,
      "Type": "String",
      "Description": {
        "en": "The ID of the scaling group for which you want to create the scaling configuration."
      }
    }
  },
  "Resources": {
    "EciScalingConfiguration": {
      "Type": "ALIYUN::ESS::EciScalingConfiguration",
      "Properties": {
        "Containers": [
          {
            "LivenessProbeHttpGetPath": "",
            "Name": "container-1",
            "Image": "registry-vpc.cn-shenzhen.aliyuncs.com/eci_open/nginx:1.14.2-alpine",
            "Memory": 0,
            "WorkingDir": "",
            "LivenessProbeHttpGetScheme": "HTTP",
            "ReadinessProbeHttpGetScheme": "HTTP",
            "ReadinessProbeHttpGetPath": "",
            "ImagePullPolicy": "IfNotPresent",
            "Gpu": 0,
            "Cpu": 0
          }
        ],
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "ScalingGroupId": {
          "Ref": "ScalingGroupId"
        },
        "ScalingConfigurationName": {
          "Ref": "ScalingConfigurationName"
        },
        "ContainerGroupName": {
          "Ref": "ContainerGroupName"
        }
      }
    }
  },
  "Outputs": {
    "ScalingConfigurationId": {
      "Description": "Elastic Container Instance の ID。",
      "Value": {
        "Fn::GetAtt": [
          "EciScalingConfiguration",
          "ScalingConfigurationId"
        ]
      }
    }
  }
}