Skip to content
v2.278.0

CfnLocalGatewayRouteProps Struct ​

Properties for defining a CfnLocalGatewayRoute.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnLocalGatewayRouteProps: ec2.CfnLocalGatewayRouteProps = {
  destinationCidrBlock: 'destinationCidrBlock',
  localGatewayRouteTableId: 'localGatewayRouteTableId',

  // the properties below are optional
  localGatewayVirtualInterfaceGroupId: 'localGatewayVirtualInterfaceGroupId',
  networkInterfaceId: 'networkInterfaceId',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

cfn_local_gateway_route_props = ec2.CfnLocalGatewayRouteProps(
    destination_cidr_block="destinationCidrBlock",
    local_gateway_route_table_id="localGatewayRouteTableId",

    # the properties below are optional
    local_gateway_virtual_interface_group_id="localGatewayVirtualInterfaceGroupId",
    network_interface_id="networkInterfaceId"
)
java
// 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.*;

CfnLocalGatewayRouteProps cfnLocalGatewayRouteProps = CfnLocalGatewayRouteProps.builder()
        .destinationCidrBlock("destinationCidrBlock")
        .localGatewayRouteTableId("localGatewayRouteTableId")

        // the properties below are optional
        .localGatewayVirtualInterfaceGroupId("localGatewayVirtualInterfaceGroupId")
        .networkInterfaceId("networkInterfaceId")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnLocalGatewayRouteProps = new CfnLocalGatewayRouteProps {
    DestinationCidrBlock = "destinationCidrBlock",
    LocalGatewayRouteTableId = "localGatewayRouteTableId",

    // the properties below are optional
    LocalGatewayVirtualInterfaceGroupId = "localGatewayVirtualInterfaceGroupId",
    NetworkInterfaceId = "networkInterfaceId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnLocalGatewayRouteProps := &CfnLocalGatewayRouteProps{
	DestinationCidrBlock: jsii.String("destinationCidrBlock"),
	LocalGatewayRouteTableId: jsii.String("localGatewayRouteTableId"),

	// the properties below are optional
	LocalGatewayVirtualInterfaceGroupId: jsii.String("localGatewayVirtualInterfaceGroupId"),
	NetworkInterfaceId: jsii.String("networkInterfaceId"),
}

Properties ​

destinationCidrBlockstringdestination_cidr_blockstrdestinationCidrBlockStringDestinationCidrBlockstringDestinationCidrBlock*string required #
The CIDR block used for destination matches.
localGatewayRouteTableIdstringlocal_gateway_route_table_idstrlocalGatewayRouteTableIdStringLocalGatewayRouteTableIdstringLocalGatewayRouteTableId*string required #
The ID of the local gateway route table.
localGatewayVirtualInterfaceGroupIdoptionalstringlocal_gateway_virtual_interface_group_idoptionalstrlocalGatewayVirtualInterfaceGroupIdoptionalStringLocalGatewayVirtualInterfaceGroupIdoptionalstringLocalGatewayVirtualInterfaceGroupIdoptional*string #
The ID of the virtual interface group.
networkInterfaceIdoptionalstringnetwork_interface_idoptionalstrnetworkInterfaceIdoptionalStringNetworkInterfaceIdoptionalstringNetworkInterfaceIdoptional*string #
The ID of the network interface.