Class CfnCertificate
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,ICertificateRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
You can import both the certificate and its chain in the Certificate parameter.
After importing a certificate, AWS Transfer Family automatically creates a Amazon CloudWatch metric called DaysUntilExpiry that tracks the number of days until the certificate expires. The metric is based on the InactiveDate parameter and is published daily in the AWS/Transfer namespace.
It can take up to a full day after importing a certificate for Transfer Family to emit the
DaysUntilExpirymetric to your account. > If you use theCertificateparameter to upload both the certificate and its chain, don't use theCertificateChainparameter.
CloudWatch monitoring
The DaysUntilExpiry metric includes the following specifications:
- Units: Count (days)
- Dimensions:
CertificateId(always present),Description(if provided during certificate import) - Statistics: Minimum, Maximum, Average
- Frequency: Published daily
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.transfer.*;
CfnCertificate cfnCertificate = CfnCertificate.Builder.create(this, "MyCfnCertificate")
.certificate("certificate")
.usage("usage")
// the properties below are optional
.activeDate("activeDate")
.certificateChain("certificateChain")
.description("description")
.inactiveDate("inactiveDate")
.privateKey("privateKey")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
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.transfer.ICertificateRef
ICertificateRef.Jsii$Default, ICertificateRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCertificate(software.amazon.jsii.JsiiObjectRef objRef) CfnCertificate(software.constructs.Construct scope, String id, CfnCertificateProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic ICertificateReffromCertificateArn(software.constructs.Construct scope, String id, String arn) Creates a new ICertificateRef from an ARN.static ICertificateReffromCertificateId(software.constructs.Construct scope, String id, String certificateId) Creates a new ICertificateRef from a certificateId.An optional date that specifies when the certificate becomes active.The unique Amazon Resource Name (ARN) for the certificate.An array of identifiers for the imported certificates.The final date that the certificate is valid.The earliest date that the certificate is valid.The serial number for the certificate.The certificate can be eitherACTIVE,PENDING_ROTATION, orINACTIVE.If a private key has been specified for the certificate, its type isCERTIFICATE_WITH_PRIVATE_KEY.The file name for the certificate.The list of certificates that make up the chain for the certificate.A reference to a Certificate resource.The name or description that's used to identity the certificate.An optional date that specifies when the certificate becomes inactive.The file that contains the private key for the certificate that's being imported.getTags()Tag Manager which manages the tags for this resource.Key-value pairs that can be used to group and search for certificates.getUsage()Specifies how this certificate is used.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetActiveDate(String value) An optional date that specifies when the certificate becomes active.voidsetCertificate(String value) The file name for the certificate.voidsetCertificateChain(String value) The list of certificates that make up the chain for the certificate.voidsetDescription(String value) The name or description that's used to identity the certificate.voidsetInactiveDate(String value) An optional date that specifies when the certificate becomes inactive.voidsetPrivateKey(String value) The file that contains the private key for the certificate that's being imported.voidsetTagsRaw(List<CfnTag> value) Key-value pairs that can be used to group and search for certificates.voidSpecifies how this certificate is used.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnCertificate
protected CfnCertificate(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCertificate
protected CfnCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCertificate
@Stability(Stable) public CfnCertificate(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCertificateProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
fromCertificateArn
@Stability(Stable) @NotNull public static ICertificateRef fromCertificateArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new ICertificateRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromCertificateId
@Stability(Stable) @NotNull public static ICertificateRef fromCertificateId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String certificateId) Creates a new ICertificateRef from a certificateId.- Parameters:
scope- This parameter is required.id- This parameter is required.certificateId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The unique Amazon Resource Name (ARN) for the certificate. -
getAttrCertificateId
An array of identifiers for the imported certificates.You use this identifier for working with profiles and partner profiles.
-
getAttrNotAfterDate
The final date that the certificate is valid. -
getAttrNotBeforeDate
The earliest date that the certificate is valid. -
getAttrSerial
The serial number for the certificate. -
getAttrStatus
The certificate can be eitherACTIVE,PENDING_ROTATION, orINACTIVE.PENDING_ROTATIONmeans that this certificate will replace the current certificate when it expires. -
getAttrType
If a private key has been specified for the certificate, its type isCERTIFICATE_WITH_PRIVATE_KEY.If there is no private key, the type is
CERTIFICATE. -
getCertificateRef
A reference to a Certificate resource.- Specified by:
getCertificateRefin interfaceICertificateRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getCertificate
The file name for the certificate. -
setCertificate
The file name for the certificate. -
getUsage
Specifies how this certificate is used.It can be used in the following ways:.
-
setUsage
Specifies how this certificate is used.It can be used in the following ways:.
-
getActiveDate
An optional date that specifies when the certificate becomes active. -
setActiveDate
An optional date that specifies when the certificate becomes active. -
getCertificateChain
The list of certificates that make up the chain for the certificate. -
setCertificateChain
The list of certificates that make up the chain for the certificate. -
getDescription
The name or description that's used to identity the certificate. -
setDescription
The name or description that's used to identity the certificate. -
getInactiveDate
An optional date that specifies when the certificate becomes inactive. -
setInactiveDate
An optional date that specifies when the certificate becomes inactive. -
getPrivateKey
The file that contains the private key for the certificate that's being imported. -
setPrivateKey
The file that contains the private key for the certificate that's being imported. -
getTagsRaw
Key-value pairs that can be used to group and search for certificates. -
setTagsRaw
Key-value pairs that can be used to group and search for certificates.
-