Show / Hide Table of Contents

Class AddRouteOptions

Options for adding a new route to a subnet.

Inheritance
System.Object
AddRouteOptions
Implements
IAddRouteOptions
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class AddRouteOptions : Object, IAddRouteOptions
Syntax (vb)
Public Class AddRouteOptions
    Inherits Object
    Implements IAddRouteOptions
Remarks

ExampleMetadata: infused

Examples
Vpc vpc = new Vpc(this, "VPC", new VpcProps {
    SubnetConfiguration = new [] { new SubnetConfiguration {
        SubnetType = SubnetType.PUBLIC,
        Name = "Public"
    }, new SubnetConfiguration {
        SubnetType = SubnetType.PRIVATE_ISOLATED,
        Name = "Isolated"
    } }
});

((Subnet)vpc.IsolatedSubnets[0]).AddRoute("StaticRoute", new AddRouteOptions {
    RouterId = vpc.InternetGatewayId,
    RouterType = RouterType.GATEWAY,
    DestinationCidrBlock = "8.8.8.8/32"
});

Synopsis

Constructors

AddRouteOptions()

Properties

DestinationCidrBlock

IPv4 range this route applies to.

DestinationIpv6CidrBlock

IPv6 range this route applies to.

EnablesInternetConnectivity

Whether this route will enable internet connectivity.

RouterId

The ID of the router.

RouterType

What type of router to route this traffic to.

Constructors

AddRouteOptions()

public AddRouteOptions()

Properties

DestinationCidrBlock

IPv4 range this route applies to.

public string DestinationCidrBlock { get; set; }
Property Value

System.String

Remarks

Default: '0.0.0.0/0'

DestinationIpv6CidrBlock

IPv6 range this route applies to.

public string DestinationIpv6CidrBlock { get; set; }
Property Value

System.String

Remarks

Default: - Uses IPv6

EnablesInternetConnectivity

Whether this route will enable internet connectivity.

public Nullable<bool> EnablesInternetConnectivity { get; set; }
Property Value

System.Nullable<System.Boolean>

Remarks

If true, this route will be added before any AWS resources that depend on internet connectivity in the VPC will be created.

Default: false

RouterId

The ID of the router.

public string RouterId { get; set; }
Property Value

System.String

Remarks

Can be an instance ID, gateway ID, etc, depending on the router type.

RouterType

What type of router to route this traffic to.

public RouterType RouterType { get; set; }
Property Value

RouterType

Implements

IAddRouteOptions
Back to top Generated by DocFX