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

Resource Orchestration Service:ALIYUN::ECS::SecurityGroup

最終更新日:Feb 06, 2026

ALIYUN::ECS::SecurityGroup リソースは、セキュリティグループの作成に使用されます。

構文

{
  "Type": "ALIYUN::ECS::SecurityGroup",
  "Properties": {
    "VpcId": String,
    "Description": String,
    "SecurityGroupName": String,
    "Tags": List,
    "SecurityGroupEgress": List,
    "SecurityGroupIngress": List,
    "ResourceGroupId": String,
    "SecurityGroupType": String
  }
}

プロパティ

プロパティ名

必須

更新可能

説明

制約

ResourceGroupId

String

いいえ

はい

セキュリティグループが属するリソースグループの ID です。

なし

VpcId

String

いいえ

いいえ

VPC の ID です。

なし

Description

String

いいえ

いいえ

セキュリティグループの説明です。

長さは 2~256 文字です。

Tags

List

いいえ

はい

セキュリティグループのタグです。

最大 20 個のタグをサポートします。

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

SecurityGroupName

String

いいえ

いいえ

セキュリティグループの名前です。

指定しない場合、値は空になります。デフォルト値は空です。

  • 長さは 2~128 文字です。

  • 英字または漢字で始める必要があります。「http://」または「https://」で始めてはいけません。

  • 英字、漢字、数字、ピリオド (.)、アンダースコア (_)、ハイフン (-) を使用できます。

SecurityGroupEgress

List

いいえ

はい

セキュリティグループの送信ルールです。

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

SecurityGroupIngress

List

いいえ

はい

セキュリティグループの受信ルールです。

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

SecurityGroupType

String

いいえ

いいえ

セキュリティグループのタイプです。

有効値:

  • normal:基本セキュリティグループ。

  • enterprise:高度セキュリティグループ。

Tags の構文

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

Tags のプロパティ

プロパティ名

必須

更新可能

説明

制約

Key

String

はい

いいえ

タグキーです。

長さは 1~128 文字です。aliyun または acs: で始まることはできません。http:// または https:// を含むことはできません。

Value

String

いいえ

いいえ

タグ値です。

長さは 0~128 文字です。aliyun または acs: で開始することはできません。http:// または https:// を含むことはできません。

SecurityGroupEgress の構文

"SecurityGroupEgress": [
  {
    "Description": String,
    "PortRange": String,
    "NicType": String,
    "Priority": Integer,
    "DestGroupId": String,
    "DestCidrIp": String,
    "Policy": String,
    "IpProtocol": String,
    "DestGroupOwnerId": String,
    "Ipv6DestCidrIp": String,
    "DestPrefixListId": String,
    "SourcePortRange": String,
    "Ipv6SourceCidrIp": String,
    "SourceCidrIp": String,
    "DestGroupOwnerAccount": String
  }
]

SecurityGroupEgress のプロパティ

プロパティ名

必須

更新可能

説明

制約

Description

String

いいえ

はい

セキュリティグループルールの説明です。

長さは 1~512 文字です。

DestGroupOwnerId

String

いいえ

いいえ

アカウント間でセキュリティグループルールを設定する際の、宛先セキュリティグループの Alibaba Cloud アカウント ID です。

`DestGroupOwnerId` を設定しない場合、他のセキュリティグループへのアクセス権限を設定するものとみなされます。`DestCidrIp` パラメーターを設定した場合、`DestGroupOwnerId` パラメーターは無効になります。

IpProtocol

String

はい

いいえ

IP プロトコルです。

有効値:

  • tcp

  • udp

  • icmp

  • gre

  • all:4つすべてのプロトコルをサポートします。

PortRange

String

はい

いいえ

IP プロトコルに関連するポート範囲です。

宛先セキュリティグループが開くトランスポート層プロトコルに関連するポート範囲です。有効値:

  • TCP/UDP プロトコル:1~65,535。開始ポートと終了ポートをスラッシュ (/) で区切ります。

    • 正しい例:1/200。

    • 誤った例:200/1。

  • ICMP プロトコル:-1/-1。

  • GRE プロトコル:-1/-1。

  • all:-1/-1。

