# CfnNetworkInsightsPathProps

Properties for defining a `CfnNetworkInsightsPath`.

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

- Source: Generated at build time
- Type last changed: v2.79.0 · 10 May 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 cfnNetworkInsightsPathProps: ec2.CfnNetworkInsightsPathProps = {
  protocol: 'protocol',
  source: 'source',

  // the properties below are optional
  destination: 'destination',
  destinationIp: 'destinationIp',
  destinationPort: 123,
  filterAtDestination: {
    destinationAddress: 'destinationAddress',
    destinationPortRange: {
      fromPort: 123,
      toPort: 123,
    },
    sourceAddress: 'sourceAddress',
    sourcePortRange: {
      fromPort: 123,
      toPort: 123,
    },
  },
  filterAtSource: {
    destinationAddress: 'destinationAddress',
    destinationPortRange: {
      fromPort: 123,
      toPort: 123,
    },
    sourceAddress: 'sourceAddress',
    sourcePortRange: {
      fromPort: 123,
      toPort: 123,
    },
  },
  sourceIp: 'sourceIp',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# 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_network_insights_path_props = ec2.CfnNetworkInsightsPathProps(
    protocol="protocol",
    source="source",

    # the properties below are optional
    destination="destination",
    destination_ip="destinationIp",
    destination_port=123,
    filter_at_destination=ec2.CfnNetworkInsightsPath.PathFilterProperty(
        destination_address="destinationAddress",
        destination_port_range=ec2.CfnNetworkInsightsPath.FilterPortRangeProperty(
            from_port=123,
            to_port=123
        ),
        source_address="sourceAddress",
        source_port_range=ec2.CfnNetworkInsightsPath.FilterPortRangeProperty(
            from_port=123,
            to_port=123
        )
    ),
    filter_at_source=ec2.CfnNetworkInsightsPath.PathFilterProperty(
        destination_address="destinationAddress",
        destination_port_range=ec2.CfnNetworkInsightsPath.FilterPortRangeProperty(
            from_port=123,
            to_port=123
        ),
        source_address="sourceAddress",
        source_port_range=ec2.CfnNetworkInsightsPath.FilterPortRangeProperty(
            from_port=123,
            to_port=123
        )
    ),
    source_ip="sourceIp",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

CfnNetworkInsightsPathProps cfnNetworkInsightsPathProps = CfnNetworkInsightsPathProps.builder()
        .protocol("protocol")
        .source("source")

        // the properties below are optional
        .destination("destination")
        .destinationIp("destinationIp")
        .destinationPort(123)
        .filterAtDestination(PathFilterProperty.builder()
                .destinationAddress("destinationAddress")
                .destinationPortRange(FilterPortRangeProperty.builder()
                        .fromPort(123)
                        .toPort(123)
                        .build())
                .sourceAddress("sourceAddress")
                .sourcePortRange(FilterPortRangeProperty.builder()
                        .fromPort(123)
                        .toPort(123)
                        .build())
                .build())
        .filterAtSource(PathFilterProperty.builder()
                .destinationAddress("destinationAddress")
                .destinationPortRange(FilterPortRangeProperty.builder()
                        .fromPort(123)
                        .toPort(123)
                        .build())
                .sourceAddress("sourceAddress")
                .sourcePortRange(FilterPortRangeProperty.builder()
                        .fromPort(123)
                        .toPort(123)
                        .build())
                .build())
        .sourceIp("sourceIp")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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 cfnNetworkInsightsPathProps = new CfnNetworkInsightsPathProps {
    Protocol = "protocol",
    Source = "source",

    // the properties below are optional
    Destination = "destination",
    DestinationIp = "destinationIp",
    DestinationPort = 123,
    FilterAtDestination = new PathFilterProperty {
        DestinationAddress = "destinationAddress",
        DestinationPortRange = new FilterPortRangeProperty {
            FromPort = 123,
            ToPort = 123
        },
        SourceAddress = "sourceAddress",
        SourcePortRange = new FilterPortRangeProperty {
            FromPort = 123,
            ToPort = 123
        }
    },
    FilterAtSource = new PathFilterProperty {
        DestinationAddress = "destinationAddress",
        DestinationPortRange = new FilterPortRangeProperty {
            FromPort = 123,
            ToPort = 123
        },
        SourceAddress = "sourceAddress",
        SourcePortRange = new FilterPortRangeProperty {
            FromPort = 123,
            ToPort = 123
        }
    },
    SourceIp = "sourceIp",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

cfnNetworkInsightsPathProps := &CfnNetworkInsightsPathProps{
	Protocol: jsii.String("protocol"),
	Source: jsii.String("source"),

	// the properties below are optional
	Destination: jsii.String("destination"),
	DestinationIp: jsii.String("destinationIp"),
	DestinationPort: jsii.Number(123),
	FilterAtDestination: &PathFilterProperty{
		DestinationAddress: jsii.String("destinationAddress"),
		DestinationPortRange: &FilterPortRangeProperty{
			FromPort: jsii.Number(123),
			ToPort: jsii.Number(123),
		},
		SourceAddress: jsii.String("sourceAddress"),
		SourcePortRange: &FilterPortRangeProperty{
			FromPort: jsii.Number(123),
			ToPort: jsii.Number(123),
		},
	},
	FilterAtSource: &PathFilterProperty{
		DestinationAddress: jsii.String("destinationAddress"),
		DestinationPortRange: &FilterPortRangeProperty{
			FromPort: jsii.Number(123),
			ToPort: jsii.Number(123),
		},
		SourceAddress: jsii.String("sourceAddress"),
		SourcePortRange: &FilterPortRangeProperty{
			FromPort: jsii.Number(123),
			ToPort: jsii.Number(123),
		},
	},
	SourceIp: jsii.String("sourceIp"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `destination`: string — The ID or ARN of the destination.

  If the resource is in another account, you must specify an ARN.

- `destinationIp`: string — The IP address of the destination.

- `destinationPort`: number — The destination port.

- `filterAtDestination`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnNetworkInsightsPath.PathFilterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnNetworkInsightsPath.PathFilterProperty.html) — Scopes the analysis to network paths that match specific filters at the destination.

  If you specify this parameter, you can't specify the parameter for the destination IP address.

- `filterAtSource`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnNetworkInsightsPath.PathFilterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnNetworkInsightsPath.PathFilterProperty.html) — Scopes the analysis to network paths that match specific filters at the source.

  If you specify this parameter, you can't specify the parameters for the source IP address or the destination port.

- `protocol`: string (required) — The protocol.

- `source`: string (required) — The ID or ARN of the source.

  If the resource is in another account, you must specify an ARN.

- `sourceIp`: string — The IP address of the source.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags to add to the path.
