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

Resource Orchestration Service:ALIYUN::VPC::EIP

最終更新日:Mar 28, 2026

ALIYUN::VPC::EIP リソースタイプは、Elastic IP アドレス (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,
    "InstanceId": String,
    "IpAddress": String
  }
}

プロパティ

プロパティ名

タイプ

必須

更新を許可

説明

制約

DeletionProtection

Boolean

いいえ

はい

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

有効値:

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

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

Name

String

いいえ

はい

EIP の名前。

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

ResourceGroupId

String

いいえ

はい

リソースグループの ID。

なし

Netmode

String

いいえ

いいえ

ネットワークタイプ。

有効値:public。この値はインターネットを示します。

Bandwidth

Number

いいえ

はい

EIP の帯域幅。

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

InternetChargeType

String

いいえ

いいえ

EIP の課金方法。

有効値:

  • PayByBandwidth (デフォルト):帯域幅による支払い。

  • PayByTraffic:データ転送量による支払い。

InstanceChargeType

String

いいえ

いいえ

EIP の課金方法。

有効値:

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

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

PricingCycle

String

いいえ

いいえ

サブスクリプションの課金サイクル

有効値:

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

  • Year:年次課金。

説明

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

Period

Number

いいえ

いいえ

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

有効値:

  • 月次課金を選択した場合、有効値は 1~9 です。

  • 年次課金を選択した場合、有効値は 1~3 です。

デフォルト値:1。

説明

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

AutoPay

Boolean

いいえ

いいえ

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

有効値:

  • false: 自動支払いを無効化します。注文が生成された後、注文ハブに移動して支払いを完了します。

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

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

説明

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

Isp

String

いいえ

いいえ

回線タイプ。

有効値:

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

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

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

Description

String

いいえ

はい

EIP の説明。

説明は 2~256 文字である必要があります。先頭は英字である必要があります。http:// または https:// で始めることはできません。

Tags

List

いいえ

はい

タグ。

最大 20 個のタグを追加できます。各タグはキーと値のペアで構成されます。タグ値は空にすることができます。

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

SecurityProtectionTypes

List

いいえ

いいえ

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

有効値:

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

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

説明

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

PublicIpAddressPoolId

String

いいえ

いいえ

IP アドレスプールの ID。

EIP はこの IP アドレスプールから割り当てられます。IP アドレスプールは、トライアルアクセスの申請を行ったユーザーにのみ表示されます。これを使用するには、チケットを送信してください。

Zone

String

いいえ

いいえ

EIP が利用可能なゾーン。

なし

InstanceId

String

いいえ

いいえ

作成する EIP の ID。

IpAddress パラメーターまたは InstanceId パラメーターのいずれかを指定できますが、両方は指定できません。どちらのパラメーターも指定しない場合、システムはランダムに EIP を割り当てます。

IpAddress

String

いいえ

いいえ

作成する EIP の IP アドレス。

IpAddress パラメーターまたは InstanceId パラメーターのいずれかを指定できますが、両方は指定できません。どちらのパラメーターも指定しない場合、システムはランダムに EIP を割り当てます。

タグの構文

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

タグのプロパティ

プロパティ名

タイプ

必須

更新を許可

説明

制約

Key

String

はい

いいえ

タグキー。

キーは 1~128 文字である必要があります。aliyun または acs: で始めることはできません。http:// または https:// を含めることはできません。

Value

String

いいえ

いいえ

タグ値。

