@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.490Z") @Stability(value=Stable) public class Port extends software.amazon.jsii.JsiiObject
Example:
// Example automatically generated from non-compiling source. May contain errors.
InstanceType instanceType;
NatInstanceProvider provider = NatProvider.instance(NatInstanceProps.builder()
.instanceType(instanceType)
.defaultAllowedTraffic(NatTrafficDirection.OUTBOUND_ONLY)
.build());
Vpc.Builder.create(this, "TheVPC")
.natGatewayProvider(provider)
.build();
provider.connections.allowFrom(Peer.ipv4("1.2.3.4/8"), Port.tcp(80));
| Modifier and Type | Class and Description |
|---|---|
static class |
Port.Builder
A fluent builder for
Port. |
| Modifier | Constructor and Description |
|---|---|
protected |
Port(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Port(software.amazon.jsii.JsiiObjectRef objRef) |
|
Port(PortProps props) |
| Modifier and Type | Method and Description |
|---|---|
static Port |
ah()
A single AH port.
|
static Port |
allIcmp()
All ICMP traffic.
|
static Port |
allIcmpV6()
All ICMPv6 traffic.
|
static Port |
allTcp()
Any TCP traffic.
|
static Port |
allTraffic()
All traffic.
|
static Port |
allUdp()
Any UDP traffic.
|
static Port |
esp()
A single ESP port.
|
Boolean |
getCanInlineRule()
Whether the rule containing this port range can be inlined into a securitygroup or not.
|
static Port |
icmpPing()
ICMP ping (echo) traffic.
|
static Port |
icmpType(Number type)
All codes for a single ICMP type.
|
static Port |
icmpTypeAndCode(Number type,
Number code)
A specific combination of ICMP type and code.
|
static Port |
tcp(Number port)
A single TCP port.
|
static Port |
tcpRange(Number startPort,
Number endPort)
A TCP port range.
|
Object |
toRuleJson()
Produce the ingress/egress rule JSON for the given connection.
|
String |
toString() |
static Port |
udp(Number port)
A single UDP port.
|
static Port |
udpRange(Number startPort,
Number endPort)
A UDP port range.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Port(software.amazon.jsii.JsiiObjectRef objRef)
protected Port(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Port(@NotNull
PortProps props)
props - This parameter is required.@Stability(value=Stable) @NotNull public static Port ah()
@Stability(value=Stable) @NotNull public static Port allIcmp()
@Stability(value=Stable) @NotNull public static Port allIcmpV6()
@Stability(value=Stable) @NotNull public static Port allTcp()
@Stability(value=Stable) @NotNull public static Port allTraffic()
@Stability(value=Stable) @NotNull public static Port allUdp()
@Stability(value=Stable) @NotNull public static Port esp()
@Stability(value=Stable) @NotNull public static Port icmpPing()
@Stability(value=Stable) @NotNull public static Port icmpType(@NotNull Number type)
type - This parameter is required.@Stability(value=Stable) @NotNull public static Port icmpTypeAndCode(@NotNull Number type, @NotNull Number code)
type - This parameter is required.code - This parameter is required.@Stability(value=Stable) @NotNull public static Port tcp(@NotNull Number port)
port - This parameter is required.@Stability(value=Stable) @NotNull public static Port tcpRange(@NotNull Number startPort, @NotNull Number endPort)
startPort - This parameter is required.endPort - This parameter is required.@Stability(value=Stable) @NotNull public static Port udp(@NotNull Number port)
port - This parameter is required.@Stability(value=Stable) @NotNull public static Port udpRange(@NotNull Number startPort, @NotNull Number endPort)
startPort - This parameter is required.endPort - This parameter is required.@Stability(value=Stable) @NotNull public Object toRuleJson()
@Stability(value=Stable) @NotNull public String toString()
@Stability(value=Stable) @NotNull public Boolean getCanInlineRule()
Copyright © 2022. All rights reserved.