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

Resource Orchestration Service:ALIYUN::VPC::EIP

最終更新日:Feb 07, 2026

ALIYUN::VPC::EIP リソースタイプは、Elastic IP Address (EIP) のリクエストを行います。

構文

{
  "Type": "ALIYUN::VPC::EIP",
  "Properties": {
    "DeletionProtection": Boolean,
    "Name": String,
    "Tags": List,
    "Isp": String,
    "Netmode": String,
    "Period": Number,
    "ResourceGroupId": String,
    "AutoPay": Boolean,
    "InstanceChargeType": String,
    "PricingCycle": String,
    "Bandwidth": Number,
    "InternetChargeType": String,
    "Description": String,
    "SecurityProtectionTypes": List,
    "PublicIpAddressPoolId": String,
    "Zone": String
  }
}

プロパティ

プロパティ名

必須

更新可

説明

制約

DeletionProtection

ブール値

いいえ

はい

削除保護を有効化します。

有効な値:

  • true:削除保護を有効化します。

  • false (デフォルト):削除保護を無効化します。

Name

文字列

いいえ

はい

EIP の名前です。

名前の長さは 2~128 文字である必要があります。先頭は英字で始める必要があります。http:// または https:// で始めてはいけません。英字、数字、ピリオド (.)、アンダースコア (_)、ハイフン (-) を含めることができます。

ResourceGroupId

文字列

いいえ

はい

リソースグループの ID です。

なし

Netmode

文字列

いいえ

いいえ

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

有効な値:public(インターネットを示します)。

Bandwidth

数値

いいえ

はい

EIP の帯域幅です。

このパラメーターを指定しない場合、デフォルト値は 5 Mbps です。

InternetChargeType

文字列

いいえ

いいえ

EIP の課金方法です。

有効な値:

  • PayByBandwidth (デフォルト):帯域幅課金。

  • PayByTraffic:転送量課金。

InstanceChargeType

文字列

いいえ

いいえ

EIP の課金方法です。

有効な値:

  • Prepaid:サブスクリプション。

  • Pay-as-you-go (デフォルト)

PricingCycle

文字列

いいえ

いいえ

サブスクリプション課金サイクルです。

有効な値:

  • Month (デフォルト):月単位課金。

  • Year:年単位課金。

説明

InstanceChargeType を Prepaid に設定した場合、このパラメーターは必須です。

Period

数値

いいえ

いいえ

サブスクリプション期間です。

有効な値:

  • 月単位課金を選択した場合:1~9。

  • 年単位課金を選択した場合:1~3。

デフォルト値:1。

説明

InstanceChargeType を Prepaid に設定した場合、このパラメーターは必須です。

AutoPay

ブール値

いいえ

いいえ

自動支払いを有効化します。

有効な値:

  • false:自動支払いを無効化します。注文が生成された後、注文センターに移動して支払いを完了してください。

    国際版注文センターの詳細については、「注文センター」をご参照ください。

  • true (デフォルト):自動支払いを有効化します。システムが注文を自動的に支払います。

説明

InstanceChargeType を Prepaid に設定した場合、このパラメーターは必須です。

Isp

文字列

いいえ

いいえ

回線タイプです。

有効な値:

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

  • BGP_PRO:BGP (マルチ ISP) Pro。

すべてのリージョンで BGP (マルチ ISP) EIP がサポートされています。BGP (マルチ ISP) Pro EIP は中国 (香港) のみでサポートされています。

Description

文字列

いいえ

はい

EIP の説明です。

説明の長さは 2~256 文字である必要があります。先頭は英字で始める必要があります。http:// または https:// で始めてはいけません。

Tags

リスト

いいえ

はい

タグです。

最大 20 個のタグを追加できます。各タグはキーと値のペアで構成されます。タグ値は空でもかまいません。

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

SecurityProtectionTypes

リスト

いいえ

いいえ

セキュリティ保護レベルです。

