Class PrivateCertificate
A private certificate managed by AWS Certificate Manager.
Inherited Members
Namespace: Amazon.CDK.AWS.CertificateManager
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PrivateCertificate : Resource, ICertificate, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class PrivateCertificate Inherits Resource Implements ICertificate, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::CertificateManager::Certificate
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ACMPCA;
new PrivateCertificate(this, "PrivateCertificate", new PrivateCertificateProps {
DomainName = "test.example.com",
SubjectAlternativeNames = new [] { "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
});
Synopsis
Constructors
| PrivateCertificate(Construct, string, IPrivateCertificateProps) | A private certificate managed by AWS Certificate Manager. |
Properties
| CertificateArn | The certificate's ARN. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
| 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
PrivateCertificate(Construct, string, IPrivateCertificateProps)
A private certificate managed by AWS Certificate Manager.
public PrivateCertificate(Construct scope, string id, IPrivateCertificateProps props)
Parameters
- scope Construct
- id string
- props IPrivateCertificateProps
Remarks
Resource: AWS::CertificateManager::Certificate
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ACMPCA;
new PrivateCertificate(this, "PrivateCertificate", new PrivateCertificateProps {
DomainName = "test.example.com",
SubjectAlternativeNames = new [] { "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
});
Properties
CertificateArn
The certificate's ARN.
public virtual string CertificateArn { get; }
Property Value
Remarks
Resource: AWS::CertificateManager::Certificate
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::CertificateManager::Certificate
ExampleMetadata: infused
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
Remarks
Resource: AWS::CertificateManager::Certificate
ExampleMetadata: infused
Methods
FromCertificateArn(Construct, string, string)
Import a certificate.
public static ICertificate FromCertificateArn(Construct scope, string id, string certificateArn)
Parameters
Returns
Remarks
Resource: AWS::CertificateManager::Certificate
ExampleMetadata: infused
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".