> **Experimental**
>
> `@aws-cdk/aws-gamelift-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# PortProps

Properties to create a port range.

Used as props by: [Port](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.Port.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/ingress-rule.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-gamelift-alpha/lib/ingress-rule.ts#L16)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as gamelift_alpha from '@aws-cdk/aws-gamelift-alpha';
const portProps: gamelift_alpha.PortProps = {
  fromPort: 123,
  protocol: gamelift_alpha.Protocol.TCP,

  // the properties below are optional
  toPort: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_gamelift_alpha as gamelift_alpha

port_props = gamelift_alpha.PortProps(
    from_port=123,
    protocol=gamelift_alpha.Protocol.TCP,

    # the properties below are optional
    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.gamelift.alpha.*;

PortProps portProps = PortProps.builder()
        .fromPort(123)
        .protocol(Protocol.TCP)

        // the properties below are optional
        .toPort(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.GameLift.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GameLift.Alpha;

var portProps = new PortProps {
    FromPort = 123,
    Protocol = Protocol.TCP,

    // the properties below are optional
    ToPort = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

portProps := &PortProps{
	FromPort: jsii.Number(123),
	Protocol: gamelift_alpha.Protocol_TCP,

	// the properties below are optional
	ToPort: jsii.Number(123),
}
```

## Properties

- `fromPort`: number (required) — A starting value for a range of allowed port numbers.

  For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

- `protocol`: [Protocol](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.Protocol.html) (required) — The protocol for the range.

- `toPort`: number — An ending value for a range of allowed port numbers.

  **Default:** the `fromPort` value

  Port numbers are end-inclusive.
  This value must be higher than `fromPort`.

  For fleets using Windows and Linux builds, only ports 1026-60000 are valid.