有効な値:

  • このパラメーターを空欄のままにした場合、デフォルトで Anti-DDoS (Basic Edition) が使用されます。

  • このパラメーターを AntiDDoS_Enhanced に設定した場合、Anti-DDoS (Enhanced Edition) が使用されます。

説明

最大 10 個のセキュリティ保護レベルを設定できます。

PublicIpAddressPoolId

文字列

いいえ

いいえ

IP アドレスプールの ID です。

EIP はこの IP アドレスプールから割り当てられます。IP アドレスプールは、トライアルアクセスの申請を行ったユーザーのみが閲覧可能です。ご利用になるには、「」および「チケットを送信」してください。

Zone

文字列

いいえ

いいえ

EIP が利用可能なゾーンです。

なし

タグの構文

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

タグのプロパティ

プロパティ名

必須

更新可

説明

制約

Key

文字列

はい

いいえ

タグキーです。

キーの長さは 1~128 文字である必要があります。aliyun または acs: で始めてはいけません。http:// または https:// を含めてはいけません。

Value

文字列

いいえ

いいえ

タグ値です。

値の長さは 0~128 文字である必要があります。aliyun または acs: で始めてはいけません。http:// または https:// を含めてはいけません。

戻り値

Fn::GetAtt

  • EipAddress:割り当てられた EIP。

  • AllocationId:EIP のインスタンス ID。

  • OrderId:注文 ID。これは InstanceChargeType を Prepaid に設定した場合にのみ返されます。

  • Isp:回線タイプ。

シナリオ 1:帯域幅課金方式の EIP を作成する

クイック作成

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ElasticIp:
    Type: ALIYUN::VPC::EIP
    Properties:
      InstanceChargeType: Postpaid
      Name: TestEIP
      InternetChargeType: PayByBandwidth
      Netmode: public
      Bandwidth: 5
Outputs:
  Isp:
    Description: The line type.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - Isp
  AllocationId:
    Description: ID that Aliyun assigns to represent the allocation of the address for use with VPC. Returned only for VPC elastic IP addresses.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - AllocationId
  EipAddress:
    Description: IP address of created EIP.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - EipAddress
  OrderId:
    Description: Order ID of prepaid EIP instance.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - OrderId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ElasticIp": {
      "Type": "ALIYUN::VPC::EIP",
      "Properties": {
        "InstanceChargeType": "Postpaid",
        "Name": "TestEIP",
        "InternetChargeType": "PayByBandwidth",
        "Netmode": "public",
        "Bandwidth": 5
      }
    }
  },
  "Outputs": {
    "Isp": {
      "Description": "The line type.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "Isp"
        ]
      }
    },
    "AllocationId": {
      "Description": "ID that Aliyun assigns to represent the allocation of the address for use with VPC. Returned only for VPC elastic IP addresses.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "AllocationId"
        ]
      }
    },
    "EipAddress": {
      "Description": "IP address of created EIP.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "EipAddress"
        ]
      }
    },
    "OrderId": {
      "Description": "Order ID of prepaid EIP instance.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "OrderId"
        ]
      }
    }
  }
}

シナリオ 2:帯域幅課金方式の EIP を作成し、NAT Gateway にアタッチする

クイック作成

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ZoneId:
    Type: String
    AssociationProperty: ZoneId
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
Resources:
  NatGateway:
    Type: ALIYUN::VPC::NatGateway
    Properties:
      NatGatewayName: example-ngw
      VSwitchId:
        Ref: VSwitchId
      NatType: Enhanced
      VpcId:
        Ref: VpcId
      ZoneId:
        Ref: ZoneId
  Eip:
    Type: ALIYUN::VPC::EIP
    Properties:
      DeletionProtection: false
      Isp: BGP
      Bandwidth: 200
      InternetChargeType: PayByTraffic
  EipAssociation:
    Type: ALIYUN::VPC::EIPAssociation
    Properties:
      InstanceId:
        Ref: NatGateway
      AllocationId:
        Ref: Eip
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "AssociationProperty": "ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      }
    }
  },
  "Resources": {
    "NatGateway": {
      "Type": "ALIYUN::VPC::NatGateway",
      "Properties": {
        "NatGatewayName": "example-ngw",
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "NatType": "Enhanced",
        "VpcId": {
          "Ref": "VpcId"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        }
      }
    },
    "Eip": {
      "Type": "ALIYUN::VPC::EIP",
      "Properties": {
        "DeletionProtection": false,
        "Isp": "BGP",
        "Bandwidth": 200,
        "InternetChargeType": "PayByTraffic"
      }
    },
    "EipAssociation": {
      "Type": "ALIYUN::VPC::EIPAssociation",
      "Properties": {
        "InstanceId": {
          "Ref": "NatGateway"
        },
        "AllocationId": {
          "Ref": "Eip"
        }
      }
    }
  }
}

