software.amazon.awscdk.services.gamelift.alpha.Peer Maven / Gradle / Ivy
Show all versions of gamelift-alpha Show documentation
package software.amazon.awscdk.services.gamelift.alpha;
/**
* (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));
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-27T17:02:12.135Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.gamelift.alpha.$Module.class, fqn = "@aws-cdk/aws-gamelift-alpha.Peer")
public class Peer extends software.amazon.jsii.JsiiObject {
protected Peer(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Peer(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Peer() {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
}
/**
* (experimental) Any IPv4 address.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IPeer anyIpv4() {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Peer.class, "anyIpv4", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IPeer.class));
}
/**
* (experimental) Create an IPv4 peer from a CIDR.
*
* @param cidrIp This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.gamelift.alpha.IPeer ipv4(final @org.jetbrains.annotations.NotNull java.lang.String cidrIp) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.gamelift.alpha.Peer.class, "ipv4", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.gamelift.alpha.IPeer.class), new Object[] { java.util.Objects.requireNonNull(cidrIp, "cidrIp is required") });
}
}