Class Port
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.Port
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:39.488Z")
@Stability(Stable)
public class Port
extends software.amazon.jsii.JsiiObject
Interface for classes that provide the connection-specification parts of a security group rule.
Example:
ApplicationLoadBalancer loadBalancer; Vpc vpc = new Vpc(this, "MyVPC"); Project project = Project.Builder.create(this, "MyProject") .vpc(vpc) .buildSpec(BuildSpec.fromObject(Map.of())) .build(); project.connections.allowTo(loadBalancer, Port.tcp(443));
-
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
ah()
A single AH port.static Port
allIcmp()
All ICMP traffic.static Port
allTcp()
Any TCP traffic.static Port
All traffic.static Port
allUdp()
Any UDP traffic.static Port
esp()
A single ESP port.Whether the rule containing this port range can be inlined into a securitygroup or not.static Port
icmpPing()
ICMP ping (echo) traffic.static Port
All codes for a single ICMP type.static Port
icmpTypeAndCode
(Number type, Number code) A specific combination of ICMP type and code.static Port
A single TCP port.static Port
A TCP port range.Produce the ingress/egress rule JSON for the given connection.toString()
static Port
A single UDP port.static Port
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, 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
-
ah
A single AH port. -
allIcmp
All ICMP traffic. -
allTcp
Any TCP traffic. -
allTraffic
All traffic. -
allUdp
Any UDP traffic. -
esp
A single ESP port. -
icmpPing
ICMP ping (echo) traffic. -
icmpType
All codes for a single ICMP type.- Parameters:
type
- This parameter is required.
-
icmpTypeAndCode
@Stability(Stable) @NotNull public static Port icmpTypeAndCode(@NotNull Number type, @NotNull Number code) A specific combination of ICMP type and code.- Parameters:
type
- This parameter is required.code
- This parameter is required.- See Also:
-
tcp
A single TCP port.- Parameters:
port
- This parameter is required.
-
tcpRange
@Stability(Stable) @NotNull public static Port tcpRange(@NotNull Number startPort, @NotNull Number endPort) A TCP port range.- Parameters:
startPort
- This parameter is required.endPort
- This parameter is required.
-
udp
A single UDP port.- Parameters:
port
- This parameter is required.
-
udpRange
@Stability(Stable) @NotNull public static Port udpRange(@NotNull Number startPort, @NotNull Number endPort) A UDP port range.- Parameters:
startPort
- This parameter is required.endPort
- This parameter is required.
-
toRuleJson
Produce the ingress/egress rule JSON for the given connection. -
toString
-
getCanInlineRule
Whether the rule containing this port range can be inlined into a securitygroup or not.
-