Class Certificate
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.certificatemanager.Certificate
- All Implemented Interfaces:
IResource,ICertificate,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:06.455Z")
@Stability(Stable)
public class Certificate
extends Resource
implements ICertificate
A certificate managed by AWS Certificate Manager.
Example:
UserPool pool = new UserPool(this, "Pool");
pool.addDomain("CognitoDomain", UserPoolDomainOptions.builder()
.cognitoDomain(CognitoDomainOptions.builder()
.domainPrefix("my-awesome-app")
.build())
.build());
String certificateArn = "arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d";
ICertificate domainCert = Certificate.fromCertificateArn(this, "domainCert", certificateArn);
pool.addDomain("CustomDomain", UserPoolDomainOptions.builder()
.customDomain(CustomDomainOptions.builder()
.domainName("user.myapp.com")
.certificate(domainCert)
.build())
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.certificatemanager.ICertificate
ICertificate.Jsii$Default, ICertificate.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCertificate(software.amazon.jsii.JsiiObjectRef objRef) Certificate(software.constructs.Construct scope, String id, CertificateProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic ICertificatefromCertificateArn(software.constructs.Construct scope, String id, String certificateArn) Import a certificate.The certificate's ARN.protected StringIf 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 createMetricinstances.Return the DaysToExpiry metric for this AWS Certificate Manager Certificate.metricDaysToExpiry(MetricOptions props) Return the DaysToExpiry metric for this AWS Certificate Manager Certificate.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
Certificate
protected Certificate(software.amazon.jsii.JsiiObjectRef objRef) -
Certificate
protected Certificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Certificate
@Stability(Stable) public Certificate(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CertificateProps 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
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:
metricDaysToExpiryin interfaceICertificate- Parameters:
props-
-
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:
metricDaysToExpiryin interfaceICertificate
-
getCertificateArn
The certificate's ARN.- Specified by:
getCertificateArnin interfaceICertificate
-
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 createMetricinstances.
-