Class CfnDBCluster
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IDBClusterRef,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 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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDBCluster.static interfaceDescribes an Amazon Identity and Access Management (IAM) role that is associated with a DB cluster.static interfaceContains the scaling configuration of a Neptune Serverless DB cluster.Nested 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.interfaces.neptune.IDBClusterRef
IDBClusterRef.Jsii$Default, IDBClusterRef.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
ConstructorsModifierConstructorDescriptionprotectedCfnDBCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDBCluster(software.amazon.jsii.JsiiObjectRef objRef) CfnDBCluster(software.constructs.Construct scope, String id) Create a newAWS::Neptune::DBCluster.CfnDBCluster(software.constructs.Construct scope, String id, CfnDBClusterProps props) Create a newAWS::Neptune::DBCluster. -
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.A reference to a DBCluster resource.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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnDBCluster.renderProperties(Map<String, Object> props) voidsetAssociatedRoles(List<Object> value) Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.voidsetAssociatedRoles(IResolvable value) Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.voidsetAvailabilityZones(List<String> value) Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.voidsetBackupRetentionPeriod(Number value) Specifies the number of days for which automatic DB snapshots are retained.voidsetCopyTagsToSnapshot(Boolean value) If set totrue, tags are copied to any snapshot of the DB cluster that is created..voidsetCopyTagsToSnapshot(IResolvable value) If set totrue, tags are copied to any snapshot of the DB cluster that is created..voidsetDbClusterIdentifier(String value) Contains a user-supplied DB cluster identifier.voidProvides the name of the DB cluster parameter group.voidThe name of the DB parameter group to apply to all instances of the DB cluster.voidThe port number on which the DB instances in the DB cluster accept connections.voidsetDbSubnetGroupName(String value) Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.voidsetDeletionProtection(Boolean value) Indicates whether or not the DB cluster has deletion protection enabled.voidsetDeletionProtection(IResolvable value) Indicates whether or not the DB cluster has deletion protection enabled.voidsetEnableCloudwatchLogsExports(List<String> value) Specifies a list of log types that are enabled for export to CloudWatch Logs.voidsetEngineVersion(String value) Indicates the database engine version.voidsetIamAuthEnabled(Boolean value) True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.voidsetIamAuthEnabled(IResolvable value) True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.voidsetKmsKeyId(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.voidsetPreferredBackupWindow(String value) Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod.voidSpecifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).voidsetRestoreToTime(String value) Creates a new DB cluster from a DB snapshot or DB cluster snapshot.voidsetRestoreType(String value) Creates a new DB cluster from a DB snapshot or DB cluster snapshot.voidContains the scaling configuration of an Neptune Serverless DB cluster.voidContains the scaling configuration of an Neptune Serverless DB cluster.voidsetSnapshotIdentifier(String value) Specifies the identifier for a DB cluster snapshot.voidCreates a new DB cluster from a DB snapshot or DB cluster snapshot.voidsetStorageEncrypted(Boolean value) Indicates whether the DB cluster is encrypted.voidsetStorageEncrypted(IResolvable value) Indicates whether the DB cluster is encrypted.voidsetTagsRaw(List<CfnTag> value) The tags assigned to this cluster.voidCreates a new DB cluster from a DB snapshot or DB cluster snapshot.voidCreates a new DB cluster from a DB snapshot or DB cluster snapshot.voidsetVpcSecurityGroupIds(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, 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.interfaces.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
-
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) Create a newAWS::Neptune::DBCluster.- 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) Create a newAWS::Neptune::DBCluster.- 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
-
isCfnDBCluster
Checks whether the given object is a CfnDBCluster.- Parameters:
x- 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.
-
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:
getCfnPropertiesin classCfnResource
-
getDbClusterRef
A reference to a DBCluster resource.- Specified by:
getDbClusterRefin interfaceIDBClusterRef
-
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.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnDBCluster.DBClusterRoleProperty> -
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..Returns union: either
BooleanorIResolvable -
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.Returns union: either
BooleanorIResolvable -
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.Returns union: either
BooleanorIResolvable -
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.Returns union: either
IResolvableorCfnDBCluster.ServerlessScalingConfigurationProperty -
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.Returns union: either
BooleanorIResolvable -
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.Returns union: either
BooleanorIResolvable -
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.
-