シナリオ 3:一元的なクラウドインターネットアクセスゲートウェイを確立するために、パブリック向け NAT Gateway を展開する

クイック作成

ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: Create a Virtual Private Cloud (VPC) environment, configure dual-Availability Zone Elastic Compute Service (ECS) instances, and deploy a public-facing NAT Gateway to establish a unified cloud Internet access gateway.
  en: Create a Virtual Private Cloud (VPC) environment, configure dual-Availability Zone Elastic Compute Service (ECS) instances, and deploy a public-facing NAT Gateway to establish a unified cloud Internet access gateway.
Parameters:
  CommonName:
    Type: String
    Default: unified-egress
  ZoneId1:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::ZoneId'
    AssociationPropertyMetadata:
      ExclusiveTo:
        - ZoneId2
    Label:
      en: Availability Zone
      zh-cn: Availability Zone 1
  ZoneId2:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::ZoneId'
    AssociationPropertyMetadata:
      ExclusiveTo:
        - ZoneId1
    Label:
      en: Availability Zone
      zh-cn: Availability Zone 2
  InstanceType1:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::InstanceType'
    AssociationPropertyMetadata:
      InstanceChargeType: PostPaid
      SystemDiskCategory: cloud_essd
      ZoneId: ${ZoneId}
    Label:
      en: ECS Instance Type
      zh-cn: ECS Instance Type 1
  InstanceType2:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::InstanceType'
    AssociationPropertyMetadata:
      InstanceChargeType: PostPaid
      SystemDiskCategory: cloud_essd
      ZoneId: ${ZoneId}
    Label:
      en: ECS Instance Type
      zh-cn: ECS Instance Type 2
  InstancePassword:
    NoEcho: true
    Type: String
    Description:
      en: >-
        Server login password, Length 8-30, must contain three(Capital letters,
        lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special
        symbol in)
      zh-cn: >-
        Server logon password. Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/).
    Label:
      en: Instance Password
      zh-cn: Instance Password
    ConstraintDescription:
      en: >-
        Length 8-30, must contain three(Capital letters, lowercase letters,
        numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in)
      zh-cn: Length 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/).
    AssociationProperty: 'ALIYUN::ECS::Instance::Password'
    Default: null
