@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.965Z") @Stability(value=Stable) public class CfnCertificate extends CfnResource implements IInspectable
The AWS::CertificateManager::Certificate resource requests an AWS Certificate Manager ( ACM ) certificate that you can use to enable secure connections. For example, you can deploy an ACM certificate to an Elastic Load Balancer to enable HTTPS support. For more information, see RequestCertificate in the AWS Certificate Manager API Reference.
When you use the
AWS::CertificateManager::Certificateresource in a CloudFormation stack, domain validation is handled automatically if all three of the following are true: The certificate domain is hosted in Amazon Route 53, the domain resides in your AWS account , and you are using DNS validation.However, if the certificate uses email validation, or if the domain is not hosted in Route 53, then the stack will remain in the
CREATE_IN_PROGRESSstate. Further stack operations are delayed until you validate the certificate request, either by acting upon the instructions in the validation email, or by adding a CNAME record to your DNS configuration. For more information, see Option 1: DNS Validation and Option 2: Email Validation .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.certificatemanager.*;
CfnCertificate cfnCertificate = CfnCertificate.Builder.create(this, "MyCfnCertificate")
.domainName("domainName")
// the properties below are optional
.certificateAuthorityArn("certificateAuthorityArn")
.certificateTransparencyLoggingPreference("certificateTransparencyLoggingPreference")
.domainValidationOptions(List.of(DomainValidationOptionProperty.builder()
.domainName("domainName")
// the properties below are optional
.hostedZoneId("hostedZoneId")
.validationDomain("validationDomain")
.build()))
.subjectAlternativeNames(List.of("subjectAlternativeNames"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.validationMethod("validationMethod")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnCertificate.Builder
A fluent builder for
CfnCertificate. |
static interface |
CfnCertificate.DomainValidationOptionProperty
`DomainValidationOption` is a property of the [AWS::CertificateManager::Certificate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html) resource that specifies the AWS Certificate Manager ( ACM ) certificate domain to validate.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnCertificate(software.constructs.Construct scope,
String id,
CfnCertificateProps props)
Create a new `AWS::CertificateManager::Certificate`.
|
protected |
CfnCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnCertificate(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCertificateAuthorityArn()
The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate.
|
String |
getCertificateTransparencyLoggingPreference()
You can opt out of certificate transparency logging by specifying the `DISABLED` option.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDomainName()
The fully qualified domain name (FQDN), such as www.example.com, with which you want to secure an ACM certificate.
|
Object |
getDomainValidationOptions()
Domain information that domain name registrars use to verify your identity.
|
List<String> |
getSubjectAlternativeNames()
Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate.
|
TagManager |
getTags()
Key-value pairs that can identify the certificate.
|
String |
getValidationMethod()
The method you want to use to validate that you own or control the domain associated with a public certificate.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setCertificateAuthorityArn(String value)
The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate.
|
void |
setCertificateTransparencyLoggingPreference(String value)
You can opt out of certificate transparency logging by specifying the `DISABLED` option.
|
void |
setDomainName(String value)
The fully qualified domain name (FQDN), such as www.example.com, with which you want to secure an ACM certificate.
|
void |
setDomainValidationOptions(IResolvable value)
Domain information that domain name registrars use to verify your identity.
|
void |
setDomainValidationOptions(List<Object> value)
Domain information that domain name registrars use to verify your identity.
|
void |
setSubjectAlternativeNames(List<String> value)
Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate.
|
void |
setValidationMethod(String value)
The method you want to use to validate that you own or control the domain associated with a public certificate.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnCertificate(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnCertificate(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnCertificateProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getDomainName()
@Stability(value=Stable)
public void setDomainName(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getCertificateAuthorityArn()
If you do not provide an ARN and you are trying to request a private certificate, ACM will attempt to issue a public certificate. For more information about private CAs, see the AWS Certificate Manager Private Certificate Authority (PCA) user guide. The ARN must have the following form:
arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
@Stability(value=Stable)
public void setCertificateAuthorityArn(@Nullable
String value)
If you do not provide an ARN and you are trying to request a private certificate, ACM will attempt to issue a public certificate. For more information about private CAs, see the AWS Certificate Manager Private Certificate Authority (PCA) user guide. The ARN must have the following form:
arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
@Stability(value=Stable) @Nullable public String getCertificateTransparencyLoggingPreference()
If you do not specify a certificate transparency logging preference on a new CloudFormation template, or if you remove the logging preference from an existing template, this is the same as explicitly enabling the preference.
Changing the certificate transparency logging preference will update the existing resource by calling UpdateCertificateOptions on the certificate. This action will not create a new resource.
@Stability(value=Stable)
public void setCertificateTransparencyLoggingPreference(@Nullable
String value)
If you do not specify a certificate transparency logging preference on a new CloudFormation template, or if you remove the logging preference from an existing template, this is the same as explicitly enabling the preference.
Changing the certificate transparency logging preference will update the existing resource by calling UpdateCertificateOptions on the certificate. This action will not create a new resource.
@Stability(value=Stable) @Nullable public Object getDomainValidationOptions()
In order for a AWS::CertificateManager::Certificate to be provisioned and validated in CloudFormation automatically, the
DomainNameproperty needs to be identical to one of theDomainNameproperty supplied in DomainValidationOptions, if the ValidationMethod is DNS. Failing to keep them like-for-like will result in failure to create the domain validation records in Route53.
@Stability(value=Stable)
public void setDomainValidationOptions(@Nullable
IResolvable value)
In order for a AWS::CertificateManager::Certificate to be provisioned and validated in CloudFormation automatically, the
DomainNameproperty needs to be identical to one of theDomainNameproperty supplied in DomainValidationOptions, if the ValidationMethod is DNS. Failing to keep them like-for-like will result in failure to create the domain validation records in Route53.
@Stability(value=Stable)
public void setDomainValidationOptions(@Nullable
List<Object> value)
In order for a AWS::CertificateManager::Certificate to be provisioned and validated in CloudFormation automatically, the
DomainNameproperty needs to be identical to one of theDomainNameproperty supplied in DomainValidationOptions, if the ValidationMethod is DNS. Failing to keep them like-for-like will result in failure to create the domain validation records in Route53.
@Stability(value=Stable) @Nullable public List<String> getSubjectAlternativeNames()
For example, you can add www.example.net to a certificate for which the DomainName field is www.example.com if users can reach your site by using either name.
@Stability(value=Stable)
public void setSubjectAlternativeNames(@Nullable
List<String> value)
For example, you can add www.example.net to a certificate for which the DomainName field is www.example.com if users can reach your site by using either name.
@Stability(value=Stable) @Nullable public String getValidationMethod()
You can validate with DNS or validate with email . We recommend that you use DNS validation.
If not specified, this property defaults to email validation.
@Stability(value=Stable)
public void setValidationMethod(@Nullable
String value)
You can validate with DNS or validate with email . We recommend that you use DNS validation.
If not specified, this property defaults to email validation.
Copyright © 2022. All rights reserved.