@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.578Z") @Stability(value=Stable) public enum TlsMode extends Enum<TlsMode>
Example:
// Example automatically generated from non-compiling source. May contain errors.
// A Virtual Node with listener TLS from an ACM provided certificate
Certificate cert;
Mesh mesh;
VirtualNode node = VirtualNode.Builder.create(this, "node")
.mesh(mesh)
.serviceDiscovery(ServiceDiscovery.dns("node"))
.listeners(List.of(VirtualNodeListener.grpc(GrpcVirtualNodeListenerOptions.builder()
.port(80)
.tls(ListenerTlsOptions.builder()
.mode(TlsMode.STRICT)
.certificate(TlsCertificate.acm(cert))
.build())
.build())))
.build();
// A Virtual Gateway with listener TLS from a customer provided file certificate
VirtualGateway gateway = VirtualGateway.Builder.create(this, "gateway")
.mesh(mesh)
.listeners(List.of(VirtualGatewayListener.grpc(GrpcGatewayListenerOptions.builder()
.port(8080)
.tls(ListenerTlsOptions.builder()
.mode(TlsMode.STRICT)
.certificate(TlsCertificate.file("path/to/certChain", "path/to/privateKey"))
.build())
.build())))
.virtualGatewayName("gateway")
.build();
// A Virtual Gateway with listener TLS from a SDS provided certificate
VirtualGateway gateway2 = VirtualGateway.Builder.create(this, "gateway2")
.mesh(mesh)
.listeners(List.of(VirtualGatewayListener.http2(Http2GatewayListenerOptions.builder()
.port(8080)
.tls(ListenerTlsOptions.builder()
.mode(TlsMode.STRICT)
.certificate(TlsCertificate.sds("secrete_certificate"))
.build())
.build())))
.virtualGatewayName("gateway2")
.build();
| Enum Constant and Description |
|---|
DISABLED
TLS is disabled, only accept plaintext traffic.
|
PERMISSIVE
Accept encrypted and plaintext traffic.
|
STRICT
Only accept encrypted traffic.
|
| Modifier and Type | Method and Description |
|---|---|
static TlsMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TlsMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final TlsMode STRICT
@Stability(value=Stable) public static final TlsMode PERMISSIVE
@Stability(value=Stable) public static final TlsMode DISABLED
public static TlsMode[] values()
for (TlsMode c : TlsMode.values()) System.out.println(c);
public static TlsMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.