Class CfnDBCluster
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
AWS::Neptune::DBCluster
resource creates an Amazon Neptune DB cluster. Neptune is a fully managed graph database.
Currently, you can create this resource only in AWS Regions in which Amazon Neptune is supported.
If no DeletionPolicy
is set for AWS::Neptune::DBCluster
resources, the default deletion behavior is that the entire volume will be deleted without a snapshot. To retain a backup of the volume, the DeletionPolicy
should be set to Snapshot
. For more information about how AWS CloudFormation deletes resources, see DeletionPolicy Attribute .
You can use AWS::Neptune::DBCluster.DeletionProtection
to help guard against unintended deletion of your DB cluster.
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.neptune.*; CfnDBCluster cfnDBCluster = CfnDBCluster.Builder.create(this, "MyCfnDBCluster") .associatedRoles(List.of(DBClusterRoleProperty.builder() .roleArn("roleArn") // the properties below are optional .featureName("featureName") .build())) .availabilityZones(List.of("availabilityZones")) .backupRetentionPeriod(123) .copyTagsToSnapshot(false) .dbClusterIdentifier("dbClusterIdentifier") .dbClusterParameterGroupName("dbClusterParameterGroupName") .dbInstanceParameterGroupName("dbInstanceParameterGroupName") .dbPort(123) .dbSubnetGroupName("dbSubnetGroupName") .deletionProtection(false) .enableCloudwatchLogsExports(List.of("enableCloudwatchLogsExports")) .engineVersion("engineVersion") .iamAuthEnabled(false) .kmsKeyId("kmsKeyId") .preferredBackupWindow("preferredBackupWindow") .preferredMaintenanceWindow("preferredMaintenanceWindow") .restoreToTime("restoreToTime") .restoreType("restoreType") .serverlessScalingConfiguration(ServerlessScalingConfigurationProperty.builder() .maxCapacity(123) .minCapacity(123) .build()) .snapshotIdentifier("snapshotIdentifier") .sourceDbClusterIdentifier("sourceDbClusterIdentifier") .storageEncrypted(false) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .useLatestRestorableTime(false) .vpcSecurityGroupIds(List.of("vpcSecurityGroupIds")) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnDBCluster
.static interface
Describes an Amazon Identity and Access Management (IAM) role that is associated with a DB cluster.static interface
Contains the scaling configuration of a Neptune Serverless DB cluster.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 TypeMethodDescriptionProvides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.The resource id for the DB cluster.The connection endpoint for the DB cluster.The port number on which the DB instances in the DB cluster accept connections.The reader endpoint for the DB cluster.Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.Specifies the number of days for which automatic DB snapshots are retained.If set totrue
, tags are copied to any snapshot of the DB cluster that is created..Contains a user-supplied DB cluster identifier.Provides the name of the DB cluster parameter group.The name of the DB parameter group to apply to all instances of the DB cluster.The port number on which the DB instances in the DB cluster accept connections.Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.Indicates whether or not the DB cluster has deletion protection enabled.Specifies a list of log types that are enabled for export to CloudWatch Logs.Indicates the database engine version.True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
.Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod
.Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).Creates a new DB cluster from a DB snapshot or DB cluster snapshot.Creates a new DB cluster from a DB snapshot or DB cluster snapshot.Contains the scaling configuration of an Neptune Serverless DB cluster.Specifies the identifier for a DB cluster snapshot.Creates a new DB cluster from a DB snapshot or DB cluster snapshot.Indicates whether the DB cluster is encrypted.getTags()
Tag Manager which manages the tags for this resource.The tags assigned to this cluster.Creates a new DB cluster from a DB snapshot or DB cluster snapshot.Provides a list of VPC security groups that the DB cluster belongs to.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAssociatedRoles
(List<Object> value) Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.void
setAssociatedRoles
(IResolvable value) Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.void
setAvailabilityZones
(List<String> value) Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.void
setBackupRetentionPeriod
(Number value) Specifies the number of days for which automatic DB snapshots are retained.void
setCopyTagsToSnapshot
(Boolean value) If set totrue
, tags are copied to any snapshot of the DB cluster that is created..void
setCopyTagsToSnapshot
(IResolvable value) If set totrue
, tags are copied to any snapshot of the DB cluster that is created..void
setDbClusterIdentifier
(String value) Contains a user-supplied DB cluster identifier.void
Provides the name of the DB cluster parameter group.void
The name of the DB parameter group to apply to all instances of the DB cluster.void
The port number on which the DB instances in the DB cluster accept connections.void
setDbSubnetGroupName
(String value) Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.void
setDeletionProtection
(Boolean value) Indicates whether or not the DB cluster has deletion protection enabled.void
setDeletionProtection
(IResolvable value) Indicates whether or not the DB cluster has deletion protection enabled.void
setEnableCloudwatchLogsExports
(List<String> value) Specifies a list of log types that are enabled for export to CloudWatch Logs.void
setEngineVersion
(String value) Indicates the database engine version.void
setIamAuthEnabled
(Boolean value) True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.void
setIamAuthEnabled
(IResolvable value) True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.void
setKmsKeyId
(String value) The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
.void
setPreferredBackupWindow
(String value) Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod
.void
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).void
setRestoreToTime
(String value) Creates a new DB cluster from a DB snapshot or DB cluster snapshot.void
setRestoreType
(String value) Creates a new DB cluster from a DB snapshot or DB cluster snapshot.void
Contains the scaling configuration of an Neptune Serverless DB cluster.void
Contains the scaling configuration of an Neptune Serverless DB cluster.void
setSnapshotIdentifier
(String value) Specifies the identifier for a DB cluster snapshot.void
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.void
setStorageEncrypted
(Boolean value) Indicates whether the DB cluster is encrypted.void
setStorageEncrypted
(IResolvable value) Indicates whether the DB cluster is encrypted.void
setTagsRaw
(List<CfnTag> value) The tags assigned to this cluster.void
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.void
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.void
setVpcSecurityGroupIds
(List<String> value) Provides a list of VPC security groups that the DB cluster belongs to.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 DB 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 DB cluster.For example:
mystack-mydbcluster-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
-
getAttrPort
The port number on which the DB instances in the DB cluster accept connections. -
getAttrReadEndpoint
The reader endpoint for the DB cluster.For example:
mystack-mydbcluster-ro-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAssociatedRoles
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. -
setAssociatedRoles
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. -
setAssociatedRoles
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. -
getAvailabilityZones
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in. -
setAvailabilityZones
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in. -
getBackupRetentionPeriod
Specifies the number of days for which automatic DB snapshots are retained. -
setBackupRetentionPeriod
Specifies the number of days for which automatic DB snapshots are retained. -
getCopyTagsToSnapshot
If set totrue
, tags are copied to any snapshot of the DB cluster that is created.. -
setCopyTagsToSnapshot
If set totrue
, tags are copied to any snapshot of the DB cluster that is created.. -
setCopyTagsToSnapshot
If set totrue
, tags are copied to any snapshot of the DB cluster that is created.. -
getDbClusterIdentifier
Contains a user-supplied DB cluster identifier. -
setDbClusterIdentifier
Contains a user-supplied DB cluster identifier. -
getDbClusterParameterGroupName
Provides the name of the DB cluster parameter group. -
setDbClusterParameterGroupName
Provides the name of the DB cluster parameter group. -
getDbInstanceParameterGroupName
The name of the DB parameter group to apply to all instances of the DB cluster. -
setDbInstanceParameterGroupName
The name of the DB parameter group to apply to all instances of the DB cluster. -
getDbPort
The port number on which the DB instances in the DB cluster accept connections. -
setDbPort
The port number on which the DB instances in the DB cluster accept connections. -
getDbSubnetGroupName
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group. -
setDbSubnetGroupName
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group. -
getDeletionProtection
Indicates whether or not the DB cluster has deletion protection enabled. -
setDeletionProtection
Indicates whether or not the DB cluster has deletion protection enabled. -
setDeletionProtection
Indicates whether or not the DB cluster has deletion protection enabled. -
getEnableCloudwatchLogsExports
Specifies a list of log types that are enabled for export to CloudWatch Logs. -
setEnableCloudwatchLogsExports
Specifies a list of log types that are enabled for export to CloudWatch Logs. -
getEngineVersion
Indicates the database engine version. -
setEngineVersion
Indicates the database engine version. -
getIamAuthEnabled
True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. -
setIamAuthEnabled
True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. -
setIamAuthEnabled
True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. -
getKmsKeyId
The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
. -
setKmsKeyId
The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
. -
getPreferredBackupWindow
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod
. -
setPreferredBackupWindow
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod
. -
getPreferredMaintenanceWindow
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). -
setPreferredMaintenanceWindow
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). -
getRestoreToTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
setRestoreToTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
getRestoreType
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
setRestoreType
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
getServerlessScalingConfiguration
Contains the scaling configuration of an Neptune Serverless DB cluster. -
setServerlessScalingConfiguration
Contains the scaling configuration of an Neptune Serverless DB cluster. -
setServerlessScalingConfiguration
@Stability(Stable) public void setServerlessScalingConfiguration(@Nullable CfnDBCluster.ServerlessScalingConfigurationProperty value) Contains the scaling configuration of an Neptune Serverless DB cluster. -
getSnapshotIdentifier
Specifies the identifier for a DB cluster snapshot.Must match the identifier of an existing snapshot.
-
setSnapshotIdentifier
Specifies the identifier for a DB cluster snapshot.Must match the identifier of an existing snapshot.
-
getSourceDbClusterIdentifier
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
setSourceDbClusterIdentifier
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
getStorageEncrypted
Indicates whether the DB cluster is encrypted. -
setStorageEncrypted
Indicates whether the DB cluster is encrypted. -
setStorageEncrypted
Indicates whether the DB cluster is encrypted. -
getTagsRaw
The tags assigned to this cluster. -
setTagsRaw
The tags assigned to this cluster. -
getUseLatestRestorableTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
setUseLatestRestorableTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
setUseLatestRestorableTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. -
getVpcSecurityGroupIds
Provides a list of VPC security groups that the DB cluster belongs to. -
setVpcSecurityGroupIds
Provides a list of VPC security groups that the DB cluster belongs to.
-