Resources:
  Vpc:
    Type: 'ALIYUN::ECS::VPC'
    Properties:
      CidrBlock: 192.168.0.0/16
      VpcName:
        Fn::Sub: ${CommonName}-vpc
  VSwitch1:
    Type: 'ALIYUN::ECS::VSwitch'
    Properties:
      VpcId:
        Ref: Vpc
      CidrBlock: 192.168.1.0/24
      ZoneId:
        Ref: ZoneId1
      VSwitchName:
        Fn::Sub: ${CommonName}-app1-vsw
  VSwitch2:
    Type: 'ALIYUN::ECS::VSwitch'
    Properties:
      VpcId:
        Ref: Vpc
      CidrBlock: 192.168.2.0/24
      ZoneId:
        Ref: ZoneId2
      VSwitchName:
        Fn::Sub: ${CommonName}-app2-vsw
  VSwitch3:
    Type: 'ALIYUN::ECS::VSwitch'
    Properties:
      VpcId:
        Ref: Vpc
      CidrBlock: 192.168.3.0/24
      ZoneId:
        Ref: ZoneId1
      VSwitchName:
        Fn::Sub: ${CommonName}-pub-vsw
  SecurityGroup:
    Type: 'ALIYUN::ECS::SecurityGroup'
    Properties:
      VpcId:
        Ref: Vpc
      SecurityGroupName:
        Fn::Sub: ${CommonName}-sg
      SecurityGroupIngress:
        - PortRange: 443/443
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
        - PortRange: 80/80
          SourceCidrIp: 0.0.0.0/0
          IpProtocol: tcp
  EcsInstance1:
    Type: 'ALIYUN::ECS::InstanceGroup'
    Properties:
      VpcId:
        Ref: Vpc
      ZoneId:
        Ref: ZoneId1
      VSwitchId:
        Ref: VSwitch1
      SecurityGroupId:
        Ref: SecurityGroup
      ImageId: aliyun_3_9_x64_20G_alibase_20231219.vhd
      InstanceName:
        Fn::Sub: ${CommonName}-ecs-1
      InstanceType:
        Ref: InstanceType1
      SystemDiskCategory: cloud_essd
      MaxAmount: 1
      InternetMaxBandwidthOut: 0
      Password:
        Ref: InstancePassword
  EcsInstance2:
    Type: 'ALIYUN::ECS::InstanceGroup'
    Properties:
      VpcId:
        Ref: Vpc
      ZoneId:
        Ref: ZoneId2
      VSwitchId:
        Ref: VSwitch2
      SecurityGroupId:
        Ref: SecurityGroup
      ImageId: aliyun_3_9_x64_20G_alibase_20231219.vhd
      InstanceName:
        Fn::Sub: ${CommonName}-ecs-2
      InstanceType:
        Ref: InstanceType2
      SystemDiskCategory: cloud_essd
      MaxAmount: 1
      InternetMaxBandwidthOut: 0
      Password:
        Ref: InstancePassword
  NatGateway:
    Type: 'ALIYUN::VPC::NatGateway'
    Properties:
      NatGatewayName:
        Fn::Sub: ${CommonName}-ngw
      VSwitchId:
        Ref: VSwitch3
      NatType: Enhanced
      VpcId:
        Ref: Vpc
      ZoneId:
        Ref: ZoneId1
  Eip:
    Type: 'ALIYUN::VPC::EIP'
    Properties:
      DeletionProtection: false
      Isp: BGP
      Bandwidth: 200
      InternetChargeType: PayByTraffic
  EipAssociation:
    Type: 'ALIYUN::VPC::EIPAssociation'
    Properties:
      InstanceId:
        Ref: NatGateway
      AllocationId:
        Ref: Eip
  SNat:
    Type: 'ALIYUN::VPC::SnatEntry'
    DependsOn: EipAssociation
    Properties:
      SnatTableId:
        Fn::GetAtt:
          - NatGateway
          - SNatTableId
      SnatEntryName:
        Fn::Sub: ${CommonName}-snat
      SourceVSwitchIds:
        - Ref: VSwitch1
        - Ref: VSwitch2
      SnatIp:
        Fn::GetAtt:
          - Eip
          - EipAddress