NicType

String

いいえ

いいえ

ネットワークタイプです。

有効値:

  • internet (デフォルト値)

  • intranet

VPC セキュリティグループルールの場合、NIC タイプを設定する必要はありません。デフォルト値は `intranet` であり、`intranet` のみ指定可能です。

セキュリティグループ間の相互アクセスを設定する場合、つまり `DestGroupId` パラメーターのみを指定する場合、値は `intranet` のみ指定可能です。

デフォルト値:internet。

DestPrefixListId

String

いいえ

いいえ

送信アクセス権限を設定する宛先プレフィックスリストの ID です。

Alibaba Cloud サービス ECS の `DescribePrefixLists` インターフェイスを呼び出して、利用可能なプレフィックスリスト ID をクエリします。

セキュリティグループのネットワークタイプがクラシックネットワークの場合、プレフィックスリストはサポートされません。

`DestCidrIp`、`Ipv6DestCidrIp`、または `DestGroupId` パラメーターのいずれかを指定した場合、このパラメーターは無視されます。

Priority

Integer

いいえ

いいえ

権限付与ポリシーの優先度です。

有効値:1~100。

デフォルト値:1。

DestGroupId

String

いいえ

いいえ

同じリージョン内の宛先セキュリティグループの ID です。

`DestGroupId` または `DestCidrIp` パラメーターのいずれかを指定します。

  • 両方を指定した場合、デフォルトで `DestCidrIp` が承認されます。

  • このパラメーターを指定し、`DestCidrIp` を指定しない場合、`NicType` は `intranet` のみ指定可能です。

DestCidrIp

String

いいえ

いいえ

宛先 IP アドレス範囲です。

IP アドレス範囲を CIDR 形式で指定します。

デフォルト値:0.0.0.0/0 (制限なし)。

その他のサポートされる形式 (例:10.159.XX.XX/12)。

最大 10 個の IP アドレスまたは CIDR ブロックをカンマ (,) で区切ります。

説明

IPv4 のみがサポートされています。

Policy

String

いいえ

いいえ

権限付与ポリシーです。

有効値:

  • accept (デフォルト値):アクセスを許可します。

  • drop:アクセスを拒否します。

Ipv6DestCidrIp

String

いいえ

いいえ

宛先 IPv6 CIDR ブロックです。

CIDR および IPv6 形式の IP アドレス範囲をサポートします。VPC タイプの IP アドレスのみをサポートします。

SourcePortRange

String

いいえ

いいえ

セキュリティグループが開くトランスポート層プロトコルに関連するソースポート範囲です。

有効値:

  • TCP/UDP プロトコル:1~65,535。開始ポートと終了ポートをスラッシュ (/) で区切ります。例:1/200。

  • ICMP プロトコル:-1/-1。

  • GRE プロトコル:-1/-1。

  • ALL:-1/-1。

5タプルルールについては、「セキュリティグループの5タプルルール」をご参照ください。

Ipv6SourceCidrIp

String

いいえ

いいえ

ソース IPv6 CIDR ブロックです。

CIDR および IPv6 形式の IP アドレス範囲をサポートします。

5タプルルールについては、「セキュリティグループの5タプルルール」をご参照ください。

説明

このパラメーターは、IPv6 が有効な VPC 内の ECS インスタンスでのみ有効です。このパラメーターと DestCidrIp パラメーターを同時に設定しないでください。

SourceCidrIp

String

いいえ

いいえ

ソース IPv4 CIDR ブロックです。

CIDR および IPv4 形式の IP アドレス範囲をサポートします。

5タプルルールについては、「セキュリティグループの5タプルルール」をご参照ください。

DestGroupOwnerAccount

String

いいえ

いいえ

宛先セキュリティグループが属する Alibaba Cloud アカウントです。

  • DestGroupOwnerAccountDestGroupOwnerId のどちらも設定されていない場合、システムは他のセキュリティグループのアクセス権限を取り消します。

  • DestCidrIp パラメーターを設定すると、DestGroupOwnerAccount パラメーターは無効になります。

