java.lang.Object
java.lang.Enum<TlsMode>
software.amazon.awscdk.services.appmesh.TlsMode
All Implemented Interfaces:
Serializable, Comparable<TlsMode>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.169Z") @Stability(Stable) public enum TlsMode extends Enum<TlsMode>
Enum of supported TLS modes.

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 Details

    • STRICT

      @Stability(Stable) public static final TlsMode STRICT
      Only accept encrypted traffic.
    • PERMISSIVE

      @Stability(Stable) public static final TlsMode PERMISSIVE
      Accept encrypted and plaintext traffic.
    • DISABLED

      @Stability(Stable) public static final TlsMode DISABLED
      TLS is disabled, only accept plaintext traffic.
  • Method Details

    • values

      public static TlsMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TlsMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null