Class CfnRoute
A CloudFormation AWS::EC2::Route
.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnRoute : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnRoute
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Specifies a route in a route table.
You must specify either DestinationCidrBlock
or DestinationIpv6CidrBlock
, plus the ID of one of the target resources.
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.
CloudformationResource: AWS::EC2::Route
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html
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",
DestinationCidrBlock = "destinationCidrBlock",
DestinationIpv6CidrBlock = "destinationIpv6CidrBlock",
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 |
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 |
Properties
CarrierGatewayId | The ID of the carrier gateway. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DestinationCidrBlock | The IPv4 CIDR address block used for the destination match. |
DestinationIpv6CidrBlock | The IPv6 CIDR block 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(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 System.String
- scoped id of the resource.
- props ICfnRouteProps
- resource properties.
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
Properties
CarrierGatewayId
The ID of the carrier gateway.
public virtual string CarrierGatewayId { get; set; }
Property Value
System.String
Remarks
You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.
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
DestinationCidrBlock
The IPv4 CIDR address block used for the destination match.
public virtual string DestinationCidrBlock { get; set; }
Property Value
System.String
Remarks
Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
DestinationIpv6CidrBlock
The IPv6 CIDR block used for the destination match.
public virtual string DestinationIpv6CidrBlock { get; set; }
Property Value
System.String
Remarks
Routing decisions are based on the most specific match.
EgressOnlyInternetGatewayId
[IPv6 traffic only] The ID of an egress-only internet gateway.
public virtual string EgressOnlyInternetGatewayId { get; set; }
Property Value
System.String
Remarks
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
Remarks
InstanceId
The ID of a NAT instance in your VPC.
public virtual string InstanceId { get; set; }
Property Value
System.String
Remarks
The operation fails if you specify an instance ID unless exactly one network interface is attached.
LocalGatewayId
The ID of the local gateway.
public virtual string LocalGatewayId { get; set; }
Property Value
System.String
Remarks
NatGatewayId
[IPv4 traffic only] The ID of a NAT gateway.
public virtual string NatGatewayId { get; set; }
Property Value
System.String
Remarks
NetworkInterfaceId
The ID of a network interface.
public virtual string NetworkInterfaceId { get; set; }
Property Value
System.String
Remarks
RouteTableId
The ID of the route table for the route.
public virtual string RouteTableId { get; set; }
Property Value
System.String
Remarks
TransitGatewayId
The ID of a transit gateway.
public virtual string TransitGatewayId { get; set; }
Property Value
System.String
Remarks
VpcEndpointId
The ID of a VPC endpoint.
public virtual string VpcEndpointId { get; set; }
Property Value
System.String
Remarks
Supported for Gateway Load Balancer endpoints only.
VpcPeeringConnectionId
The ID of a VPC peering connection.
public virtual string VpcPeeringConnectionId { get; set; }
Property Value
System.String
Remarks
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>