SecurityGroupIngress の構文

"SecurityGroupIngress": [
  {
    "SourceGroupOwnerId": String,
    "Description": String,
    "PortRange": String,
    "NicType": String,
    "Ipv6SourceCidrIp": String,
    "Priority": Integer,
    "SourceGroupId": String,
    "Policy": String,
    "IpProtocol": String,
    "SourcePortRange": String,
    "SourceCidrIp": String,
    "SourcePrefixListId": String,
    "Ipv6DestCidrIp": String,
    "SourceGroupOwnerAccount": String,
    "DestCidrIp": String
  }
]

SecurityGroupIngress のプロパティ

プロパティ名

必須

更新可能

説明

制約

SourceGroupOwnerId

String

いいえ

いいえ

ソースセキュリティグループの Alibaba Cloud アカウント ID です。

なし

Description

String

いいえ

はい

セキュリティグループルールの説明です。

長さは 1~512 文字です。

SourcePrefixListId

String

いいえ

いいえ

受信アクセス権限を設定するソースプレフィックスリストの ID です。

Alibaba Cloud サービス ECS の `DescribePrefixLists` インターフェイスを呼び出して、利用可能なプレフィックスリスト ID をクエリします。

セキュリティグループのネットワークタイプがクラシックネットワークの場合、プレフィックスリストはサポートされません。

`SourceCidrIp`、`Ipv6DestCidrIp`、または `DestGroupId` パラメーターのいずれかを指定した場合、システムはこのパラメーターを無視します。

IpProtocol

String

はい

いいえ

IP プロトコルです。

有効値:

  • tcp

  • udp

  • icmp

  • gre

  • all:4つすべてのプロトコルをサポートします。

PortRange

String

はい

いいえ

IP プロトコルに関連するポート範囲です。

宛先セキュリティグループが開くトランスポート層プロトコルに関連するポート範囲です。有効値:

  • TCP/UDP プロトコル:1~65,535。開始ポートと終了ポートをスラッシュ (/) で区切ります。

    • 正しい例:1/200。

    • 誤った例:200/1。

  • ICMP プロトコル:-1/-1。

  • GRE プロトコル:-1/-1。

  • all:-1/-1。

SourceGroupId

String

いいえ

いいえ

同じリージョン内のソースセキュリティグループの ID です。

`SourceGroupId` または `SourceCidrIp` パラメーターのいずれかを指定します。

両方を指定した場合、デフォルトで `SourceCidrIp` が承認されます。

このパラメーターを指定し、`SourceCidrIp` を指定しない場合、`NicType` は `intranet` のみ指定可能です。

NicType

String

いいえ

いいえ

ネットワークタイプです。

有効値:

  • internet (デフォルト値)

  • intranet

Priority

Integer

いいえ

いいえ

権限付与ポリシーの優先度です。

有効値:1~100。

デフォルト値:1。

SourceCidrIp

String

いいえ

いいえ

ソース IP アドレス範囲です。

IP アドレス範囲を CIDR 形式で指定します。

デフォルト値:0.0.0.0/0 (制限なし)。

その他のサポートされる形式 (例:10.159.XX.XX/12)。

最大 10 個の IP アドレスまたは CIDR ブロックをカンマ (,) で区切ります。

説明

IPv4 のみがサポートされています。

Policy

String

いいえ

いいえ

権限付与ポリシーです。

有効値:

  • accept (デフォルト値):アクセスを許可します。

  • drop:アクセスを拒否します。

SourcePortRange

String

いいえ

いいえ

ソースセキュリティグループで開かれているトランスポート層プロトコルのポート範囲です。

有効値:

  • TCP/UDP プロトコル:1~65,535。開始ポートと終了ポートをスラッシュ (/) で区切ります。

    • 正しい例:1/200。

    • 誤った例:200/1。

  • ICMP プロトコル:-1/-1。

  • GRE プロトコル:-1/-1。

  • IpProtocol が all に設定されている場合:-1/-1。

