Class TlsCertificate

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appmesh.TlsCertificate
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
MutualTlsCertificate

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.165Z") @Stability(Stable) public abstract class TlsCertificate extends software.amazon.jsii.JsiiObject
Represents a TLS certificate.

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();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    TlsCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    TlsCertificate(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    acm(ICertificate certificate)
    Returns an ACM TLS Certificate.
    bind(Construct _scope)
    Returns TLS certificate based provider.
    file(String certificateChainPath, String privateKeyPath)
    Returns an File TLS Certificate.
    sds(String secretName)
    Returns an SDS TLS Certificate.

    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, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • TlsCertificate

      protected TlsCertificate(software.amazon.jsii.JsiiObjectRef objRef)
    • TlsCertificate

      protected TlsCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • TlsCertificate

      @Stability(Stable) protected TlsCertificate()
  • Method Details

    • acm

      @Stability(Stable) @NotNull public static TlsCertificate acm(@NotNull ICertificate certificate)
      Returns an ACM TLS Certificate.

      Parameters:
      certificate - This parameter is required.
    • file

      @Stability(Stable) @NotNull public static MutualTlsCertificate file(@NotNull String certificateChainPath, @NotNull String privateKeyPath)
      Returns an File TLS Certificate.

      Parameters:
      certificateChainPath - This parameter is required.
      privateKeyPath - This parameter is required.
    • sds

      @Stability(Stable) @NotNull public static MutualTlsCertificate sds(@NotNull String secretName)
      Returns an SDS TLS Certificate.

      Parameters:
      secretName - This parameter is required.
    • bind

      @Stability(Stable) @NotNull public abstract TlsCertificateConfig bind(@NotNull Construct _scope)
      Returns TLS certificate based provider.

      Parameters:
      _scope - This parameter is required.