# CfnGatewayRouteTableAssociationProps

Properties for defining a `CfnGatewayRouteTableAssociation`.

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

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## 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 cfnGatewayRouteTableAssociationProps: ec2.CfnGatewayRouteTableAssociationProps = {
  gatewayId: 'gatewayId',
  routeTableId: 'routeTableId',
};
```

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_gateway_route_table_association_props = ec2.CfnGatewayRouteTableAssociationProps(
    gateway_id="gatewayId",
    route_table_id="routeTableId"
)
```

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.*;

CfnGatewayRouteTableAssociationProps cfnGatewayRouteTableAssociationProps = CfnGatewayRouteTableAssociationProps.builder()
        .gatewayId("gatewayId")
        .routeTableId("routeTableId")
        .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 cfnGatewayRouteTableAssociationProps = new CfnGatewayRouteTableAssociationProps {
    GatewayId = "gatewayId",
    RouteTableId = "routeTableId"
};
```

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"

cfnGatewayRouteTableAssociationProps := &CfnGatewayRouteTableAssociationProps{
	GatewayId: jsii.String("gatewayId"),
	RouteTableId: jsii.String("routeTableId"),
}
```

## Properties

- `gatewayId`: string | [IInternetGatewayRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IInternetGatewayRef.html) | [IVPNGatewayRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IVPNGatewayRef.html) (required) — The ID of the gateway.

- `routeTableId`: string | [IRouteTableRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IRouteTableRef.html) (required) — The ID of the route table.