Ipv6SourceCidrIp

String

いいえ

いいえ

ソース IPv6 CIDR ブロックです。

VPC タイプの IP アドレスのみをサポートします。CIDR および IPv6 形式の IP アドレス範囲をサポートします。

Ipv6DestCidrIp

String

いいえ

いいえ

宛先 IPv6 CIDR ブロックです。

CIDR および IPv6 形式の IP アドレス範囲をサポートします。

説明

このパラメーターは、IPv6 が有効な VPC 内の ECS インスタンスでのみ有効です。このパラメーターと DestCidrIp パラメーターを同時に設定しないでください。

SourceGroupOwnerAccount

String

いいえ

いいえ

ソースセキュリティグループが属する Alibaba Cloud アカウントです。

  • SourceGroupOwnerAccountSourceGroupOwnerIdも設定されていない場合、システムは、お客様ご自身の他のセキュリティグループに対するアクセス権限を設定しているものとみなします。

  • SourceCidrIp パラメーターを設定すると、SourceGroupOwnerAccount パラメーターは無効になります。

DestCidrIp

String

いいえ

いいえ

宛先 IPv4 CIDR ブロックです。

CIDR および IPv4 形式の IP アドレス範囲をサポートします。

5タプルルールについては、「セキュリティグループの5タプルルール」をご参照ください。

戻り値

Fn::GetAtt

  • SecurityGroupId:セキュリティグループの ID。

  • SecurityGroupName:セキュリティグループの名前。

シナリオ 1:既存の VPC に基本セキュリティグループを作成する。

クイック作成

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  SecurityGroup:
    Type: ALIYUN::ECS::SecurityGroup
    Properties:
      SecurityGroupIngress:
        - PortRange: 22/22
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
        - PortRange: 80/80
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
      SecurityGroupType: normal
      VpcId:
        Ref: VpcId
      SecurityGroupEgress:
        - PortRange: 443/443
          DestCidrIp: 0.0.0.0/0
          IpProtocol: tcp
      SecurityGroupName: TestSecurityGroupName
Parameters:
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Label:
      zh-cn: 现有 VPC 实例 ID
      en: 既存の VPC インスタンス ID
Outputs:
  SecurityGroupId:
    Description: generated security group id for security group.
    Value:
      Fn::GetAtt:
        - SecurityGroup
        - SecurityGroupId
  SecurityGroupName:
    Description: The name of security group.
    Value:
      Fn::GetAtt:
        - SecurityGroup
        - SecurityGroupName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "SecurityGroup": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": {
        "SecurityGroupIngress": [
          {
            "PortRange": "22/22",
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          },
          {
            "PortRange": "80/80",
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          }
        ],
        "SecurityGroupType": "normal",
        "VpcId": {
          "Ref": "VpcId"
        },
        "SecurityGroupEgress": [
          {
            "PortRange": "443/443",
            "DestCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          }
        ],
        "SecurityGroupName": "TestSecurityGroupName"
      }
    }
  },
  "Parameters": {
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Label": {
        "zh-cn": "现有 VPC 实例 ID",
        "en": "既存の VPC インスタンス ID"
      }
    }
  },
  "Outputs": {
    "SecurityGroupId": {
      "Description": "generated security group id for security group.",
      "Value": {
        "Fn::GetAtt": [
          "SecurityGroup",
          "SecurityGroupId"
        ]
      }
    },
    "SecurityGroupName": {
      "Description": "The name of security group.",
      "Value": {
        "Fn::GetAtt": [
          "SecurityGroup",
          "SecurityGroupName"
        ]
      }
    }
  }
}

シナリオ 2:既存の VPC に高度セキュリティグループを作成する。

クイック作成

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  SecurityGroup:
    Type: ALIYUN::ECS::SecurityGroup
    Properties:
      SecurityGroupIngress:
        - PortRange: 22/22
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
        - PortRange: 80/80
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
      SecurityGroupType: enterprise
      VpcId:
        Ref: VpcId
      SecurityGroupEgress:
        - PortRange: 443/443
          DestCidrIp: 0.0.0.0/0
          IpProtocol: tcp
      SecurityGroupName: TestSecurityGroupName
