@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:48.678Z") public enum TlsMode extends java.lang.Enum<TlsMode>
Example:
// 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(java.lang.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.
|
public static final TlsMode STRICT
public static final TlsMode PERMISSIVE
public static final TlsMode DISABLED
public static TlsMode[] values()
for (TlsMode c : TlsMode.values()) System.out.println(c);
public static TlsMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null