Outputs:
  EcsLoginAddress1:
    Description:
      en: Ecs1 login address.
      zh-cn: ECS1 logon address.
    Value:
      Fn::Sub: >-
        https://ecs-workbench.aliyun.com/?from=EcsConsole
        &instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${EcsInstance1}
  EcsLoginAddress2:
    Description:
      en: Ecs2 login address.
      zh-cn: ECS2 logon address.
    Value:
      Fn::Sub: >-
        https://ecs-workbench.aliyun.com/?from=EcsConsole
        &instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${EcsInstance2}
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Parameters:
          - ZoneId1
          - ZoneId2
        Label:
          default:
            en: Zone ID
            zh-cn: vSwitch zone configuration
      - Parameters:
          - InstanceType1
          - InstanceType2
          - InstancePassword
        Label:
          default:
            en: ECS Instance Configuration
            zh-cn: ECS Instance Configuration
    TemplateTags:
      - acs:technical-solution:network:Implement centralized egress through an Internet NAT gateway-tech_solu_134
    Hidden:
      - CommonName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "zh-cn": "Create a Virtual Private Cloud (VPC) environment, configure dual-Availability Zone Elastic Compute Service (ECS) instances, and deploy a public-facing NAT Gateway to establish a unified cloud Internet access gateway.",
    "en": "Create a Virtual Private Cloud (VPC) environment, configure dual-Availability Zone Elastic Compute Service (ECS) instances, and deploy a public-facing NAT Gateway to establish a unified cloud Internet access gateway."
  },
  "Parameters": {
    "CommonName": {
      "Type": "String",
      "Default": "unified-egress"
    },
    "ZoneId1": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "ExclusiveTo": [
          "ZoneId2"
        ]
      },
      "Label": {
        "en": "Availability Zone",
        "zh-cn": "Availability Zone 1"
      }
    },
    "ZoneId2": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "ExclusiveTo": [
          "ZoneId1"
        ]
      },
      "Label": {
        "en": "Availability Zone",
        "zh-cn": "Availability Zone 2"
      }
    },
    "InstanceType1": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "InstanceChargeType": "PostPaid",
        "SystemDiskCategory": "cloud_essd",
        "ZoneId": "${ZoneId}"
      },
      "Label": {
        "en": "ECS Instance Type",
        "zh-cn": "ECS Instance Type 1"
      }
    },
    "InstanceType2": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "InstanceChargeType": "PostPaid",
        "SystemDiskCategory": "cloud_essd",
        "ZoneId": "${ZoneId}"
      },
      "Label": {
        "en": "ECS Instance Type",
        "zh-cn": "ECS Instance Type 2"
      }
    },
    "InstancePassword": {
      "NoEcho": true,
      "Type": "String",
      "Description": {
        "en": "Server logon password. Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/).",
        "zh-cn": "Server logon password. Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/)."
      },
      "Label": {
        "en": "Instance Password",
        "zh-cn": "Instance Password"
      },
      "ConstraintDescription": {
        "en": "Length 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/).",
        "zh-cn": "Length 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/)."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::Password",
      "Default": null
    }
  },
  "Resources": {
    "Vpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "CidrBlock": "192.168.0.0/16",
        "VpcName": {
          "Fn::Sub": "${CommonName}-vpc"
        }
      }
    },
    "VSwitch1": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "CidrBlock": "192.168.1.0/24",
        "ZoneId": {
          "Ref": "ZoneId1"
        },
        "VSwitchName": {
          "Fn::Sub": "${CommonName}-app1-vsw"
        }
      }
    },
    "VSwitch2": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "CidrBlock": "192.168.2.0/24",
        "ZoneId": {
          "Ref": "ZoneId2"
        },
        "VSwitchName": {
          "Fn::Sub": "${CommonName}-app2-vsw"
        }
      }
    },
    "VSwitch3": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "CidrBlock": "192.168.3.0/24",
        "ZoneId": {
          "Ref": "ZoneId1"
        },
        "VSwitchName": {
          "Fn::Sub": "${CommonName}-pub-vsw"
        }
      }
    },
    "SecurityGroup": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "SecurityGroupName": {
          "Fn::Sub": "${CommonName}-sg"
        },
        "SecurityGroupIngress": [
          {
            "PortRange": "443/443",
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          },
          {
            "PortRange": "80/80",
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "tcp"
          }
        ]
      }
    },
    "EcsInstance1": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "ZoneId": {
          "Ref": "ZoneId1"
        },
        "VSwitchId": {
          "Ref": "VSwitch1"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroup"
        },
        "ImageId": "aliyun_3_9_x64_20G_alibase_20231219.vhd",
        "InstanceName": {
          "Fn::Sub": "${CommonName}-ecs-1"
        },
        "InstanceType": {
          "Ref": "InstanceType1"
        },
        "SystemDiskCategory": "cloud_essd",
        "MaxAmount": 1,
        "InternetMaxBandwidthOut": 0,
        "Password": {
          "Ref": "InstancePassword"
        }
      }
    },
    "EcsInstance2": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "ZoneId": {
          "Ref": "ZoneId2"
        },
        "VSwitchId": {
          "Ref": "VSwitch2"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroup"
        },
        "ImageId": "aliyun_3_9_x64_20G_alibase_20231219.vhd",
        "InstanceName": {
          "Fn::Sub": "${CommonName}-ecs-2"
        },
        "InstanceType": {
          "Ref": "InstanceType2"
        },
        "SystemDiskCategory": "cloud_essd",
        "MaxAmount": 1,
        "InternetMaxBandwidthOut": 0,
        "Password": {
          "Ref": "InstancePassword"
        }
      }
    },
    "NatGateway": {
      "Type": "ALIYUN::VPC::NatGateway",
      "Properties": {
        "NatGatewayName": {
          "Fn::Sub": "${CommonName}-ngw"
        },
        "VSwitchId": {
          "Ref": "VSwitch3"
        },
        "NatType": "Enhanced",
        "VpcId": {
          "Ref": "Vpc"
        },
        "ZoneId": {
          "Ref": "ZoneId1"
        }
      }
    },
    "Eip": {
      "Type": "ALIYUN::VPC::EIP",
      "Properties": {
        "DeletionProtection": false,
        "Isp": "BGP",
        "Bandwidth": 200,
        "InternetChargeType": "PayByTraffic"
      }
    },
    "EipAssociation": {
      "Type": "ALIYUN::VPC::EIPAssociation",
      "Properties": {
        "InstanceId": {
          "Ref": "NatGateway"
        },
        "AllocationId": {
          "Ref": "Eip"
        }
      }
    },
    "SNat": {
      "Type": "ALIYUN::VPC::SnatEntry",
      "DependsOn": "EipAssociation",
      "Properties": {
        "SnatTableId": {
          "Fn::GetAtt": [
            "NatGateway",
            "SNatTableId"
          ]
        },
        "SnatEntryName": {
          "Fn::Sub": "${CommonName}-snat"
        },
        "SourceVSwitchIds": [
          {
            "Ref": "VSwitch1"
          },
          {
            "Ref": "VSwitch2"
          }
        ],
        "SnatIp": {
          "Fn::GetAtt": [
            "Eip",
            "EipAddress"
          ]
        }
      }
    }
  },
  "Outputs": {
    "EcsLoginAddress1": {
      "Description": {
        "en": "ECS1 logon address.",
        "zh-cn": "ECS1 logon address."
      },
      "Value": {
        "Fn::Sub": "https://ecs-workbench.aliyun.com/?from=EcsConsole &instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${EcsInstance1}"
      }
    },
    "EcsLoginAddress2": {
      "Description": {
        "en": "ECS2 logon address.",
        "zh-cn": "ECS2 logon address."
      },
      "Value": {
        "Fn::Sub": "https://ecs-workbench.aliyun.com/?from=EcsConsole &instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${EcsInstance2}"
      }
    }
  },
  "Metadata": {
    "ALIYUN::ROS::Interface": {
      "ParameterGroups": [
        {
          "Parameters": [
            "ZoneId1",
            "ZoneId2"
          ],
          "Label": {
            "default": {
              "en": "Zone ID",
              "zh-cn": "vSwitch zone configuration"
            }
          }
        },
        {
          "Parameters": [
            "InstanceType1",
            "InstanceType2",
            "InstancePassword"
          ],
          "Label": {
            "default": {
              "en": "ECS Instance Configuration",
              "zh-cn": "ECS Instance Configuration"
            }
          }
        }
      ],
      "TemplateTags": [
        "acs:technical-solution:network:cloud-unified-internet-egress-via-public-nat-gateway-tech_solu_134"
      ],
      "Hidden": [
        "CommonName"
      ]
    }
  }
}

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