java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.gamelift.alpha.Peer
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-10-31T19:13:07.842Z") @Stability(Experimental) public class Peer extends software.amazon.jsii.JsiiObject
(experimental) 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:

 Build build;
 BuildFleet fleet = BuildFleet.Builder.create(this, "Game server fleet")
         .fleetName("test-fleet")
         .content(build)
         .instanceType(InstanceType.of(InstanceClass.C4, InstanceSize.LARGE))
         .runtimeConfiguration(RuntimeConfiguration.builder()
                 .serverProcesses(List.of(ServerProcess.builder()
                         .launchPath("/local/game/GameLiftExampleServer.x86_64")
                         .build()))
                 .build())
         .ingressRules(List.of(IngressRule.builder()
                 .source(Peer.anyIpv4())
                 .port(Port.tcpRange(100, 200))
                 .build()))
         .build();
 // Allowing a specific CIDR for port 1111 on UDP Protocol
 fleet.addIngressRule(Peer.ipv4("1.2.3.4/32"), Port.udp(1111));
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    Peer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Peer(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static IPeer
    (experimental) Any IPv4 address.
    static IPeer
    ipv4(String cidrIp)
    (experimental) Create an IPv4 peer from a CIDR.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Peer

      protected Peer(software.amazon.jsii.JsiiObjectRef objRef)
    • Peer

      protected Peer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Peer

      @Stability(Experimental) public Peer()
  • Method Details

    • anyIpv4

      @Stability(Experimental) @NotNull public static IPeer anyIpv4()
      (experimental) Any IPv4 address.
    • ipv4

      @Stability(Experimental) @NotNull public static IPeer ipv4(@NotNull String cidrIp)
      (experimental) Create an IPv4 peer from a CIDR.

      Parameters:
      cidrIp - This parameter is required.