@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:43.798Z") public class CfnDBCluster extends CfnResource implements IInspectable
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) .dbClusterIdentifier("dbClusterIdentifier") .dbClusterParameterGroupName("dbClusterParameterGroupName") .dbSubnetGroupName("dbSubnetGroupName") .deletionProtection(false) .enableCloudwatchLogsExports(List.of("enableCloudwatchLogsExports")) .engineVersion("engineVersion") .iamAuthEnabled(false) .kmsKeyId("kmsKeyId") .port(123) .preferredBackupWindow("preferredBackupWindow") .preferredMaintenanceWindow("preferredMaintenanceWindow") .restoreToTime("restoreToTime") .restoreType("restoreType") .snapshotIdentifier("snapshotIdentifier") .sourceDbClusterIdentifier("sourceDbClusterIdentifier") .storageEncrypted(false) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .useLatestRestorableTime(false) .vpcSecurityGroupIds(List.of("vpcSecurityGroupIds")) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnDBCluster.Builder
A fluent builder for
CfnDBCluster . |
static interface |
CfnDBCluster.DBClusterRoleProperty
Describes an Amazon Identity and Access Management (IAM) role that is associated with a DB cluster.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDBCluster(Construct scope,
java.lang.String id)
Create a new `AWS::Neptune::DBCluster`.
|
|
CfnDBCluster(Construct scope,
java.lang.String id,
CfnDBClusterProps props)
Create a new `AWS::Neptune::DBCluster`.
|
protected |
CfnDBCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDBCluster(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAssociatedRoles()
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.
|
java.lang.String |
getAttrClusterResourceId()
The resource id for the DB cluster.
|
java.lang.String |
getAttrEndpoint()
The connection endpoint for the DB cluster.
|
java.lang.String |
getAttrPort()
The port number on which the DB cluster accepts connections.
|
java.lang.String |
getAttrReadEndpoint()
The reader endpoint for the DB cluster.
|
java.util.List<java.lang.String> |
getAvailabilityZones()
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
|
java.lang.Number |
getBackupRetentionPeriod()
Specifies the number of days for which automatic DB snapshots are retained.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDbClusterIdentifier()
Contains a user-supplied DB cluster identifier.
|
java.lang.String |
getDbClusterParameterGroupName()
Provides the name of the DB cluster parameter group.
|
java.lang.String |
getDbSubnetGroupName()
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
|
java.lang.Object |
getDeletionProtection()
Indicates whether or not the DB cluster has deletion protection enabled.
|
java.util.List<java.lang.String> |
getEnableCloudwatchLogsExports()
Specifies a list of log types that are enabled for export to CloudWatch Logs.
|
java.lang.String |
getEngineVersion()
Indicates the database engine version.
|
java.lang.Object |
getIamAuthEnabled()
True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
|
java.lang.String |
getKmsKeyId()
If `StorageEncrypted` is true, the Amazon KMS key identifier for the encrypted DB cluster.
|
java.lang.Number |
getPort()
Specifies the port that the database engine is listening on.
|
java.lang.String |
getPreferredBackupWindow()
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the `BackupRetentionPeriod` .
|
java.lang.String |
getPreferredMaintenanceWindow()
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
|
java.lang.String |
getRestoreToTime()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
java.lang.String |
getRestoreType()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
java.lang.String |
getSnapshotIdentifier()
Specifies the identifier for a DB cluster snapshot.
|
java.lang.String |
getSourceDbClusterIdentifier()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
java.lang.Object |
getStorageEncrypted()
Indicates whether the DB cluster is encrypted.
|
TagManager |
getTags()
The tags assigned to this cluster.
|
java.lang.Object |
getUseLatestRestorableTime()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
java.util.List<java.lang.String> |
getVpcSecurityGroupIds()
Provides a list of VPC security groups that the DB cluster belongs to.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAssociatedRoles(IResolvable value)
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.
|
void |
setAssociatedRoles(java.util.List<java.lang.Object> value)
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.
|
void |
setAvailabilityZones(java.util.List<java.lang.String> value)
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
|
void |
setBackupRetentionPeriod(java.lang.Number value)
Specifies the number of days for which automatic DB snapshots are retained.
|
void |
setDbClusterIdentifier(java.lang.String value)
Contains a user-supplied DB cluster identifier.
|
void |
setDbClusterParameterGroupName(java.lang.String value)
Provides the name of the DB cluster parameter group.
|
void |
setDbSubnetGroupName(java.lang.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(java.lang.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(java.util.List<java.lang.String> value)
Specifies a list of log types that are enabled for export to CloudWatch Logs.
|
void |
setEngineVersion(java.lang.String value)
Indicates the database engine version.
|
void |
setIamAuthEnabled(java.lang.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(java.lang.String value)
If `StorageEncrypted` is true, the Amazon KMS key identifier for the encrypted DB cluster.
|
void |
setPort(java.lang.Number value)
Specifies the port that the database engine is listening on.
|
void |
setPreferredBackupWindow(java.lang.String value)
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the `BackupRetentionPeriod` .
|
void |
setPreferredMaintenanceWindow(java.lang.String value)
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
|
void |
setRestoreToTime(java.lang.String value)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
void |
setRestoreType(java.lang.String value)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
void |
setSnapshotIdentifier(java.lang.String value)
Specifies the identifier for a DB cluster snapshot.
|
void |
setSourceDbClusterIdentifier(java.lang.String value)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
void |
setStorageEncrypted(java.lang.Boolean value)
Indicates whether the DB cluster is encrypted.
|
void |
setStorageEncrypted(IResolvable value)
Indicates whether the DB cluster is encrypted.
|
void |
setUseLatestRestorableTime(java.lang.Boolean value)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
void |
setUseLatestRestorableTime(IResolvable value)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
void |
setVpcSecurityGroupIds(java.util.List<java.lang.String> value)
Provides a list of VPC security groups that the DB cluster belongs to.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDBCluster(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDBCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDBCluster(Construct scope, java.lang.String id, CfnDBClusterProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties.public CfnDBCluster(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrClusterResourceId()
For example: cluster-ABCD1234EFGH5678IJKL90MNOP
. The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies.
public java.lang.String getAttrEndpoint()
For example: mystack-mydbcluster-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
public java.lang.String getAttrPort()
For example: 8182
.
public java.lang.String getAttrReadEndpoint()
For example: mystack-mydbcluster-ro-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getAssociatedRoles()
IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.
public void setAssociatedRoles(IResolvable value)
IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.
public void setAssociatedRoles(java.util.List<java.lang.Object> value)
IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.
public java.util.List<java.lang.String> getAvailabilityZones()
public void setAvailabilityZones(java.util.List<java.lang.String> value)
public java.lang.Number getBackupRetentionPeriod()
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
public void setBackupRetentionPeriod(java.lang.Number value)
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
public java.lang.String getDbClusterIdentifier()
This identifier is the unique key that identifies a DB cluster.
public void setDbClusterIdentifier(java.lang.String value)
This identifier is the unique key that identifies a DB cluster.
public java.lang.String getDbClusterParameterGroupName()
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
public void setDbClusterParameterGroupName(java.lang.String value)
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
public java.lang.String getDbSubnetGroupName()
public void setDbSubnetGroupName(java.lang.String value)
public java.lang.Object getDeletionProtection()
The database can't be deleted when deletion protection is enabled.
public void setDeletionProtection(java.lang.Boolean value)
The database can't be deleted when deletion protection is enabled.
public void setDeletionProtection(IResolvable value)
The database can't be deleted when deletion protection is enabled.
public java.util.List<java.lang.String> getEnableCloudwatchLogsExports()
public void setEnableCloudwatchLogsExports(java.util.List<java.lang.String> value)
public java.lang.String getEngineVersion()
public void setEngineVersion(java.lang.String value)
public java.lang.Object getIamAuthEnabled()
public void setIamAuthEnabled(java.lang.Boolean value)
public void setIamAuthEnabled(IResolvable value)
public java.lang.String getKmsKeyId()
public void setKmsKeyId(java.lang.String value)
public java.lang.Number getPort()
public void setPort(java.lang.Number value)
public java.lang.String getPreferredBackupWindow()
An update may require some interruption.
public void setPreferredBackupWindow(java.lang.String value)
An update may require some interruption.
public java.lang.String getPreferredMaintenanceWindow()
public void setPreferredMaintenanceWindow(java.lang.String value)
public java.lang.String getRestoreToTime()
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.
public void setRestoreToTime(java.lang.String value)
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.
public java.lang.String getRestoreType()
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.
public void setRestoreType(java.lang.String value)
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.
public java.lang.String getSnapshotIdentifier()
After you restore a DB cluster using a SnapshotIdentifier
, you must specify the same SnapshotIdentifier
for 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 the SnapshotIdentifier
, and the original DB cluster is deleted.
public void setSnapshotIdentifier(java.lang.String value)
After you restore a DB cluster using a SnapshotIdentifier
, you must specify the same SnapshotIdentifier
for 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 the SnapshotIdentifier
, and the original DB cluster is deleted.
public java.lang.String getSourceDbClusterIdentifier()
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.
public void setSourceDbClusterIdentifier(java.lang.String value)
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.
public java.lang.Object getStorageEncrypted()
If you specify the DBClusterIdentifier
, DBSnapshotIdentifier
, or SourceDBInstanceIdentifier
property, don't specify this property. The value is inherited from the cluster, snapshot, or source DB instance. If you specify the KmsKeyId
property, you must enable encryption.
If you specify the KmsKeyId
, you must enable encryption by setting StorageEncrypted
to true.
public void setStorageEncrypted(java.lang.Boolean value)
If you specify the DBClusterIdentifier
, DBSnapshotIdentifier
, or SourceDBInstanceIdentifier
property, don't specify this property. The value is inherited from the cluster, snapshot, or source DB instance. If you specify the KmsKeyId
property, you must enable encryption.
If you specify the KmsKeyId
, you must enable encryption by setting StorageEncrypted
to true.
public void setStorageEncrypted(IResolvable value)
If you specify the DBClusterIdentifier
, DBSnapshotIdentifier
, or SourceDBInstanceIdentifier
property, don't specify this property. The value is inherited from the cluster, snapshot, or source DB instance. If you specify the KmsKeyId
property, you must enable encryption.
If you specify the KmsKeyId
, you must enable encryption by setting StorageEncrypted
to true.
public java.lang.Object getUseLatestRestorableTime()
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.
public void setUseLatestRestorableTime(java.lang.Boolean value)
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.
public void setUseLatestRestorableTime(IResolvable value)
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.
public java.util.List<java.lang.String> getVpcSecurityGroupIds()
public void setVpcSecurityGroupIds(java.util.List<java.lang.String> value)