# PortRangeProperty

A single port range specification.

This is used for source and destination port ranges in the stateless rule [MatchAttributes](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-matchattributes.html) , `SourcePorts` , and `DestinationPorts` settings.

- Source: Generated at build time
- Type last changed: v2.117.0 · 27 Dec 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_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const portRangeProperty: networkfirewall.CfnTLSInspectionConfiguration.PortRangeProperty = {
  fromPort: 123,
  toPort: 123,
};
```

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_networkfirewall as networkfirewall

port_range_property = networkfirewall.CfnTLSInspectionConfiguration.PortRangeProperty(
    from_port=123,
    to_port=123
)
```

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

PortRangeProperty portRangeProperty = PortRangeProperty.builder()
        .fromPort(123)
        .toPort(123)
        .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.NetworkFirewall;

var portRangeProperty = new PortRangeProperty {
    FromPort = 123,
    ToPort = 123
};
```

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"

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

## Properties

- `fromPort`: number (required) — The lower limit of the port range.

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

- `toPort`: number (required) — The upper limit of the port range.

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