Class CfnDBCluster
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Neptune::DBCluster.
The 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")
.dbSubnetGroupName("dbSubnetGroupName")
.deletionProtection(false)
.enableCloudwatchLogsExports(List.of("enableCloudwatchLogsExports"))
.engineVersion("engineVersion")
.iamAuthEnabled(false)
.kmsKeyId("kmsKeyId")
.port(123)
.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();
-
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 interfaceExample:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnDBCluster(Construct scope, String id) Create a newAWS::Neptune::DBCluster.CfnDBCluster(Construct scope, String id, CfnDBClusterProps props) Create a newAWS::Neptune::DBCluster.protectedCfnDBCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDBCluster(software.amazon.jsii.JsiiObjectRef objRef) -
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 cluster accepts 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.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.IfStorageEncryptedis true, the Amazon KMS key identifier for the encrypted DB cluster.getPort()AWS::Neptune::DBCluster.Port.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.AWS::Neptune::DBCluster.ServerlessScalingConfiguration.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()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.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.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) IfStorageEncryptedis true, the Amazon KMS key identifier for the encrypted DB cluster.voidAWS::Neptune::DBCluster.Port.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.voidAWS::Neptune::DBCluster.ServerlessScalingConfiguration.voidAWS::Neptune::DBCluster.ServerlessScalingConfiguration.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.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.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @Nullable CfnDBClusterProps props) Create a newAWS::Neptune::DBCluster.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
CfnDBCluster
Create a newAWS::Neptune::DBCluster.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
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 cluster accepts connections.For example:
8182. -
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
-
getTags
The tags assigned to this cluster. -
getAssociatedRoles
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.
-
setAssociatedRoles
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.
-
setAssociatedRoles
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.
-
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.An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
-
setBackupRetentionPeriod
Specifies the number of days for which automatic DB snapshots are retained.An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
-
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.This identifier is the unique key that identifies a DB cluster.
-
setDbClusterIdentifier
Contains a user-supplied DB cluster identifier.This identifier is the unique key that identifies a DB cluster.
-
getDbClusterParameterGroupName
Provides the name of the DB cluster parameter group.An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
-
setDbClusterParameterGroupName
Provides the name of the DB cluster parameter group.An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
-
getDbInstanceParameterGroupName
The name of the DB parameter group to apply to all instances of the DB cluster.Used only in case of a major engine version upgrade request
Note that when you apply a parameter group using
DBInstanceParameterGroupName, parameter changes are applied immediately, not during the next maintenance window.Constraints - The DB parameter group must be in the same DB parameter group family as the target DB cluster version.
- The
DBInstanceParameterGroupNameparameter is only valid for major engine version upgrades.
- The
-
setDbInstanceParameterGroupName
The name of the DB parameter group to apply to all instances of the DB cluster.Used only in case of a major engine version upgrade request
Note that when you apply a parameter group using
DBInstanceParameterGroupName, parameter changes are applied immediately, not during the next maintenance window.Constraints - The DB parameter group must be in the same DB parameter group family as the target DB cluster version.
- The
DBInstanceParameterGroupNameparameter is only valid for major engine version upgrades.
- The
-
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.The database can't be deleted when deletion protection is enabled.
-
setDeletionProtection
Indicates whether or not the DB cluster has deletion protection enabled.The database can't be deleted when deletion protection is enabled.
-
setDeletionProtection
Indicates whether or not the DB cluster has deletion protection enabled.The database can't be deleted when deletion protection is 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
IfStorageEncryptedis true, the Amazon KMS key identifier for the encrypted DB cluster. -
setKmsKeyId
IfStorageEncryptedis true, the Amazon KMS key identifier for the encrypted DB cluster. -
getPort
AWS::Neptune::DBCluster.Port. -
setPort
AWS::Neptune::DBCluster.Port. -
getPreferredBackupWindow
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod.An update may require some interruption.
-
setPreferredBackupWindow
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod.An update may require some interruption.
-
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.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
setRestoreToTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
getRestoreType
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
setRestoreType
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
getServerlessScalingConfiguration
AWS::Neptune::DBCluster.ServerlessScalingConfiguration. -
setServerlessScalingConfiguration
AWS::Neptune::DBCluster.ServerlessScalingConfiguration. -
setServerlessScalingConfiguration
@Stability(Stable) public void setServerlessScalingConfiguration(@Nullable CfnDBCluster.ServerlessScalingConfigurationProperty value) AWS::Neptune::DBCluster.ServerlessScalingConfiguration. -
getSnapshotIdentifier
Specifies the identifier for a DB cluster snapshot. Must match the identifier of an existing snapshot.After you restore a DB cluster using a
SnapshotIdentifier, you must specify the sameSnapshotIdentifierfor any future updates to the DB cluster. When you specify this property for an update, the DB cluster is not restored from the snapshot again, and the data in the database is not changed.However, if you don't specify the
SnapshotIdentifier, an empty DB cluster is created, and the original DB cluster is deleted. If you specify a property that is different from the previous snapshot restore property, the DB cluster is restored from the snapshot specified by theSnapshotIdentifier, and the original DB cluster is deleted. -
setSnapshotIdentifier
Specifies the identifier for a DB cluster snapshot. Must match the identifier of an existing snapshot.After you restore a DB cluster using a
SnapshotIdentifier, you must specify the sameSnapshotIdentifierfor any future updates to the DB cluster. When you specify this property for an update, the DB cluster is not restored from the snapshot again, and the data in the database is not changed.However, if you don't specify the
SnapshotIdentifier, an empty DB cluster is created, and the original DB cluster is deleted. If you specify a property that is different from the previous snapshot restore property, the DB cluster is restored from the snapshot specified by theSnapshotIdentifier, and the original DB cluster is deleted. -
getSourceDbClusterIdentifier
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
setSourceDbClusterIdentifier
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
getStorageEncrypted
Indicates whether the DB cluster is encrypted.If you specify the
DBClusterIdentifier,DBSnapshotIdentifier, orSourceDBInstanceIdentifierproperty, don't specify this property. The value is inherited from the cluster, snapshot, or source DB instance. If you specify theKmsKeyIdproperty, you must enable encryption.If you specify the
KmsKeyId, you must enable encryption by settingStorageEncryptedto true. -
setStorageEncrypted
Indicates whether the DB cluster is encrypted.If you specify the
DBClusterIdentifier,DBSnapshotIdentifier, orSourceDBInstanceIdentifierproperty, don't specify this property. The value is inherited from the cluster, snapshot, or source DB instance. If you specify theKmsKeyIdproperty, you must enable encryption.If you specify the
KmsKeyId, you must enable encryption by settingStorageEncryptedto true. -
setStorageEncrypted
Indicates whether the DB cluster is encrypted.If you specify the
DBClusterIdentifier,DBSnapshotIdentifier, orSourceDBInstanceIdentifierproperty, don't specify this property. The value is inherited from the cluster, snapshot, or source DB instance. If you specify theKmsKeyIdproperty, you must enable encryption.If you specify the
KmsKeyId, you must enable encryption by settingStorageEncryptedto true. -
getUseLatestRestorableTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
setUseLatestRestorableTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
setUseLatestRestorableTime
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
-
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.
-