Parameters:
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Label:
      zh-cn: 现有 VPC 实例 ID
      en: 既存の VPC インスタンス ID
Outputs:
  SecurityGroupId:
    Description: generated security group id for security group.
    Value:
      Fn::GetAtt:
        - SecurityGroup
        - SecurityGroupId
  SecurityGroupName:
    Description: The name of security group.
    Value:
      Fn::GetAtt:
        - SecurityGroup
        - SecurityGroupName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "SecurityGroup": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": {
        "SecurityGroupIngress": [
          {
            "PortRange": "22/22",
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          },
          {
            "PortRange": "80/80",
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          }
        ],
        "SecurityGroupType": "enterprise",
        "VpcId": {
          "Ref": "VpcId"
        },
        "SecurityGroupEgress": [
          {
            "PortRange": "443/443",
            "DestCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          }
        ],
        "SecurityGroupName": "TestSecurityGroupName"
      }
    }
  },
  "Parameters": {
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Label": {
        "zh-cn": "现有 VPC 实例 ID",
        "en": "既存の VPC インスタンス ID"
      }
    }
  },
  "Outputs": {
    "SecurityGroupId": {
      "Description": "generated security group id for security group.",
      "Value": {
        "Fn::GetAtt": [
          "SecurityGroup",
          "SecurityGroupId"
        ]
      }
    },
    "SecurityGroupName": {
      "Description": "The name of security group.",
      "Value": {
        "Fn::GetAtt": [
          "SecurityGroup",
          "SecurityGroupName"
        ]
      }
    }
  }
}

シナリオ 3: ECS インスタンスを作成し、セキュリティグループを設定して受信ポート 9966 を開く。

クイック作成

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: ECS インスタンスを作成し、セキュリティグループを設定して受信ポート 9966 を開く。
  en: ECS インスタンスを作成し、セキュリティグループを設定して受信ポート 9966 を開く。
Parameters:
  ZoneId:
    Type: String
    Label:
      en: アベイラビリティゾーン
      zh-cn: ゾーン ID
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
  InstanceType:
    Type: String
    Label:
      en: インスタンスタイプ
      zh-cn: インスタンスタイプ
    AssociationProperty: ALIYUN::ECS::Instance::InstanceType
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
  SystemDiskCategory:
    Type: String
    Label:
      en: システムディスクタイプ
      zh-cn: システムディスクタイプ
    AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
    AssociationPropertyMetadata:
      LocaleKey: DiskCategory
      ZoneId: ${ZoneId}
      InstanceType: ${InstanceType}
      AutoSelectFirst: true
      AutoChangeType: false
    Default: cloud_essd
  InstancePassword:
    Type: String
    NoEcho: true
    Label:
      en: インスタンスパスワード
      zh-cn: インスタンスパスワード
    Description:
      en: サーバーのログインパスワード。長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。
      zh-cn: サーバーのログインパスワード。長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。
    ConstraintDescription:
      en: 長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。
      zh-cn: 長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。
    AssociationPropertyMetadata:
      Visible:
        Condition:
          Fn::Equals:
            - ${SelectInstance}
            - false
    Default: Null
    AssociationProperty: ALIYUN::ECS::Instance::Password