値は 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: 回線タイプ。
    Value:
      Fn::GetAtt:
        - ElasticIp
        - Isp
  AllocationId:
    Description: VPC で使用するアドレスの割り当てを表すために Aliyun が割り当てる ID。VPC の EIP の場合にのみ返されます。
    Value:
      Fn::GetAtt:
        - ElasticIp
        - AllocationId
  EipAddress:
    Description: 作成された EIP の IP アドレス。
    Value:
      Fn::GetAtt:
        - ElasticIp
        - EipAddress
  OrderId:
    Description: サブスクリプションの EIP インスタンスの注文 ID。
    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": "回線タイプ。",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "Isp"
        ]
      }
    },
    "AllocationId": {
      "Description": "VPC で使用するアドレスの割り当てを表すために Aliyun が割り当てる ID。VPC の EIP の場合にのみ返されます。",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "AllocationId"
        ]
      }
    },
    "EipAddress": {
      "Description": "作成された EIP の IP アドレス。",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "EipAddress"
        ]
      }
    },
    "OrderId": {
      "Description": "サブスクリプションの EIP インスタンスの注文 ID。",
      "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 ゲートウェイをデプロイして、統合クラウドインターネットアクセスゲートウェイを確立する

クイック作成

ROSTemplateFormatVersion: '2015-09-01'
Description: Virtual Private Cloud (VPC) 環境を作成し、デュアルアベイラビリティーゾーンの Elastic Compute Service (ECS) インスタンスを設定し、パブリック NAT ゲートウェイをデプロイして、統合クラウドインターネットアクセスゲートウェイを確立します。
Parameters:
  CommonName:
    Type: String
    Default: unified-egress
  ZoneId1:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::ZoneId'
    AssociationPropertyMetadata:
      ExclusiveTo:
        - ZoneId2
    Label: アベイラビリティーゾーン 1
  ZoneId2:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::ZoneId'
    AssociationPropertyMetadata:
      ExclusiveTo:
        - ZoneId1
    Label: アベイラビリティーゾーン 2
  InstanceType1:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::InstanceType'
    AssociationPropertyMetadata:
      InstanceChargeType: PostPaid
      SystemDiskCategory: cloud_essd
      ZoneId: ${ZoneId}
    Label: ECS インスタンスタイプ 1
  InstanceType2:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::InstanceType'
    AssociationPropertyMetadata:
      InstanceChargeType: PostPaid
      SystemDiskCategory: cloud_essd
      ZoneId: ${ZoneId}
    Label: ECS インスタンスタイプ 2
  InstancePassword:
    NoEcho: true
    Type: String
    Description: サーバーのログインパスワード。長さは 8~30 文字で、大文字、小文字、数字、特殊文字 (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/) のうち 3 種類以上を含む必要があります。
    Label: インスタンスパスワード
    ConstraintDescription: 長さは 8~30 文字で、大文字、小文字、数字、特殊文字 (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/) のうち 3 種類以上を含む必要があります。
    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: ECS1 ログインアドレス。
    Value:
      Fn::Sub: >-
        https://ecs-workbench.aliyun.com/?from=EcsConsole
        &instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${EcsInstance1}
  EcsLoginAddress2:
    Description: ECS2 ログインアドレス。
    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: vSwitch ゾーン設定
      - Parameters:
          - InstanceType1
          - InstanceType2
          - InstancePassword
        Label:
          default:
            en: ECS インスタンスの設定
    TemplateTags:
      - acs:technical-solution:network:Implement centralized egress through an Internet NAT gateway-tech_solu_134
    Hidden:
      - CommonName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "ja": "Virtual Private Cloud (VPC) 環境を作成し、デュアルアベイラビリティーゾーンの Elastic Compute Service (ECS) インスタンスを設定し、パブリック NAT ゲートウェイをデプロイして、統合クラウドインターネットアクセスゲートウェイを確立します。"
  },
  "Parameters": {
    "CommonName": {
      "Type": "String",
      "Default": "unified-egress"
    },
    "ZoneId1": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "ExclusiveTo": [
          "ZoneId2"
        ]
      },
      "Label": {
        "ja": "アベイラビリティーゾーン 1"
      }
    },
    "ZoneId2": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "AssociationPropertyMetadata": {
        "ExclusiveTo": [
          "ZoneId1"
        ]
      },
      "Label": {
        "ja": "アベイラビリティーゾーン 2"
      }
    },
    "InstanceType1": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "InstanceChargeType": "PostPaid",
        "SystemDiskCategory": "cloud_essd",
        "ZoneId": "${ZoneId}"
      },
      "Label": {
        "ja": "ECS インスタンスタイプ 1"
      }
    },
    "InstanceType2": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "InstanceChargeType": "PostPaid",
        "SystemDiskCategory": "cloud_essd",
        "ZoneId": "${ZoneId}"
      },
      "Label": {
        "ja": "ECS インスタンスタイプ 2"
      }
    },
    "InstancePassword": {
      "NoEcho": true,
      "Type": "String",
      "Description": {
        "ja": "サーバーのログインパスワード。長さは 8~30 文字で、大文字、小文字、数字、特殊文字 (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/) のうち 3 種類以上を含む必要があります。"
      },
      "Label": {
        "ja": "インスタンスパスワード"
      },
      "ConstraintDescription": {
        "ja": "長さは 8~30 文字で、大文字、小文字、数字、特殊文字 (()`~!@#$%^&*_-+=|{}[]:;'<>,.?/) のうち 3 種類以上を含む必要があります。"
      },
      "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": {
        "ja": "ECS1 ログインアドレス。"
      },
      "Value": {
        "Fn::Sub": "https://ecs-workbench.aliyun.com/?from=EcsConsole &instanceType=ecs&regionId=${ALIYUN::Region}&instanceId=${EcsInstance1}"
      }
    },
    "EcsLoginAddress2": {
      "Description": {
        "ja": "ECS2 ログインアドレス。"
      },
      "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": {
              "ja": "vSwitch ゾーン設定"
            }
          }
        },
        {
          "Parameters": [
            "InstanceType1",
            "InstanceType2",
            "InstancePassword"
          ],
          "Label": {
            "default": {
              "ja": "ECS インスタンスの設定"
            }
          }
        }
      ],
      "TemplateTags": [
        "acs:technical-solution:network:cloud-unified-internet-egress-via-public-nat-gateway-tech_solu_134"
      ],
      "Hidden": [
        "CommonName"
      ]
    }
  }
}

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