Class CfnRoute
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ec2.CfnRoute
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-05T03:43:42.065Z")
@Stability(Stable)
public class CfnRoute
extends CfnResource
implements IInspectable
Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide .
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ec2.*; CfnRoute cfnRoute = CfnRoute.Builder.create(this, "MyCfnRoute") .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") .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnRoute
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnRoute
(software.amazon.jsii.JsiiObjectRef objRef) CfnRoute
(software.constructs.Construct scope, String id, CfnRouteProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe IPv4 CIDR block.The ID of the carrier gateway.The Amazon Resource Name (ARN) of the core network.The IPv4 CIDR address block used for the destination match.The IPv6 CIDR block used for the destination match.The ID of a prefix list used for the destination match.[IPv6 traffic only] The ID of an egress-only internet gateway.The ID of an internet gateway or virtual private gateway attached to your VPC.The ID of a NAT instance in your VPC.The ID of the local gateway.[IPv4 traffic only] The ID of a NAT gateway.The ID of a network interface.The ID of the route table for the route.The ID of a transit gateway.The ID of a VPC endpoint.The ID of a VPC peering connection.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCarrierGatewayId
(String value) The ID of the carrier gateway.void
setCoreNetworkArn
(String value) The Amazon Resource Name (ARN) of the core network.void
setDestinationCidrBlock
(String value) The IPv4 CIDR address block used for the destination match.void
The IPv6 CIDR block used for the destination match.void
setDestinationPrefixListId
(String value) The ID of a prefix list used for the destination match.void
[IPv6 traffic only] The ID of an egress-only internet gateway.void
setGatewayId
(String value) The ID of an internet gateway or virtual private gateway attached to your VPC.void
setInstanceId
(String value) The ID of a NAT instance in your VPC.void
setLocalGatewayId
(String value) The ID of the local gateway.void
setNatGatewayId
(String value) [IPv4 traffic only] The ID of a NAT gateway.void
setNetworkInterfaceId
(String value) The ID of a network interface.void
setRouteTableId
(String value) The ID of the route table for the route.void
setTransitGatewayId
(String value) The ID of a transit gateway.void
setVpcEndpointId
(String value) The ID of a VPC endpoint.void
setVpcPeeringConnectionId
(String value) The ID of a VPC peering connection.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnRoute
protected CfnRoute(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRoute
protected CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRoute
@Stability(Stable) public CfnRoute(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRouteProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrCidrBlock
The IPv4 CIDR block. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getRouteTableId
The ID of the route table for the route. -
setRouteTableId
The ID of the route table for the route. -
getCarrierGatewayId
The ID of the carrier gateway. -
setCarrierGatewayId
The ID of the carrier gateway. -
getCoreNetworkArn
The Amazon Resource Name (ARN) of the core network. -
setCoreNetworkArn
The Amazon Resource Name (ARN) of the core network. -
getDestinationCidrBlock
The IPv4 CIDR address block used for the destination match. -
setDestinationCidrBlock
The IPv4 CIDR address block used for the destination match. -
getDestinationIpv6CidrBlock
The IPv6 CIDR block used for the destination match. -
setDestinationIpv6CidrBlock
The IPv6 CIDR block used for the destination match. -
getDestinationPrefixListId
The ID of a prefix list used for the destination match. -
setDestinationPrefixListId
The ID of a prefix list used for the destination match. -
getEgressOnlyInternetGatewayId
[IPv6 traffic only] The ID of an egress-only internet gateway. -
setEgressOnlyInternetGatewayId
[IPv6 traffic only] The ID of an egress-only internet gateway. -
getGatewayId
The ID of an internet gateway or virtual private gateway attached to your VPC. -
setGatewayId
The ID of an internet gateway or virtual private gateway attached to your VPC. -
getInstanceId
The ID of a NAT instance in your VPC. -
setInstanceId
The ID of a NAT instance in your VPC. -
getLocalGatewayId
The ID of the local gateway. -
setLocalGatewayId
The ID of the local gateway. -
getNatGatewayId
[IPv4 traffic only] The ID of a NAT gateway. -
setNatGatewayId
[IPv4 traffic only] The ID of a NAT gateway. -
getNetworkInterfaceId
The ID of a network interface. -
setNetworkInterfaceId
The ID of a network interface. -
getTransitGatewayId
The ID of a transit gateway. -
setTransitGatewayId
The ID of a transit gateway. -
getVpcEndpointId
The ID of a VPC endpoint. -
setVpcEndpointId
The ID of a VPC endpoint. -
getVpcPeeringConnectionId
The ID of a VPC peering connection. -
setVpcPeeringConnectionId
The ID of a VPC peering connection.
-