AWS::EC2::InternetGateway
VPC とともに使用するインターネットゲートウェイを割り当てます。作成後、インターネットゲートウェイを VPC にアタッチすることができます。
構文
AWS CloudFormation テンプレートでこのエンティティを宣言するには、次の構文を使用します。
プロパティ
Tags
-
インターネットゲートウェイに割り当てられるすべてのタグ。
必須: いいえ
タイプ: Tag のリスト
Update requires: No interruption
戻り値
参照番号
このリソースの論理 ID を組み込みの Ref
関数に渡すと、Ref
は次を返します: リソース名。
For more information about using the Ref
function, see Ref.
例
インターネットゲートウェイを作成する
次の例では、インターネットゲートウェイを作成し、タグが割り当てられます。
JSON
"Resources" : { "myInternetGateway" : { "Type" : "AWS::EC2::InternetGateway", "Properties" : { "Tags" : [ {"Key" : "foo", "Value" : "bar"}] } } }
YAML
myInternetGateway: Type: AWS::EC2::InternetGateway Properties: Tags: - Key: foo Value: bar
以下の資料も参照してください。
-
Amazon EC2 API リファレンスの「CreateInternetGateway」
-
Amazon Virtual Private Cloud ユーザーガイドの「InternetGateways」
-
AWS::EC2::VPCGatewayAttachment リソースを使用して、インターネットゲートウェイを VPC と関連付ける