Class CfnDBCluster
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.CfnDBCluster
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-10-31T19:12:56.136Z")
@Stability(Stable)
public class CfnDBCluster
extends CfnResource
implements IInspectable, ITaggable
The
AWS::DocDB::DBCluster
Amazon DocumentDB (with MongoDB compatibility) resource describes a DBCluster.
Amazon DocumentDB is a fully managed, MongoDB-compatible document database engine. For more information, see DBCluster 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.*; CfnDBCluster cfnDBCluster = CfnDBCluster.Builder.create(this, "MyCfnDBCluster") .availabilityZones(List.of("availabilityZones")) .backupRetentionPeriod(123) .copyTagsToSnapshot(false) .dbClusterIdentifier("dbClusterIdentifier") .dbClusterParameterGroupName("dbClusterParameterGroupName") .dbSubnetGroupName("dbSubnetGroupName") .deletionProtection(false) .enableCloudwatchLogsExports(List.of("enableCloudwatchLogsExports")) .engineVersion("engineVersion") .kmsKeyId("kmsKeyId") .masterUsername("masterUsername") .masterUserPassword("masterUserPassword") .port(123) .preferredBackupWindow("preferredBackupWindow") .preferredMaintenanceWindow("preferredMaintenanceWindow") .restoreToTime("restoreToTime") .restoreType("restoreType") .snapshotIdentifier("snapshotIdentifier") .sourceDbClusterIdentifier("sourceDbClusterIdentifier") .storageEncrypted(false) .storageType("storageType") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .useLatestRestorableTime(false) .vpcSecurityGroupIds(List.of("vpcSecurityGroupIds")) .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnDBCluster
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnDBCluster
(software.amazon.jsii.JsiiObjectRef objRef) CfnDBCluster
(software.constructs.Construct scope, String id) CfnDBCluster
(software.constructs.Construct scope, String id, CfnDBClusterProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe resource id for the cluster;The connection endpoint for the cluster, such assample-cluster.cluster-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com
.The port number on which the cluster accepts connections.The reader endpoint for the cluster.A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.The number of days for which automated backups are retained.Set totrue
to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwisefalse
.The cluster identifier.The name of the cluster parameter group to associate with this cluster.A subnet group to associate with this cluster.Protects clusters from being accidentally deleted.The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs.The version number of the database engine to use.The AWS KMS key identifier for an encrypted cluster.The name of the master user for the cluster.The password for the master database user.getPort()
Specifies the port that the database engine is listening on.The daily time range during which automated backups are created if automated backups are enabled using theBackupRetentionPeriod
parameter.The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).The date and time to restore the cluster to.The type of restore to be performed.The identifier for the snapshot or cluster snapshot to restore from.The identifier of the source cluster from which to restore.Specifies whether the cluster is encrypted.The storage type to associate with the DB cluster.getTags()
Tag Manager which manages the tags for this resource.The tags to be assigned to the cluster.A value that is set totrue
to restore the cluster to the latest restorable backup time, andfalse
otherwise.A list of EC2 VPC security groups to associate with this cluster.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAvailabilityZones
(List<String> value) A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.void
setBackupRetentionPeriod
(Number value) The number of days for which automated backups are retained.void
setCopyTagsToSnapshot
(Boolean value) Set totrue
to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwisefalse
.void
setCopyTagsToSnapshot
(IResolvable value) Set totrue
to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwisefalse
.void
setDbClusterIdentifier
(String value) The cluster identifier.void
The name of the cluster parameter group to associate with this cluster.void
setDbSubnetGroupName
(String value) A subnet group to associate with this cluster.void
setDeletionProtection
(Boolean value) Protects clusters from being accidentally deleted.void
setDeletionProtection
(IResolvable value) Protects clusters from being accidentally deleted.void
setEnableCloudwatchLogsExports
(List<String> value) The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs.void
setEngineVersion
(String value) The version number of the database engine to use.void
setKmsKeyId
(String value) The AWS KMS key identifier for an encrypted cluster.void
setMasterUsername
(String value) The name of the master user for the cluster.void
setMasterUserPassword
(String value) The password for the master database user.void
Specifies the port that the database engine is listening on.void
setPreferredBackupWindow
(String value) The daily time range during which automated backups are created if automated backups are enabled using theBackupRetentionPeriod
parameter.void
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).void
setRestoreToTime
(String value) The date and time to restore the cluster to.void
setRestoreType
(String value) The type of restore to be performed.void
setSnapshotIdentifier
(String value) The identifier for the snapshot or cluster snapshot to restore from.void
The identifier of the source cluster from which to restore.void
setStorageEncrypted
(Boolean value) Specifies whether the cluster is encrypted.void
setStorageEncrypted
(IResolvable value) Specifies whether the cluster is encrypted.void
setStorageType
(String value) The storage type to associate with the DB cluster.void
setTagsRaw
(List<CfnTag> value) The tags to be assigned to the cluster.void
A value that is set totrue
to restore the cluster to the latest restorable backup time, andfalse
otherwise.void
A value that is set totrue
to restore the cluster to the latest restorable backup time, andfalse
otherwise.void
setVpcSecurityGroupIds
(List<String> value) A list of EC2 VPC security groups to associate with this cluster.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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
-
CfnDBCluster
protected CfnDBCluster(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDBCluster
protected CfnDBCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDBCluster
@Stability(Stable) public CfnDBCluster(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnDBClusterProps 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.
-
CfnDBCluster
@Stability(Stable) public CfnDBCluster(@NotNull software.constructs.Construct scope, @NotNull String id) - 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.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrClusterResourceId
The resource id for the cluster;for example:
cluster-ABCD1234EFGH5678IJKL90MNOP
. The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies. -
getAttrEndpoint
The connection endpoint for the cluster, such assample-cluster.cluster-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com
. -
getAttrId
-
getAttrPort
The port number on which the cluster accepts connections.For example:
27017
. -
getAttrReadEndpoint
The reader endpoint for the cluster.For example:
sample-cluster.cluster-ro-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAvailabilityZones
A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. -
setAvailabilityZones
A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. -
getBackupRetentionPeriod
The number of days for which automated backups are retained.You must specify a minimum value of 1.
-
setBackupRetentionPeriod
The number of days for which automated backups are retained.You must specify a minimum value of 1.
-
getCopyTagsToSnapshot
Set totrue
to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwisefalse
. -
setCopyTagsToSnapshot
Set totrue
to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwisefalse
. -
setCopyTagsToSnapshot
Set totrue
to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwisefalse
. -
getDbClusterIdentifier
The cluster identifier.This parameter is stored as a lowercase string.
-
setDbClusterIdentifier
The cluster identifier.This parameter is stored as a lowercase string.
-
getDbClusterParameterGroupName
The name of the cluster parameter group to associate with this cluster. -
setDbClusterParameterGroupName
The name of the cluster parameter group to associate with this cluster. -
getDbSubnetGroupName
A subnet group to associate with this cluster. -
setDbSubnetGroupName
A subnet group to associate with this cluster. -
getDeletionProtection
Protects clusters from being accidentally deleted. -
setDeletionProtection
Protects clusters from being accidentally deleted. -
setDeletionProtection
Protects clusters from being accidentally deleted. -
getEnableCloudwatchLogsExports
The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. -
setEnableCloudwatchLogsExports
The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. -
getEngineVersion
The version number of the database engine to use. -
setEngineVersion
The version number of the database engine to use. -
getKmsKeyId
The AWS KMS key identifier for an encrypted cluster. -
setKmsKeyId
The AWS KMS key identifier for an encrypted cluster. -
getMasterUsername
The name of the master user for the cluster. -
setMasterUsername
The name of the master user for the cluster. -
getMasterUserPassword
The password for the master database user. -
setMasterUserPassword
The password for the master database user. -
getPort
Specifies the port that the database engine is listening on. -
setPort
Specifies the port that the database engine is listening on. -
getPreferredBackupWindow
The daily time range during which automated backups are created if automated backups are enabled using theBackupRetentionPeriod
parameter. -
setPreferredBackupWindow
The daily time range during which automated backups are created if automated backups are enabled using theBackupRetentionPeriod
parameter. -
getPreferredMaintenanceWindow
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). -
setPreferredMaintenanceWindow
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). -
getRestoreToTime
The date and time to restore the cluster to. -
setRestoreToTime
The date and time to restore the cluster to. -
getRestoreType
The type of restore to be performed.You can specify one of the following values:.
-
setRestoreType
The type of restore to be performed.You can specify one of the following values:.
-
getSnapshotIdentifier
The identifier for the snapshot or cluster snapshot to restore from. -
setSnapshotIdentifier
The identifier for the snapshot or cluster snapshot to restore from. -
getSourceDbClusterIdentifier
The identifier of the source cluster from which to restore. -
setSourceDbClusterIdentifier
The identifier of the source cluster from which to restore. -
getStorageEncrypted
Specifies whether the cluster is encrypted. -
setStorageEncrypted
Specifies whether the cluster is encrypted. -
setStorageEncrypted
Specifies whether the cluster is encrypted. -
getStorageType
The storage type to associate with the DB cluster. -
setStorageType
The storage type to associate with the DB cluster. -
getTagsRaw
The tags to be assigned to the cluster. -
setTagsRaw
The tags to be assigned to the cluster. -
getUseLatestRestorableTime
A value that is set totrue
to restore the cluster to the latest restorable backup time, andfalse
otherwise. -
setUseLatestRestorableTime
A value that is set totrue
to restore the cluster to the latest restorable backup time, andfalse
otherwise. -
setUseLatestRestorableTime
A value that is set totrue
to restore the cluster to the latest restorable backup time, andfalse
otherwise. -
getVpcSecurityGroupIds
A list of EC2 VPC security groups to associate with this cluster. -
setVpcSecurityGroupIds
A list of EC2 VPC security groups to associate with this cluster.
-