# AclPortRange

Struct · Stable

Properties to create PortRange.

- Source: [`aws-ec2/lib/network-acl-types.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ec2/lib/network-acl-types.ts#L235)

## 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 aclPortRange: ec2.AclPortRange = {
  from: 123,
  to: 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_ec2 as ec2

acl_port_range = ec2.AclPortRange(
    from=123,
    to=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.ec2.*;

AclPortRange aclPortRange = AclPortRange.builder()
        .from(123)
        .to(123)
        .build();
```

C#:

```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 aclPortRange = new AclPortRange {
    From = 123,
    To = 123
};
```

Go:

```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"

aclPortRange := &AclPortRange{
	From: jsii.Number(123),
	To: jsii.Number(123),
}
```

## Properties

- `from`: number — The first port in the range.

  Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.

- `to`: number — The last port in the range.

  Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.
