Class CfnRoute
Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide .
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRoute : CfnResource, IInspectable
Syntax (vb)
Public Class CfnRoute
Inherits CfnResource
Implements IInspectable
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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnRoute(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnRoute(Construct, String, ICfnRouteProps) |
Properties
AttrCidrBlock | The IPv4 CIDR block. |
CarrierGatewayId | The ID of the carrier gateway. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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. |
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. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnRoute(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnRoute(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnRoute(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnRoute(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnRoute(Construct, String, ICfnRouteProps)
public CfnRoute(Construct scope, string id, ICfnRouteProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnRouteProps
Resource properties.
Properties
AttrCidrBlock
The IPv4 CIDR block.
public virtual string AttrCidrBlock { get; }
Property Value
System.String
Remarks
CloudformationAttribute: CidrBlock
CarrierGatewayId
The ID of the carrier gateway.
public virtual string CarrierGatewayId { get; set; }
Property Value
System.String
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
CoreNetworkArn
The Amazon Resource Name (ARN) of the core network.
public virtual string CoreNetworkArn { get; set; }
Property Value
System.String
DestinationCidrBlock
The IPv4 CIDR address block used for the destination match.
public virtual string DestinationCidrBlock { get; set; }
Property Value
System.String
DestinationIpv6CidrBlock
The IPv6 CIDR block used for the destination match.
public virtual string DestinationIpv6CidrBlock { get; set; }
Property Value
System.String
DestinationPrefixListId
The ID of a prefix list used for the destination match.
public virtual string DestinationPrefixListId { get; set; }
Property Value
System.String
EgressOnlyInternetGatewayId
[IPv6 traffic only] The ID of an egress-only internet gateway.
public virtual string EgressOnlyInternetGatewayId { get; set; }
Property Value
System.String
GatewayId
The ID of an internet gateway or virtual private gateway attached to your VPC.
public virtual string GatewayId { get; set; }
Property Value
System.String
InstanceId
The ID of a NAT instance in your VPC.
public virtual string InstanceId { get; set; }
Property Value
System.String
LocalGatewayId
The ID of the local gateway.
public virtual string LocalGatewayId { get; set; }
Property Value
System.String
NatGatewayId
[IPv4 traffic only] The ID of a NAT gateway.
public virtual string NatGatewayId { get; set; }
Property Value
System.String
NetworkInterfaceId
The ID of a network interface.
public virtual string NetworkInterfaceId { get; set; }
Property Value
System.String
RouteTableId
The ID of the route table for the route.
public virtual string RouteTableId { get; set; }
Property Value
System.String
TransitGatewayId
The ID of a transit gateway.
public virtual string TransitGatewayId { get; set; }
Property Value
System.String
VpcEndpointId
The ID of a VPC endpoint.
public virtual string VpcEndpointId { get; set; }
Property Value
System.String
VpcPeeringConnectionId
The ID of a VPC peering connection.
public virtual string VpcPeeringConnectionId { get; set; }
Property Value
System.String
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>