# CfnLocalGatewayRouteProps

Properties for defining a `CfnLocalGatewayRoute`.

Used as props by: [CfnLocalGatewayRoute](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnLocalGatewayRoute.html)

- Source: Generated at build time
- Type last changed: v2.51.0 · 18 Nov 2022

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
};
```

Golang:

```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

- `destinationCidrBlock`: string (required) — The CIDR block used for destination matches.

- `localGatewayRouteTableId`: string (required) — The ID of the local gateway route table.

- `localGatewayVirtualInterfaceGroupId`: string — The ID of the virtual interface group.

- `networkInterfaceId`: string — The ID of the network interface.
