@aws-cdk_aws-gamelift-alpha.Peer

class Peer ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.GameLift.Alpha.Peer
Gogithub.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#Peer
Javasoftware.amazon.awscdk.services.gamelift.alpha.Peer
Pythonaws_cdk.aws_gamelift_alpha.Peer
TypeScript (source)@aws-cdk/aws-gamelift-alpha ยป Peer

Peer object factories.

The static methods on this object can be used to create peer objects which represent a connection partner in inbound permission rules.

Use this object if you need to represent connection partners using plain IP addresses.

Example

declare const build: gamelift.Build;

const fleet = new gamelift.BuildFleet(this, 'Game server fleet', {
  fleetName: 'test-fleet',
  content: build,
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE),
  runtimeConfiguration: {
    serverProcesses: [{
      launchPath: '/local/game/GameLiftExampleServer.x86_64',
    }]
  },
  ingressRules: [{
    source: gamelift.Peer.anyIpv4(),
    port: gamelift.Port.tcpRange(100, 200),
  }]
});
// Allowing a specific CIDR for port 1111 on UDP Protocol
fleet.addIngressRule(gamelift.Peer.ipv4('1.2.3.4/32'), gamelift.Port.udp(1111));

Initializer

new Peer()

Methods

NameDescription
static anyIpv4()๐Ÿ”นAny IPv4 address.
static ipv4(cidrIp)๐Ÿ”นCreate an IPv4 peer from a CIDR.

static anyIpv4()๐Ÿ”น

public static anyIpv4(): IPeer

Returns

  • IPeer

Any IPv4 address.


static ipv4(cidrIp)๐Ÿ”น

public static ipv4(cidrIp: string): IPeer

Parameters

  • cidrIp string

Returns

  • IPeer

Create an IPv4 peer from a CIDR.