Skip to content
v2.278.0

PortRangeProperty Struct ​

A single port range specification.

This is used for source and destination port ranges in the stateless rule MatchAttributes , SourcePorts , and DestinationPorts settings.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const portRangeProperty: networkfirewall.CfnTLSInspectionConfiguration.PortRangeProperty = {
  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_networkfirewall as networkfirewall

port_range_property = networkfirewall.CfnTLSInspectionConfiguration.PortRangeProperty(
    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.networkfirewall.*;

PortRangeProperty portRangeProperty = PortRangeProperty.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.NetworkFirewall;

var portRangeProperty = new PortRangeProperty {
    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"

portRangeProperty := &PortRangeProperty{
	FromPort: jsii.Number(123),
	ToPort: jsii.Number(123),
}

Properties ​

fromPortnumberfrom_portint | floatfromPortNumberFromPortdoubleFromPort*float64 required #
The lower limit of the port range.

This must be less than or equal to the ToPort specification.

toPortnumberto_portint | floattoPortNumberToPortdoubleToPort*float64 required #
The upper limit of the port range.

This must be greater than or equal to the FromPort specification.