java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.elasticloadbalancingv2.TrustStore
All Implemented Interfaces:
IResource, ITrustStore, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.109.0 (build c221850)", date="2025-03-14T03:24:58.400Z") @Stability(Stable) public class TrustStore extends Resource implements ITrustStore
A new Trust Store.

Example:

 import software.amazon.awscdk.services.certificatemanager.*;
 Certificate certificate;
 ApplicationLoadBalancer lb;
 Bucket bucket;
 TrustStore trustStore = TrustStore.Builder.create(this, "Store")
         .bucket(bucket)
         .key("rootCA_cert.pem")
         .build();
 lb.addListener("Listener", BaseApplicationListenerProps.builder()
         .port(443)
         .protocol(ApplicationProtocol.HTTPS)
         .certificates(List.of(certificate))
         // mTLS settings
         .mutualAuthentication(MutualAuthentication.builder()
                 .advertiseTrustStoreCaNames(true)
                 .ignoreClientCertificateExpiry(false)
                 .mutualAuthenticationMode(MutualAuthenticationMode.VERIFY)
                 .trustStore(trustStore)
                 .build())
         .defaultAction(ListenerAction.fixedResponse(200, FixedResponseOptions.builder().contentType("text/plain").messageBody("Success mTLS").build()))
         .build());
 
  • Constructor Details

    • TrustStore

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

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

      @Stability(Stable) public TrustStore(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TrustStoreProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromTrustStoreArn

      @Stability(Stable) @NotNull public static ITrustStore fromTrustStoreArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String trustStoreArn)
      Import from ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      trustStoreArn - This parameter is required.
    • getNumberOfCaCertificates

      @Stability(Stable) @NotNull public Number getNumberOfCaCertificates()
      The number of CA certificates in the trust store.
    • getStatus

      @Stability(Stable) @NotNull public String getStatus()
      The status of the trust store.
    • getTrustStoreArn

      @Stability(Stable) @NotNull public String getTrustStoreArn()
      The ARN of the trust store.
      Specified by:
      getTrustStoreArn in interface ITrustStore
    • getTrustStoreName

      @Stability(Stable) @NotNull public String getTrustStoreName()
      The name of the trust store.
      Specified by:
      getTrustStoreName in interface ITrustStore