Show / Hide Table of Contents

Class CfnRoute

Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide .

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnRoute
Implements
IInspectable
IRouteRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.Env
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRoute : CfnResource, IInspectable, IRouteRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnRoute Inherits CfnResource Implements IInspectable, IRouteRef, IConstruct, IDependable, IEnvironmentAware
Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             var cfnRoute = new CfnRoute(this, "MyCfnRoute", new CfnRouteProps {
                 RouteTableId = "routeTableId",

                 // the properties below are optional
                 CarrierGatewayId = "carrierGatewayId",
                 CoreNetworkArn = "coreNetworkArn",
                 DestinationCidrBlock = "destinationCidrBlock",
                 DestinationIpv6CidrBlock = "destinationIpv6CidrBlock",
                 DestinationPrefixListId = "destinationPrefixListId",
                 EgressOnlyInternetGatewayId = "egressOnlyInternetGatewayId",
                 GatewayId = "gatewayId",
                 InstanceId = "instanceId",
                 LocalGatewayId = "localGatewayId",
                 NatGatewayId = "natGatewayId",
                 NetworkInterfaceId = "networkInterfaceId",
                 TransitGatewayId = "transitGatewayId",
                 VpcEndpointId = "vpcEndpointId",
                 VpcPeeringConnectionId = "vpcPeeringConnectionId"
             });

Synopsis

Constructors

CfnRoute(Construct, string, ICfnRouteProps)

Create a new AWS::EC2::Route.

Properties

AttrCidrBlock

The IPv4 CIDR block.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CarrierGatewayId

The ID of the carrier gateway.

CfnProperties

Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide .

CoreNetworkArn

The Amazon Resource Name (ARN) of the core network.

DestinationCidrBlock

The IPv4 CIDR address block used for the destination match.

DestinationIpv6CidrBlock

The IPv6 CIDR block used for the destination match.

DestinationPrefixListId

The ID of a prefix list used for the destination match.

EgressOnlyInternetGatewayId

[IPv6 traffic only] The ID of an egress-only internet gateway.

GatewayId

The ID of an internet gateway or virtual private gateway attached to your VPC.

InstanceId

The ID of a NAT instance in your VPC.

LocalGatewayId

The ID of the local gateway.

NatGatewayId

[IPv4 traffic only] The ID of a NAT gateway.

NetworkInterfaceId

The ID of a network interface.

RouteRef

A reference to a Route resource.

RouteTableId

The ID of the route table for the route.

TransitGatewayId

The ID of a transit gateway.

VpcEndpointId

The ID of a VPC endpoint.

VpcPeeringConnectionId

The ID of a VPC peering connection.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

IsCfnRoute(object)

Checks whether the given object is a CfnRoute.

RenderProperties(IDictionary<string, object>)

Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide .

Constructors

CfnRoute(Construct, string, ICfnRouteProps)

Create a new AWS::EC2::Route.

public CfnRoute(Construct scope, string id, ICfnRouteProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnRouteProps

Resource properties.

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

Properties

AttrCidrBlock

The IPv4 CIDR block.

public virtual string AttrCidrBlock { get; }
Property Value

string

Remarks

CloudformationAttribute: CidrBlock

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

CarrierGatewayId

The ID of the carrier gateway.

public virtual string? CarrierGatewayId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

CfnProperties

Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide .

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

CoreNetworkArn

The Amazon Resource Name (ARN) of the core network.

public virtual string? CoreNetworkArn { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

DestinationCidrBlock

The IPv4 CIDR address block used for the destination match.

public virtual string? DestinationCidrBlock { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

DestinationIpv6CidrBlock

The IPv6 CIDR block used for the destination match.

public virtual string? DestinationIpv6CidrBlock { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

DestinationPrefixListId

The ID of a prefix list used for the destination match.

public virtual string? DestinationPrefixListId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

EgressOnlyInternetGatewayId

[IPv6 traffic only] The ID of an egress-only internet gateway.

public virtual string? EgressOnlyInternetGatewayId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

GatewayId

The ID of an internet gateway or virtual private gateway attached to your VPC.

public virtual string? GatewayId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

InstanceId

The ID of a NAT instance in your VPC.

public virtual string? InstanceId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

LocalGatewayId

The ID of the local gateway.

public virtual string? LocalGatewayId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

NatGatewayId

[IPv4 traffic only] The ID of a NAT gateway.

public virtual string? NatGatewayId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

NetworkInterfaceId

The ID of a network interface.

public virtual string? NetworkInterfaceId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

RouteRef

A reference to a Route resource.

public virtual IRouteReference RouteRef { get; }
Property Value

IRouteReference

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

RouteTableId

The ID of the route table for the route.

public virtual string RouteTableId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

TransitGatewayId

The ID of a transit gateway.

public virtual string? TransitGatewayId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

VpcEndpointId

The ID of a VPC endpoint.

public virtual string? VpcEndpointId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

VpcPeeringConnectionId

The ID of a VPC peering connection.

public virtual string? VpcPeeringConnectionId { get; set; }
Property Value

string

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector

tree inspector to collect and process attributes.

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

IsCfnRoute(object)

Checks whether the given object is a CfnRoute.

public static bool IsCfnRoute(object x)
Parameters
x object
Returns

bool

Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide .

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.

If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment resource.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

CloudformationResource: AWS::EC2::Route

ExampleMetadata: fixture=_generated

Implements

IInspectable
IRouteRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX