Class CfnDBInstance
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.docdb.CfnDBInstance
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,IDBInstanceRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:02.345Z")
@Stability(Stable)
public class CfnDBInstance
extends CfnResource
implements IInspectable, IDBInstanceRef, ITaggable
The
AWS::DocDB::DBInstance Amazon DocumentDB (with MongoDB compatibility) resource describes a DBInstance.
For more information, see DBInstance in the Amazon DocumentDB Developer Guide .
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.docdb.*;
CfnDBInstance cfnDBInstance = CfnDBInstance.Builder.create(this, "MyCfnDBInstance")
.dbClusterIdentifier("dbClusterIdentifier")
.dbInstanceClass("dbInstanceClass")
// the properties below are optional
.autoMinorVersionUpgrade(false)
.availabilityZone("availabilityZone")
.caCertificateIdentifier("caCertificateIdentifier")
.certificateRotationRestart(false)
.dbInstanceIdentifier("dbInstanceIdentifier")
.enablePerformanceInsights(false)
.preferredMaintenanceWindow("preferredMaintenanceWindow")
.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.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.docdb.IDBInstanceRef
IDBInstanceRef.Jsii$Default, IDBInstanceRef.Jsii$ProxyNested 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
ConstructorsModifierConstructorDescriptionprotectedCfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef) CfnDBInstance(software.constructs.Construct scope, String id, CfnDBInstanceProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe connection endpoint for the instance.The port number on which the database accepts connections, such as27017.This parameter does not apply to Amazon DocumentDB.The Amazon EC2 Availability Zone that the instance is created in.The identifier of the CA certificate for this DB instance.Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.The identifier of the cluster that the instance will belong to.The compute and memory capacity of the instance;The instance identifier.A reference to a DBInstance resource.A value that indicates whether to enable Performance Insights for the DB Instance.The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).getTags()Tag Manager which manages the tags for this resource.The tags to be assigned to the instance.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThis parameter does not apply to Amazon DocumentDB.voidThis parameter does not apply to Amazon DocumentDB.voidsetAvailabilityZone(String value) The Amazon EC2 Availability Zone that the instance is created in.voidsetCaCertificateIdentifier(String value) The identifier of the CA certificate for this DB instance.voidSpecifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.voidSpecifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.voidsetDbClusterIdentifier(String value) The identifier of the cluster that the instance will belong to.voidsetDbInstanceClass(String value) The compute and memory capacity of the instance;voidsetDbInstanceIdentifier(String value) The instance identifier.voidA value that indicates whether to enable Performance Insights for the DB Instance.voidA value that indicates whether to enable Performance Insights for the DB Instance.voidThe time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).voidsetTagsRaw(List<CfnTag> value) The tags to be assigned to the instance.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
-
CfnDBInstance
protected CfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDBInstance
protected CfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDBInstance
@Stability(Stable) public CfnDBInstance(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDBInstanceProps 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
-
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.
-
getAttrEndpoint
The connection endpoint for the instance.For example:
sample-cluster.cluster-abcdefghijkl.us-east-1.docdb.amazonaws.com. -
getAttrId
-
getAttrPort
The port number on which the database accepts connections, such as27017. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDbInstanceRef
A reference to a DBInstance resource.- Specified by:
getDbInstanceRefin interfaceIDBInstanceRef
-
getTags
Tag Manager which manages the tags for this resource. -
getDbClusterIdentifier
The identifier of the cluster that the instance will belong to. -
setDbClusterIdentifier
The identifier of the cluster that the instance will belong to. -
getDbInstanceClass
The compute and memory capacity of the instance; -
setDbInstanceClass
The compute and memory capacity of the instance; -
getAutoMinorVersionUpgrade
This parameter does not apply to Amazon DocumentDB.Returns union: either
BooleanorIResolvable -
setAutoMinorVersionUpgrade
This parameter does not apply to Amazon DocumentDB. -
setAutoMinorVersionUpgrade
This parameter does not apply to Amazon DocumentDB. -
getAvailabilityZone
The Amazon EC2 Availability Zone that the instance is created in. -
setAvailabilityZone
The Amazon EC2 Availability Zone that the instance is created in. -
getCaCertificateIdentifier
The identifier of the CA certificate for this DB instance. -
setCaCertificateIdentifier
The identifier of the CA certificate for this DB instance. -
getCertificateRotationRestart
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.Returns union: either
BooleanorIResolvable -
setCertificateRotationRestart
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate. -
setCertificateRotationRestart
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate. -
getDbInstanceIdentifier
The instance identifier.This parameter is stored as a lowercase string.
-
setDbInstanceIdentifier
The instance identifier.This parameter is stored as a lowercase string.
-
getEnablePerformanceInsights
A value that indicates whether to enable Performance Insights for the DB Instance.Returns union: either
BooleanorIResolvable -
setEnablePerformanceInsights
A value that indicates whether to enable Performance Insights for the DB Instance. -
setEnablePerformanceInsights
A value that indicates whether to enable Performance Insights for the DB Instance. -
getPreferredMaintenanceWindow
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). -
setPreferredMaintenanceWindow
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). -
getTagsRaw
The tags to be assigned to the instance. -
setTagsRaw
The tags to be assigned to the instance.
-