> **Experimental**
>
> `@aws-cdk/aws-gamelift-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# 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.

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

## Example

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

```ts
new Peer()
```

## Methods

- `anyIpv4(): IPeer` (static) — Any IPv4 address.

- `ipv4(cidrIp: string): IPeer` (static) — Create an IPv4 peer from a CIDR.
