

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# AWS. 联网。 InternetGateway
AWS. 联网。 InternetGateway

定义 AWS Internet Gateway 节点。

## 语法


```
tosca.nodes.AWS.Networking.InternetGateway:
  capabilities:
    routing:
      properties:
        dest\$1cidr: String
        ipv6\$1dest\$1cidr: String    
  properties:
    tags: List
    egress\$1only: Boolean
  requirements:
    vpc: String
    route\$1table: String
```

## 功能
<a name="node_internet_gateway_routing"></a>`routing`

定义 VPC 内路由连接的属性。必须包括 `dest_cidr` 或 `ipv6_dest_cidr` 属性。

 `dest_cidr`    
用于目标匹配的 IPv4 CIDR 块。此属性用于在 `RouteTable` 中创建路由，其值用作 `DestinationCidrBlock`。  
必需：如果包含 `ipv6_dest_cidr` 属性，则为“否”。  
类型：字符串

 `ipv6_dest_cidr`    
用于目标匹配的 IPv6 CIDR 块。  
必需：如果包含 `dest_cidr` 属性，则为“否”。  
类型：字符串

## 属性


 `tags`    
要附加到资源的标签。  
必需：否  
类型：列表

 `egress_only`    
一个 IPv6特定的属性。表示互联网网关是否仅用于出口通信。如果 `egress_only` 为 true，则必须定义 `ipv6_dest_cidr` 属性。  
必需：否  
类型：布尔值

## 要求


 `vpc`    
一个 [AWS.Networking.VPC](node-vpc.md) 节点。  
必需：是  
类型：字符串

 `route_table`    
一个 [AWS.Networking RouteTable](node-route-table.md)节点。  
必需：是  
类型：字符串

## 示例


```
Free5GCIGW:
  type: tosca.nodes.AWS.Networking.InternetGateway
  properties:
    egress_only: false
  capabilities:
    routing:
      properties:
        dest_cidr: "0.0.0.0/0"
        ipv6_dest_cidr: "::/0"
  requirements:
    route_table: Free5GCRouteTable
    vpc: Free5GCVPC
Free5GCEGW:
  type: tosca.nodes.AWS.Networking.InternetGateway
  properties:
    egress_only: true
  capabilities:
    routing:
      properties:
        ipv6_dest_cidr: "::/0"
  requirements:
    route_table: Free5GCPrivateRouteTable
    vpc: Free5GCVPC
```