Skip to content
v2.278.0

FilterPortRangeProperty Struct ​

Describes a port range.

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 filterPortRangeProperty: ec2.CfnNetworkInsightsPath.FilterPortRangeProperty = {
  fromPort: 123,
  toPort: 123,
};
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

filter_port_range_property = ec2.CfnNetworkInsightsPath.FilterPortRangeProperty(
    from_port=123,
    to_port=123
)
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.*;

FilterPortRangeProperty filterPortRangeProperty = FilterPortRangeProperty.builder()
        .fromPort(123)
        .toPort(123)
        .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 filterPortRangeProperty = new FilterPortRangeProperty {
    FromPort = 123,
    ToPort = 123
};
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"

filterPortRangeProperty := &FilterPortRangeProperty{
	FromPort: jsii.Number(123),
	ToPort: jsii.Number(123),
}

Properties ​

fromPortoptionalnumberfrom_portoptionalint | floatfromPortoptionalNumberFromPortoptionaldoubleFromPortoptional*float64 #
The first port in the range.
toPortoptionalnumberto_portoptionalint | floattoPortoptionalNumberToPortoptionaldoubleToPortoptional*float64 #
The last port in the range.