# TransitGatewayRouteTableRouteProperty

Describes a route in a transit gateway route table.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## 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 transitGatewayRouteTableRouteProperty: ec2.CfnNetworkInsightsAnalysis.TransitGatewayRouteTableRouteProperty = {
  attachmentId: 'attachmentId',
  destinationCidr: 'destinationCidr',
  prefixListId: 'prefixListId',
  resourceId: 'resourceId',
  resourceType: 'resourceType',
  routeOrigin: 'routeOrigin',
  state: 'state',
};
```

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

transit_gateway_route_table_route_property = ec2.CfnNetworkInsightsAnalysis.TransitGatewayRouteTableRouteProperty(
    attachment_id="attachmentId",
    destination_cidr="destinationCidr",
    prefix_list_id="prefixListId",
    resource_id="resourceId",
    resource_type="resourceType",
    route_origin="routeOrigin",
    state="state"
)
```

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

TransitGatewayRouteTableRouteProperty transitGatewayRouteTableRouteProperty = TransitGatewayRouteTableRouteProperty.builder()
        .attachmentId("attachmentId")
        .destinationCidr("destinationCidr")
        .prefixListId("prefixListId")
        .resourceId("resourceId")
        .resourceType("resourceType")
        .routeOrigin("routeOrigin")
        .state("state")
        .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 transitGatewayRouteTableRouteProperty = new TransitGatewayRouteTableRouteProperty {
    AttachmentId = "attachmentId",
    DestinationCidr = "destinationCidr",
    PrefixListId = "prefixListId",
    ResourceId = "resourceId",
    ResourceType = "resourceType",
    RouteOrigin = "routeOrigin",
    State = "state"
};
```

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"

transitGatewayRouteTableRouteProperty := &TransitGatewayRouteTableRouteProperty{
	AttachmentId: jsii.String("attachmentId"),
	DestinationCidr: jsii.String("destinationCidr"),
	PrefixListId: jsii.String("prefixListId"),
	ResourceId: jsii.String("resourceId"),
	ResourceType: jsii.String("resourceType"),
	RouteOrigin: jsii.String("routeOrigin"),
	State: jsii.String("state"),
}
```

## Properties

- `attachmentId`: string — The ID of the route attachment.

- `destinationCidr`: string — The CIDR block used for destination matches.

- `prefixListId`: string — The ID of the prefix list.

- `resourceId`: string — The ID of the resource for the route attachment.

- `resourceType`: string — The resource type for the route attachment.

- `routeOrigin`: string — The route origin. The following are the possible values:.

  - static
  - propagated

- `state`: string — The state of the route.
