@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.277Z") @Stability(value=Stable) public class CfnRoute extends CfnResource implements IInspectable
Specifies a route in a route table within a VPC.
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.
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")
.destinationCidrBlock("destinationCidrBlock")
.destinationIpv6CidrBlock("destinationIpv6CidrBlock")
.egressOnlyInternetGatewayId("egressOnlyInternetGatewayId")
.gatewayId("gatewayId")
.instanceId("instanceId")
.localGatewayId("localGatewayId")
.natGatewayId("natGatewayId")
.networkInterfaceId("networkInterfaceId")
.transitGatewayId("transitGatewayId")
.vpcEndpointId("vpcEndpointId")
.vpcPeeringConnectionId("vpcPeeringConnectionId")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnRoute.Builder
A fluent builder for
CfnRoute. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnRoute(software.constructs.Construct scope,
String id,
CfnRouteProps props)
Create a new `AWS::EC2::Route`.
|
protected |
CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnRoute(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCarrierGatewayId()
The ID of the carrier gateway.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDestinationCidrBlock()
The IPv4 CIDR block used for the destination match.
|
String |
getDestinationIpv6CidrBlock()
The IPv6 CIDR block used for the destination match.
|
String |
getEgressOnlyInternetGatewayId()
The ID of the egress-only internet gateway.
|
String |
getGatewayId()
The ID of an internet gateway or virtual private gateway attached to your VPC.
|
String |
getInstanceId()
The ID of a NAT instance in your VPC.
|
String |
getLocalGatewayId()
The ID of the local gateway.
|
String |
getNatGatewayId()
The ID of a NAT gateway.
|
String |
getNetworkInterfaceId()
The ID of the network interface.
|
String |
getRouteTableId()
The ID of the route table.
|
String |
getTransitGatewayId()
The ID of a transit gateway.
|
String |
getVpcEndpointId()
The ID of a VPC endpoint.
|
String |
getVpcPeeringConnectionId()
The ID of a VPC peering connection.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setCarrierGatewayId(String value)
The ID of the carrier gateway.
|
void |
setDestinationCidrBlock(String value)
The IPv4 CIDR block used for the destination match.
|
void |
setDestinationIpv6CidrBlock(String value)
The IPv6 CIDR block used for the destination match.
|
void |
setEgressOnlyInternetGatewayId(String value)
The ID of the 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)
The ID of a NAT gateway.
|
void |
setNetworkInterfaceId(String value)
The ID of the network interface.
|
void |
setRouteTableId(String value)
The ID of the route table.
|
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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnRoute(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnRoute(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnRouteProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getRouteTableId()
The routing table must be associated with the same VPC that the virtual private gateway is attached to.
@Stability(value=Stable)
public void setRouteTableId(@NotNull
String value)
The routing table must be associated with the same VPC that the virtual private gateway is attached to.
@Stability(value=Stable) @Nullable public String getCarrierGatewayId()
@Stability(value=Stable)
public void setCarrierGatewayId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getDestinationCidrBlock()
@Stability(value=Stable)
public void setDestinationCidrBlock(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getDestinationIpv6CidrBlock()
@Stability(value=Stable)
public void setDestinationIpv6CidrBlock(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getEgressOnlyInternetGatewayId()
@Stability(value=Stable)
public void setEgressOnlyInternetGatewayId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getGatewayId()
@Stability(value=Stable)
public void setGatewayId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getInstanceId()
@Stability(value=Stable)
public void setInstanceId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getLocalGatewayId()
@Stability(value=Stable)
public void setLocalGatewayId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getNatGatewayId()
@Stability(value=Stable)
public void setNatGatewayId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getNetworkInterfaceId()
@Stability(value=Stable)
public void setNetworkInterfaceId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getTransitGatewayId()
@Stability(value=Stable)
public void setTransitGatewayId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getVpcEndpointId()
Supported for Gateway Load Balancer endpoints only.
@Stability(value=Stable)
public void setVpcEndpointId(@Nullable
String value)
Supported for Gateway Load Balancer endpoints only.
@Stability(value=Stable) @Nullable public String getVpcPeeringConnectionId()
@Stability(value=Stable)
public void setVpcPeeringConnectionId(@Nullable
String value)
Copyright © 2022. All rights reserved.