Skip to content
v2.278.0

CfnNetworkInsightsAccessScopeProps ​

Struct External

Properties for defining a CfnNetworkInsightsAccessScope.

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 cfnNetworkInsightsAccessScopeProps: ec2.CfnNetworkInsightsAccessScopeProps = {
  excludePaths: [{
    destination: {
      packetHeaderStatement: {
        destinationAddresses: ['destinationAddresses'],
        destinationPorts: ['destinationPorts'],
        destinationPrefixLists: ['destinationPrefixLists'],
        protocols: ['protocols'],
        sourceAddresses: ['sourceAddresses'],
        sourcePorts: ['sourcePorts'],
        sourcePrefixLists: ['sourcePrefixLists'],
      },
      resourceStatement: {
        resources: ['resources'],
        resourceTypes: ['resourceTypes'],
      },
    },
    source: {
      packetHeaderStatement: {
        destinationAddresses: ['destinationAddresses'],
        destinationPorts: ['destinationPorts'],
        destinationPrefixLists: ['destinationPrefixLists'],
        protocols: ['protocols'],
        sourceAddresses: ['sourceAddresses'],
        sourcePorts: ['sourcePorts'],
        sourcePrefixLists: ['sourcePrefixLists'],
      },
      resourceStatement: {
        resources: ['resources'],
        resourceTypes: ['resourceTypes'],
      },
    },
    throughResources: [{
      resourceStatement: {
        resources: ['resources'],
        resourceTypes: ['resourceTypes'],
      },
    }],
  }],
  matchPaths: [{
    destination: {
      packetHeaderStatement: {
        destinationAddresses: ['destinationAddresses'],
        destinationPorts: ['destinationPorts'],
        destinationPrefixLists: ['destinationPrefixLists'],
        protocols: ['protocols'],
        sourceAddresses: ['sourceAddresses'],
        sourcePorts: ['sourcePorts'],
        sourcePrefixLists: ['sourcePrefixLists'],
      },
      resourceStatement: {
        resources: ['resources'],
        resourceTypes: ['resourceTypes'],
      },
    },
    source: {
      packetHeaderStatement: {
        destinationAddresses: ['destinationAddresses'],
        destinationPorts: ['destinationPorts'],
        destinationPrefixLists: ['destinationPrefixLists'],
        protocols: ['protocols'],
        sourceAddresses: ['sourceAddresses'],
        sourcePorts: ['sourcePorts'],
        sourcePrefixLists: ['sourcePrefixLists'],
      },
      resourceStatement: {
        resources: ['resources'],
        resourceTypes: ['resourceTypes'],
      },
    },
    throughResources: [{
      resourceStatement: {
        resources: ['resources'],
        resourceTypes: ['resourceTypes'],
      },
    }],
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
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_access_scope_props = ec2.CfnNetworkInsightsAccessScopeProps(
    exclude_paths=[ec2.CfnNetworkInsightsAccessScope.AccessScopePathRequestProperty(
        destination=ec2.CfnNetworkInsightsAccessScope.PathStatementRequestProperty(
            packet_header_statement=ec2.CfnNetworkInsightsAccessScope.PacketHeaderStatementRequestProperty(
                destination_addresses=["destinationAddresses"],
                destination_ports=["destinationPorts"],
                destination_prefix_lists=["destinationPrefixLists"],
                protocols=["protocols"],
                source_addresses=["sourceAddresses"],
                source_ports=["sourcePorts"],
                source_prefix_lists=["sourcePrefixLists"]
            ),
            resource_statement=ec2.CfnNetworkInsightsAccessScope.ResourceStatementRequestProperty(
                resources=["resources"],
                resource_types=["resourceTypes"]
            )
        ),
        source=ec2.CfnNetworkInsightsAccessScope.PathStatementRequestProperty(
            packet_header_statement=ec2.CfnNetworkInsightsAccessScope.PacketHeaderStatementRequestProperty(
                destination_addresses=["destinationAddresses"],
                destination_ports=["destinationPorts"],
                destination_prefix_lists=["destinationPrefixLists"],
                protocols=["protocols"],
                source_addresses=["sourceAddresses"],
                source_ports=["sourcePorts"],
                source_prefix_lists=["sourcePrefixLists"]
            ),
            resource_statement=ec2.CfnNetworkInsightsAccessScope.ResourceStatementRequestProperty(
                resources=["resources"],
                resource_types=["resourceTypes"]
            )
        ),
        through_resources=[ec2.CfnNetworkInsightsAccessScope.ThroughResourcesStatementRequestProperty(
            resource_statement=ec2.CfnNetworkInsightsAccessScope.ResourceStatementRequestProperty(
                resources=["resources"],
                resource_types=["resourceTypes"]
            )
        )]
    )],
    match_paths=[ec2.CfnNetworkInsightsAccessScope.AccessScopePathRequestProperty(
        destination=ec2.CfnNetworkInsightsAccessScope.PathStatementRequestProperty(
            packet_header_statement=ec2.CfnNetworkInsightsAccessScope.PacketHeaderStatementRequestProperty(
                destination_addresses=["destinationAddresses"],
                destination_ports=["destinationPorts"],
                destination_prefix_lists=["destinationPrefixLists"],
                protocols=["protocols"],
                source_addresses=["sourceAddresses"],
                source_ports=["sourcePorts"],
                source_prefix_lists=["sourcePrefixLists"]
            ),
            resource_statement=ec2.CfnNetworkInsightsAccessScope.ResourceStatementRequestProperty(
                resources=["resources"],
                resource_types=["resourceTypes"]
            )
        ),
        source=ec2.CfnNetworkInsightsAccessScope.PathStatementRequestProperty(
            packet_header_statement=ec2.CfnNetworkInsightsAccessScope.PacketHeaderStatementRequestProperty(
                destination_addresses=["destinationAddresses"],
                destination_ports=["destinationPorts"],
                destination_prefix_lists=["destinationPrefixLists"],
                protocols=["protocols"],
                source_addresses=["sourceAddresses"],
                source_ports=["sourcePorts"],
                source_prefix_lists=["sourcePrefixLists"]
            ),
            resource_statement=ec2.CfnNetworkInsightsAccessScope.ResourceStatementRequestProperty(
                resources=["resources"],
                resource_types=["resourceTypes"]
            )
        ),
        through_resources=[ec2.CfnNetworkInsightsAccessScope.ThroughResourcesStatementRequestProperty(
            resource_statement=ec2.CfnNetworkInsightsAccessScope.ResourceStatementRequestProperty(
                resources=["resources"],
                resource_types=["resourceTypes"]
            )
        )]
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.*;

CfnNetworkInsightsAccessScopeProps cfnNetworkInsightsAccessScopeProps = CfnNetworkInsightsAccessScopeProps.builder()
        .excludePaths(List.of(AccessScopePathRequestProperty.builder()
                .destination(PathStatementRequestProperty.builder()
                        .packetHeaderStatement(PacketHeaderStatementRequestProperty.builder()
                                .destinationAddresses(List.of("destinationAddresses"))
                                .destinationPorts(List.of("destinationPorts"))
                                .destinationPrefixLists(List.of("destinationPrefixLists"))
                                .protocols(List.of("protocols"))
                                .sourceAddresses(List.of("sourceAddresses"))
                                .sourcePorts(List.of("sourcePorts"))
                                .sourcePrefixLists(List.of("sourcePrefixLists"))
                                .build())
                        .resourceStatement(ResourceStatementRequestProperty.builder()
                                .resources(List.of("resources"))
                                .resourceTypes(List.of("resourceTypes"))
                                .build())
                        .build())
                .source(PathStatementRequestProperty.builder()
                        .packetHeaderStatement(PacketHeaderStatementRequestProperty.builder()
                                .destinationAddresses(List.of("destinationAddresses"))
                                .destinationPorts(List.of("destinationPorts"))
                                .destinationPrefixLists(List.of("destinationPrefixLists"))
                                .protocols(List.of("protocols"))
                                .sourceAddresses(List.of("sourceAddresses"))
                                .sourcePorts(List.of("sourcePorts"))
                                .sourcePrefixLists(List.of("sourcePrefixLists"))
                                .build())
                        .resourceStatement(ResourceStatementRequestProperty.builder()
                                .resources(List.of("resources"))
                                .resourceTypes(List.of("resourceTypes"))
                                .build())
                        .build())
                .throughResources(List.of(ThroughResourcesStatementRequestProperty.builder()
                        .resourceStatement(ResourceStatementRequestProperty.builder()
                                .resources(List.of("resources"))
                                .resourceTypes(List.of("resourceTypes"))
                                .build())
                        .build()))
                .build()))
        .matchPaths(List.of(AccessScopePathRequestProperty.builder()
                .destination(PathStatementRequestProperty.builder()
                        .packetHeaderStatement(PacketHeaderStatementRequestProperty.builder()
                                .destinationAddresses(List.of("destinationAddresses"))
                                .destinationPorts(List.of("destinationPorts"))
                                .destinationPrefixLists(List.of("destinationPrefixLists"))
                                .protocols(List.of("protocols"))
                                .sourceAddresses(List.of("sourceAddresses"))
                                .sourcePorts(List.of("sourcePorts"))
                                .sourcePrefixLists(List.of("sourcePrefixLists"))
                                .build())
                        .resourceStatement(ResourceStatementRequestProperty.builder()
                                .resources(List.of("resources"))
                                .resourceTypes(List.of("resourceTypes"))
                                .build())
                        .build())
                .source(PathStatementRequestProperty.builder()
                        .packetHeaderStatement(PacketHeaderStatementRequestProperty.builder()
                                .destinationAddresses(List.of("destinationAddresses"))
                                .destinationPorts(List.of("destinationPorts"))
                                .destinationPrefixLists(List.of("destinationPrefixLists"))
                                .protocols(List.of("protocols"))
                                .sourceAddresses(List.of("sourceAddresses"))
                                .sourcePorts(List.of("sourcePorts"))
                                .sourcePrefixLists(List.of("sourcePrefixLists"))
                                .build())
                        .resourceStatement(ResourceStatementRequestProperty.builder()
                                .resources(List.of("resources"))
                                .resourceTypes(List.of("resourceTypes"))
                                .build())
                        .build())
                .throughResources(List.of(ThroughResourcesStatementRequestProperty.builder()
                        .resourceStatement(ResourceStatementRequestProperty.builder()
                                .resources(List.of("resources"))
                                .resourceTypes(List.of("resourceTypes"))
                                .build())
                        .build()))
                .build()))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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 cfnNetworkInsightsAccessScopeProps = new CfnNetworkInsightsAccessScopeProps {
    ExcludePaths = new [] { new AccessScopePathRequestProperty {
        Destination = new PathStatementRequestProperty {
            PacketHeaderStatement = new PacketHeaderStatementRequestProperty {
                DestinationAddresses = new [] { "destinationAddresses" },
                DestinationPorts = new [] { "destinationPorts" },
                DestinationPrefixLists = new [] { "destinationPrefixLists" },
                Protocols = new [] { "protocols" },
                SourceAddresses = new [] { "sourceAddresses" },
                SourcePorts = new [] { "sourcePorts" },
                SourcePrefixLists = new [] { "sourcePrefixLists" }
            },
            ResourceStatement = new ResourceStatementRequestProperty {
                Resources = new [] { "resources" },
                ResourceTypes = new [] { "resourceTypes" }
            }
        },
        Source = new PathStatementRequestProperty {
            PacketHeaderStatement = new PacketHeaderStatementRequestProperty {
                DestinationAddresses = new [] { "destinationAddresses" },
                DestinationPorts = new [] { "destinationPorts" },
                DestinationPrefixLists = new [] { "destinationPrefixLists" },
                Protocols = new [] { "protocols" },
                SourceAddresses = new [] { "sourceAddresses" },
                SourcePorts = new [] { "sourcePorts" },
                SourcePrefixLists = new [] { "sourcePrefixLists" }
            },
            ResourceStatement = new ResourceStatementRequestProperty {
                Resources = new [] { "resources" },
                ResourceTypes = new [] { "resourceTypes" }
            }
        },
        ThroughResources = new [] { new ThroughResourcesStatementRequestProperty {
            ResourceStatement = new ResourceStatementRequestProperty {
                Resources = new [] { "resources" },
                ResourceTypes = new [] { "resourceTypes" }
            }
        } }
    } },
    MatchPaths = new [] { new AccessScopePathRequestProperty {
        Destination = new PathStatementRequestProperty {
            PacketHeaderStatement = new PacketHeaderStatementRequestProperty {
                DestinationAddresses = new [] { "destinationAddresses" },
                DestinationPorts = new [] { "destinationPorts" },
                DestinationPrefixLists = new [] { "destinationPrefixLists" },
                Protocols = new [] { "protocols" },
                SourceAddresses = new [] { "sourceAddresses" },
                SourcePorts = new [] { "sourcePorts" },
                SourcePrefixLists = new [] { "sourcePrefixLists" }
            },
            ResourceStatement = new ResourceStatementRequestProperty {
                Resources = new [] { "resources" },
                ResourceTypes = new [] { "resourceTypes" }
            }
        },
        Source = new PathStatementRequestProperty {
            PacketHeaderStatement = new PacketHeaderStatementRequestProperty {
                DestinationAddresses = new [] { "destinationAddresses" },
                DestinationPorts = new [] { "destinationPorts" },
                DestinationPrefixLists = new [] { "destinationPrefixLists" },
                Protocols = new [] { "protocols" },
                SourceAddresses = new [] { "sourceAddresses" },
                SourcePorts = new [] { "sourcePorts" },
                SourcePrefixLists = new [] { "sourcePrefixLists" }
            },
            ResourceStatement = new ResourceStatementRequestProperty {
                Resources = new [] { "resources" },
                ResourceTypes = new [] { "resourceTypes" }
            }
        },
        ThroughResources = new [] { new ThroughResourcesStatementRequestProperty {
            ResourceStatement = new ResourceStatementRequestProperty {
                Resources = new [] { "resources" },
                ResourceTypes = new [] { "resourceTypes" }
            }
        } }
    } },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

cfnNetworkInsightsAccessScopeProps := &CfnNetworkInsightsAccessScopeProps{
	ExcludePaths: []interface{}{
		&AccessScopePathRequestProperty{
			Destination: &PathStatementRequestProperty{
				PacketHeaderStatement: &PacketHeaderStatementRequestProperty{
					DestinationAddresses: []*string{
						jsii.String("destinationAddresses"),
					},
					DestinationPorts: []*string{
						jsii.String("destinationPorts"),
					},
					DestinationPrefixLists: []*string{
						jsii.String("destinationPrefixLists"),
					},
					Protocols: []*string{
						jsii.String("protocols"),
					},
					SourceAddresses: []*string{
						jsii.String("sourceAddresses"),
					},
					SourcePorts: []*string{
						jsii.String("sourcePorts"),
					},
					SourcePrefixLists: []*string{
						jsii.String("sourcePrefixLists"),
					},
				},
				ResourceStatement: &ResourceStatementRequestProperty{
					Resources: []*string{
						jsii.String("resources"),
					},
					ResourceTypes: []*string{
						jsii.String("resourceTypes"),
					},
				},
			},
			Source: &PathStatementRequestProperty{
				PacketHeaderStatement: &PacketHeaderStatementRequestProperty{
					DestinationAddresses: []*string{
						jsii.String("destinationAddresses"),
					},
					DestinationPorts: []*string{
						jsii.String("destinationPorts"),
					},
					DestinationPrefixLists: []*string{
						jsii.String("destinationPrefixLists"),
					},
					Protocols: []*string{
						jsii.String("protocols"),
					},
					SourceAddresses: []*string{
						jsii.String("sourceAddresses"),
					},
					SourcePorts: []*string{
						jsii.String("sourcePorts"),
					},
					SourcePrefixLists: []*string{
						jsii.String("sourcePrefixLists"),
					},
				},
				ResourceStatement: &ResourceStatementRequestProperty{
					Resources: []*string{
						jsii.String("resources"),
					},
					ResourceTypes: []*string{
						jsii.String("resourceTypes"),
					},
				},
			},
			ThroughResources: []interface{}{
				&ThroughResourcesStatementRequestProperty{
					ResourceStatement: &ResourceStatementRequestProperty{
						Resources: []*string{
							jsii.String("resources"),
						},
						ResourceTypes: []*string{
							jsii.String("resourceTypes"),
						},
					},
				},
			},
		},
	},
	MatchPaths: []interface{}{
		&AccessScopePathRequestProperty{
			Destination: &PathStatementRequestProperty{
				PacketHeaderStatement: &PacketHeaderStatementRequestProperty{
					DestinationAddresses: []*string{
						jsii.String("destinationAddresses"),
					},
					DestinationPorts: []*string{
						jsii.String("destinationPorts"),
					},
					DestinationPrefixLists: []*string{
						jsii.String("destinationPrefixLists"),
					},
					Protocols: []*string{
						jsii.String("protocols"),
					},
					SourceAddresses: []*string{
						jsii.String("sourceAddresses"),
					},
					SourcePorts: []*string{
						jsii.String("sourcePorts"),
					},
					SourcePrefixLists: []*string{
						jsii.String("sourcePrefixLists"),
					},
				},
				ResourceStatement: &ResourceStatementRequestProperty{
					Resources: []*string{
						jsii.String("resources"),
					},
					ResourceTypes: []*string{
						jsii.String("resourceTypes"),
					},
				},
			},
			Source: &PathStatementRequestProperty{
				PacketHeaderStatement: &PacketHeaderStatementRequestProperty{
					DestinationAddresses: []*string{
						jsii.String("destinationAddresses"),
					},
					DestinationPorts: []*string{
						jsii.String("destinationPorts"),
					},
					DestinationPrefixLists: []*string{
						jsii.String("destinationPrefixLists"),
					},
					Protocols: []*string{
						jsii.String("protocols"),
					},
					SourceAddresses: []*string{
						jsii.String("sourceAddresses"),
					},
					SourcePorts: []*string{
						jsii.String("sourcePorts"),
					},
					SourcePrefixLists: []*string{
						jsii.String("sourcePrefixLists"),
					},
				},
				ResourceStatement: &ResourceStatementRequestProperty{
					Resources: []*string{
						jsii.String("resources"),
					},
					ResourceTypes: []*string{
						jsii.String("resourceTypes"),
					},
				},
			},
			ThroughResources: []interface{}{
				&ThroughResourcesStatementRequestProperty{
					ResourceStatement: &ResourceStatementRequestProperty{
						Resources: []*string{
							jsii.String("resources"),
						},
						ResourceTypes: []*string{
							jsii.String("resourceTypes"),
						},
					},
				},
			},
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

excludePathsoptionalIResolvable | IResolvable | CfnNetworkInsightsAccessScope.AccessScopePathRequestProperty[]exclude_pathsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AccessScopePathRequestProperty]]]excludePathsoptionalIResolvableExcludePathsoptionalIResolvableExcludePathsoptionalinterface{} #
The paths to exclude.
matchPathsoptionalIResolvable | IResolvable | CfnNetworkInsightsAccessScope.AccessScopePathRequestProperty[]match_pathsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AccessScopePathRequestProperty]]]matchPathsoptionalIResolvableMatchPathsoptionalIResolvableMatchPathsoptionalinterface{} #
The paths to match.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The tags.