Experimental
@aws-cdk/aws-gamelift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
IngressRule Struct
A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet.
New game sessions are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.
Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.
| Stability | Experimental |
|---|---|
| Source | lib/ingress-rule.ts |
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';
declare const peer: gamelift_alpha.IPeer;
declare const port: gamelift_alpha.Port;
const ingressRule: gamelift_alpha.IngressRule = {
port: port,
source: peer,
};
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
# peer: gamelift_alpha.IPeer
# port: gamelift_alpha.Port
ingress_rule = gamelift_alpha.IngressRule(
port=port,
source=peer
)
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.*;
IPeer peer;
Port port;
IngressRule ingressRule = IngressRule.builder()
.port(port)
.source(peer)
.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;
IPeer peer;
Port port;
var ingressRule = new IngressRule {
Port = port,
Source = peer
};
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"
var peer IPeer
var port Port
ingressRule := &IngressRule{
Port: port,
Source: peer,
}