Skip to content
v2.278.0

Experimental

@aws-cdk/aws-gamelift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

PortProps Struct ​

Properties to create 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 * 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
# 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
// 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();
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
};
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 ​

fromPortnumberfrom_portint | floatfromPortNumberFromPortdoubleFromPort*float64 required #
A starting value for a range of allowed port numbers.

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

protocolProtocolprotocolProtocolprotocolProtocolProtocolProtocolProtocolProtocol required #
The protocol for the range.
toPortoptionalnumberto_portoptionalint | floattoPortoptionalNumberToPortoptionaldoubleToPortoptional*float64 #
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.