Resources:
  Vpc:
    Type: ALIYUN::ECS::VPC
    Properties:
      CidrBlock: 192.168.0.0/16
  VSwitch:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      ZoneId:
        Ref: ZoneId
      VpcId:
        Ref: Vpc
      CidrBlock: 192.168.0.0/24
  SecurityGroup:
    Type: ALIYUN::ECS::SecurityGroup
    Properties:
      VpcId:
        Ref: Vpc
  SecurityGroupIngress_9966:
    Type: ALIYUN::ECS::SecurityGroupIngress
    Properties:
      SecurityGroupId:
        Ref: SecurityGroup
      SourceCidrIp: 0.0.0.0/0
      IpProtocol: tcp
      NicType: intranet
      PortRange: 9966/9966
  InstanceGroup:
    Type: ALIYUN::ECS::InstanceGroup
    Properties:
      VpcId:
        Ref: Vpc
      VSwitchId:
        Ref: VSwitch
      SecurityGroupId:
        Ref: SecurityGroup
      ImageId: ubuntu_22_04
      InstanceName: ChatTTS
      InstanceType:
        Ref: InstanceType
      SystemDiskCategory:
        Ref: SystemDiskCategory
      Password:
        Ref: InstancePassword
      IoOptimized: optimized
      MaxAmount: 1
Outputs: {}
Metadata: {}
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "ECS インスタンスを作成し、セキュリティグループを設定して受信ポート 9966 を開く。",
    "en": "ECS インスタンスを作成し、セキュリティグループを設定して受信ポート 9966 を開く。"
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Label": {
        "en": "アベイラビリティゾーン",
        "zh-cn": "ゾーン ID"
      },
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
    },
    "InstanceType": {
      "Type": "String",
      "Label": {
        "en": "インスタンスタイプ",
        "zh-cn": "インスタンスタイプ"
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "ZoneId": "${ZoneId}"
      }
    },
    "SystemDiskCategory": {
      "Type": "String",
      "Label": {
        "en": "システムディスクタイプ",
        "zh-cn": "システムディスクタイプ"
      },
      "AssociationProperty": "ALIYUN::ECS::Disk::SystemDiskCategory",
      "AssociationPropertyMetadata": {
        "LocaleKey": "DiskCategory",
        "ZoneId": "${ZoneId}",
        "InstanceType": "${InstanceType}",
        "AutoSelectFirst": true,
        "AutoChangeType": false
      },
      "Default": "cloud_essd"
    },
    "InstancePassword": {
      "Type": "String",
      "NoEcho": true,
      "Label": {
        "en": "インスタンスパスワード",
        "zh-cn": "インスタンスパスワード"
      },
      "Description": {
        "en": "サーバーのログインパスワード。長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。",
        "zh-cn": "サーバーのログインパスワード。長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。"
      },
      "ConstraintDescription": {
        "en": "長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。",
        "zh-cn": "長さは 8~30 文字で、大文字、小文字、数字、特殊記号 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち 3 種類を含める必要があります。"
      },
      "AssociationPropertyMetadata": {
        "Visible": {
          "Condition": {
            "Fn::Equals": [
              "${SelectInstance}",
              false
            ]
          }
        }
      },
      "Default": null,
      "AssociationProperty": "ALIYUN::ECS::Instance::Password"
    }
  },
  "Resources": {
    "Vpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "CidrBlock": "192.168.0.0/16"
      }
    },
    "VSwitch": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "CidrBlock": "192.168.0.0/24"
      }
    },
    "SecurityGroup": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        }
      }
    },
    "SecurityGroupIngress_9966": {
      "Type": "ALIYUN::ECS::SecurityGroupIngress",
      "Properties": {
        "SecurityGroupId": {
          "Ref": "SecurityGroup"
        },
        "SourceCidrIp": "0.0.0.0/0",
        "IpProtocol": "tcp",
        "NicType": "intranet",
        "PortRange": "9966/9966"
      }
    },
    "InstanceGroup": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "VSwitchId": {
          "Ref": "VSwitch"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroup"
        },
        "ImageId": "ubuntu_22_04",
        "InstanceName": "ChatTTS",
        "InstanceType": {
          "Ref": "InstanceType"
        },
        "SystemDiskCategory": {
          "Ref": "SystemDiskCategory"
        },
        "Password": {
          "Ref": "InstancePassword"
        },
        "IoOptimized": "optimized",
        "MaxAmount": 1
      }
    }
  },
  "Outputs": {
  },
  "Metadata": {
  }
}

その他の例については、「このリソースを含むパブリックテンプレート」をご参照ください。