Class Certificate
A certificate managed by AWS Certificate Manager.
Inherited Members
Namespace: Amazon.CDK.AWS.CertificateManager
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Certificate : Resource, ICertificate, IResource
Syntax (vb)
Public Class Certificate
Inherits Resource
Implements ICertificate, IResource
Remarks
ExampleMetadata: infused
Examples
var pool = new UserPool(this, "Pool");
pool.AddDomain("CognitoDomain", new UserPoolDomainOptions {
CognitoDomain = new CognitoDomainOptions {
DomainPrefix = "my-awesome-app"
}
});
var certificateArn = "arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d";
var domainCert = Certificate.FromCertificateArn(this, "domainCert", certificateArn);
pool.AddDomain("CustomDomain", new UserPoolDomainOptions {
CustomDomain = new CustomDomainOptions {
DomainName = "user.myapp.com",
Certificate = domainCert
}
});
Synopsis
Constructors
Certificate(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Certificate(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Certificate(Construct, String, ICertificateProps) |
Properties
CertificateArn | The certificate's ARN. |
Region | 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 |
Methods
FromCertificateArn(Construct, String, String) | Import a certificate. |
MetricDaysToExpiry(IMetricOptions) | Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day. |
Constructors
Certificate(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Certificate(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Certificate(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Certificate(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Certificate(Construct, String, ICertificateProps)
public Certificate(Construct scope, string id, ICertificateProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ICertificateProps
Properties
CertificateArn
The certificate's ARN.
public virtual string CertificateArn { get; }
Property Value
System.String
Region
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.
protected virtual string Region { get; }
Property Value
System.String
Methods
FromCertificateArn(Construct, String, String)
Import a certificate.
public static ICertificate FromCertificateArn(Construct scope, string id, string certificateArn)
Parameters
- scope Constructs.Construct
- id System.String
- certificateArn System.String
Returns
MetricDaysToExpiry(IMetricOptions)
Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day.
public virtual Metric MetricDaysToExpiry(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
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".