Class Port
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.gamelift.alpha.Port
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-11T18:01:25.566Z")
@Stability(Experimental)
public class Port
extends software.amazon.jsii.JsiiObject
(experimental) Interface for classes that provide the connection-specification parts of a security group rule.
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic Port
allTcp()
(experimental) Any TCP traffic.static Port
allUdp()
(experimental) Any UDP traffic.static Port
(experimental) A single TCP port.static Port
(experimental) A TCP port range.toJson()
(experimental) Produce the ingress rule JSON for the given connection.static Port
(experimental) A single UDP port.static Port
(experimental) A UDP port range.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
-
Port
protected Port(software.amazon.jsii.JsiiObjectRef objRef) -
Port
protected Port(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Port
- Parameters:
props
- This parameter is required.
-
-
Method Details
-
allTcp
(experimental) Any TCP traffic. -
allUdp
(experimental) Any UDP traffic. -
tcp
(experimental) A single TCP port.- Parameters:
port
- This parameter is required.
-
tcpRange
@Stability(Experimental) @NotNull public static Port tcpRange(@NotNull Number startPort, @NotNull Number endPort) (experimental) A TCP port range.- Parameters:
startPort
- This parameter is required.endPort
- This parameter is required.
-
udp
(experimental) A single UDP port.- Parameters:
port
- This parameter is required.
-
udpRange
@Stability(Experimental) @NotNull public static Port udpRange(@NotNull Number startPort, @NotNull Number endPort) (experimental) A UDP port range.- Parameters:
startPort
- This parameter is required.endPort
- This parameter is required.
-
toJson
(experimental) Produce the ingress rule JSON for the given connection.
-