Class PrivateCertificate

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.certificatemanager.PrivateCertificate
All Implemented Interfaces:
IResource, ICertificate, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:34.679Z") @Stability(Stable) public class PrivateCertificate extends Resource implements ICertificate
A private certificate managed by AWS Certificate Manager.

Example:

 import software.amazon.awscdk.services.acmpca.*;
 PrivateCertificate.Builder.create(this, "PrivateCertificate")
         .domainName("test.example.com")
         .subjectAlternativeNames(List.of("cool.example.com", "test.example.net")) // optional
         .certificateAuthority(CertificateAuthority.fromCertificateAuthorityArn(this, "CA", "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77"))
         .keyAlgorithm(KeyAlgorithm.RSA_2048)
         .build();
 
  • Constructor Details

    • PrivateCertificate

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

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

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

    • fromCertificateArn

      @Stability(Stable) @NotNull public static ICertificate fromCertificateArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String certificateArn)
      Import a certificate.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      certificateArn - This parameter is required.
    • metricDaysToExpiry

      @Stability(Stable) @NotNull public Metric metricDaysToExpiry(@Nullable MetricOptions props)
      Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day.

      This metric is no longer emitted once the certificate has effectively expired, so alarms configured on this metric should probably treat missing data as "breaching".

      Specified by:
      metricDaysToExpiry in interface ICertificate
      Parameters:
      props -
    • metricDaysToExpiry

      @Stability(Stable) @NotNull public Metric metricDaysToExpiry()
      Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day.

      This metric is no longer emitted once the certificate has effectively expired, so alarms configured on this metric should probably treat missing data as "breaching".

      Specified by:
      metricDaysToExpiry in interface ICertificate
    • getCertificateArn

      @Stability(Stable) @NotNull public String getCertificateArn()
      The certificate's ARN.
      Specified by:
      getCertificateArn in interface ICertificate
    • getRegion

      @Stability(Stable) @Nullable protected String getRegion()
      If the certificate is provisionned in a different region than the containing stack, this should be the region in which the certificate lives so we can correctly create Metric instances.