@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.002Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnDBCluster(software.constructs.Construct scope,
String id)
Create a new `AWS::Neptune::DBCluster`.
|
|
CfnDBCluster(software.constructs.Construct scope,
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 |
|---|---|
Object |
getAssociatedRoles()
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.
|
String |
getAttrClusterResourceId()
The resource id for the DB cluster.
|
String |
getAttrEndpoint()
The connection endpoint for the DB cluster.
|
String |
getAttrPort()
The port number on which the DB cluster accepts connections.
|
String |
getAttrReadEndpoint()
The reader endpoint for the DB cluster.
|
List<String> |
getAvailabilityZones()
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
|
Number |
getBackupRetentionPeriod()
Specifies the number of days for which automatic DB snapshots are retained.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDbClusterIdentifier()
Contains a user-supplied DB cluster identifier.
|
String |
getDbClusterParameterGroupName()
Provides the name of the DB cluster parameter group.
|
String |
getDbSubnetGroupName()
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
|
Object |
getDeletionProtection()
Indicates whether or not the DB cluster has deletion protection enabled.
|
List<String> |
getEnableCloudwatchLogsExports()
Specifies a list of log types that are enabled for export to CloudWatch Logs.
|
String |
getEngineVersion()
Indicates the database engine version.
|
Object |
getIamAuthEnabled()
True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
|
String |
getKmsKeyId()
If `StorageEncrypted` is true, the Amazon KMS key identifier for the encrypted DB cluster.
|
Number |
getPort()
Specifies the port that the database engine is listening on.
|
String |
getPreferredBackupWindow()
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the `BackupRetentionPeriod` .
|
String |
getPreferredMaintenanceWindow()
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
|
String |
getRestoreToTime()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
String |
getRestoreType()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
String |
getSnapshotIdentifier()
Specifies the identifier for a DB cluster snapshot.
|
String |
getSourceDbClusterIdentifier()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
Object |
getStorageEncrypted()
Indicates whether the DB cluster is encrypted.
|
TagManager |
getTags()
The tags assigned to this cluster.
|
Object |
getUseLatestRestorableTime()
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
|
List<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 Map<String,Object> |
renderProperties(Map<String,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(List<Object> 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 |
setDbClusterIdentifier(String value)
Contains a user-supplied DB cluster identifier.
|
void |
setDbClusterParameterGroupName(String value)
Provides the name of the DB cluster parameter group.
|
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)
If `StorageEncrypted` is true, the Amazon KMS key identifier for the encrypted DB cluster.
|
void |
setPort(Number value)
Specifies the port that the database engine is listening on.
|
void |
setPreferredBackupWindow(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(String value)
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 |
setSnapshotIdentifier(String value)
Specifies the identifier for a DB cluster snapshot.
|
void |
setSourceDbClusterIdentifier(String value)
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 |
setUseLatestRestorableTime(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(List<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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnDBCluster(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDBCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnDBCluster(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
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.@Stability(value=Stable)
public CfnDBCluster(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrClusterResourceId()
For example: cluster-ABCD1234EFGH5678IJKL90MNOP . The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies.
@Stability(value=Stable) @NotNull public String getAttrEndpoint()
For example: mystack-mydbcluster-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
@Stability(value=Stable) @NotNull public String getAttrPort()
For example: 8182 .
@Stability(value=Stable) @NotNull public String getAttrReadEndpoint()
For example: mystack-mydbcluster-ro-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setAssociatedRoles(@Nullable
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.
@Stability(value=Stable)
public void setAssociatedRoles(@Nullable
List<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.
@Stability(value=Stable) @Nullable public List<String> getAvailabilityZones()
@Stability(value=Stable)
public void setAvailabilityZones(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public Number getBackupRetentionPeriod()
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
@Stability(value=Stable)
public void setBackupRetentionPeriod(@Nullable
Number value)
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
@Stability(value=Stable) @Nullable public String getDbClusterIdentifier()
This identifier is the unique key that identifies a DB cluster.
@Stability(value=Stable)
public void setDbClusterIdentifier(@Nullable
String value)
This identifier is the unique key that identifies a DB cluster.
@Stability(value=Stable) @Nullable public String getDbClusterParameterGroupName()
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
@Stability(value=Stable)
public void setDbClusterParameterGroupName(@Nullable
String value)
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
@Stability(value=Stable) @Nullable public String getDbSubnetGroupName()
@Stability(value=Stable)
public void setDbSubnetGroupName(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getDeletionProtection()
The database can't be deleted when deletion protection is enabled.
@Stability(value=Stable)
public void setDeletionProtection(@Nullable
Boolean value)
The database can't be deleted when deletion protection is enabled.
@Stability(value=Stable)
public void setDeletionProtection(@Nullable
IResolvable value)
The database can't be deleted when deletion protection is enabled.
@Stability(value=Stable) @Nullable public List<String> getEnableCloudwatchLogsExports()
@Stability(value=Stable)
public void setEnableCloudwatchLogsExports(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public String getEngineVersion()
@Stability(value=Stable)
public void setEngineVersion(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getIamAuthEnabled()
@Stability(value=Stable)
public void setIamAuthEnabled(@Nullable
Boolean value)
@Stability(value=Stable)
public void setIamAuthEnabled(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getKmsKeyId()
@Stability(value=Stable)
public void setKmsKeyId(@Nullable
String value)
@Stability(value=Stable) @Nullable public Number getPort()
@Stability(value=Stable)
public void setPort(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getPreferredBackupWindow()
An update may require some interruption.
@Stability(value=Stable)
public void setPreferredBackupWindow(@Nullable
String value)
An update may require some interruption.
@Stability(value=Stable) @Nullable public String getPreferredMaintenanceWindow()
@Stability(value=Stable)
public void setPreferredMaintenanceWindow(@Nullable
String value)
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setRestoreToTime(@Nullable
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.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setRestoreType(@Nullable
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.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setSnapshotIdentifier(@Nullable
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.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setSourceDbClusterIdentifier(@Nullable
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.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setStorageEncrypted(@Nullable
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.
@Stability(value=Stable)
public void setStorageEncrypted(@Nullable
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.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setUseLatestRestorableTime(@Nullable
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.
@Stability(value=Stable)
public void setUseLatestRestorableTime(@Nullable
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.
@Stability(value=Stable) @Nullable public List<String> getVpcSecurityGroupIds()
Copyright © 2022. All rights reserved.