Skip to content
v2.274.0

RouterType Enum ​

Type of router used in route.

Example ​

ts
const vpc = new ec2.Vpc(this, "VPC", {
  subnetConfiguration: [{
      subnetType: ec2.SubnetType.PUBLIC,
      name: 'Public',
    },{
      subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
      name: 'Isolated',
    }]
});

(vpc.isolatedSubnets[0] as ec2.Subnet).addRoute("StaticRoute", {
    routerId: vpc.internetGatewayId!,
    routerType: ec2.RouterType.GATEWAY,
    destinationCidrBlock: "8.8.8.8/32",
})

Members ​

MemberDescription
CARRIER_GATEWAYCarrier gateway.
EGRESS_ONLY_INTERNET_GATEWAYEgress-only Internet Gateway.
GATEWAYInternet Gateway or Virtual Private Gateway.
INSTANCEInstance.
LOCAL_GATEWAYLocal Gateway.
NAT_GATEWAYNAT Gateway.
NETWORK_INTERFACENetwork Interface.
TRANSIT_GATEWAYTransit Gateway.
VPC_PEERING_CONNECTIONVPC peering connection.
VPC_ENDPOINTVPC Endpoint for gateway load balancers.
CORE_NETWORKAWS Network Manager Core Network.

Referenced by ​