@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.434Z") @Stability(value=Stable) public class DatabaseCluster extends DatabaseClusterBase
Example:
Vpc vpc;
DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database")
.engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder().version(AuroraMysqlEngineVersion.VER_2_08_1).build()))
.credentials(Credentials.fromGeneratedSecret("clusteradmin")) // Optional - will default to 'admin' username and generated password
.instanceProps(InstanceProps.builder()
// optional , defaults to t3.medium
.instanceType(InstanceType.of(InstanceClass.BURSTABLE2, InstanceSize.SMALL))
.vpcSubnets(SubnetSelection.builder()
.subnetType(SubnetType.PRIVATE_WITH_EGRESS)
.build())
.vpc(vpc)
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
DatabaseCluster.Builder
A fluent builder for
DatabaseCluster. |
software.amazon.jsii.JsiiObject.InitializationModeIDatabaseCluster.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
DatabaseCluster(software.constructs.Construct scope,
String id,
DatabaseClusterProps props) |
protected |
DatabaseCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DatabaseCluster(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
SecretRotation |
addRotationMultiUser(String id,
RotationMultiUserOptions options)
Adds the multi user rotation to this cluster.
|
SecretRotation |
addRotationSingleUser()
Adds the single user rotation of the master password to this cluster.
|
SecretRotation |
addRotationSingleUser(RotationSingleUserOptions options)
Adds the single user rotation of the master password to this cluster.
|
static IDatabaseCluster |
fromDatabaseClusterAttributes(software.constructs.Construct scope,
String id,
DatabaseClusterAttributes attrs)
Import an existing DatabaseCluster from properties.
|
Endpoint |
getClusterEndpoint()
The endpoint to use for read/write operations.
|
String |
getClusterIdentifier()
Identifier of the cluster.
|
Endpoint |
getClusterReadEndpoint()
Endpoint to use for load-balanced read-only operations.
|
Connections |
getConnections()
Access to the network connections.
|
IClusterEngine |
getEngine()
The engine for this Cluster.
|
List<Endpoint> |
getInstanceEndpoints()
Endpoints which address each individual replica.
|
List<String> |
getInstanceIdentifiers()
Identifiers of the replicas.
|
SecretRotationApplication |
getMultiUserRotationApplication()
Application for multi user rotation to this cluster.
|
protected CfnDBClusterProps |
getNewCfnProps() |
ISecret |
getSecret()
The secret attached to this cluster.
|
protected List<ISecurityGroup> |
getSecurityGroups() |
SecretRotationApplication |
getSingleUserRotationApplication()
Application for single user rotation of the master password to this cluster.
|
protected ISubnetGroup |
getSubnetGroup() |
IVpc |
getVpc()
The VPC network to place the cluster in.
|
SubnetSelection |
getVpcSubnets()
The cluster's subnets.
|
addProxy, asSecretAttachmentTarget, metric, metric, metricCPUUtilization, metricCPUUtilization, metricDatabaseConnections, metricDatabaseConnections, metricDeadlocks, metricDeadlocks, metricEngineUptime, metricEngineUptime, metricFreeableMemory, metricFreeableMemory, metricFreeLocalStorage, metricFreeLocalStorage, metricNetworkReceiveThroughput, metricNetworkReceiveThroughput, metricNetworkThroughput, metricNetworkThroughput, metricNetworkTransmitThroughput, metricNetworkTransmitThroughput, metricSnapshotStorageUsed, metricSnapshotStorageUsed, metricTotalBackupStorageBilled, metricTotalBackupStorageBilled, metricVolumeBytesUsed, metricVolumeBytesUsed, metricVolumeReadIOPs, metricVolumeReadIOPs, metricVolumeWriteIOPs, metricVolumeWriteIOPsapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected DatabaseCluster(software.amazon.jsii.JsiiObjectRef objRef)
protected DatabaseCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public DatabaseCluster(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
DatabaseClusterProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IDatabaseCluster fromDatabaseClusterAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseClusterAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull public SecretRotation addRotationMultiUser(@NotNull String id, @NotNull RotationMultiUserOptions options)
id - This parameter is required.options - This parameter is required.@Stability(value=Stable) @NotNull public SecretRotation addRotationSingleUser(@Nullable RotationSingleUserOptions options)
options - @Stability(value=Stable) @NotNull public SecretRotation addRotationSingleUser()
@Stability(value=Stable) @NotNull public Endpoint getClusterEndpoint()
getClusterEndpoint in interface IDatabaseClustergetClusterEndpoint in class DatabaseClusterBase@Stability(value=Stable) @NotNull public String getClusterIdentifier()
getClusterIdentifier in interface IDatabaseClustergetClusterIdentifier in class DatabaseClusterBase@Stability(value=Stable) @NotNull public Endpoint getClusterReadEndpoint()
getClusterReadEndpoint in interface IDatabaseClustergetClusterReadEndpoint in class DatabaseClusterBase@Stability(value=Stable) @NotNull public Connections getConnections()
getConnections in interface IConnectablegetConnections in class DatabaseClusterBase@Stability(value=Stable) @NotNull public List<Endpoint> getInstanceEndpoints()
getInstanceEndpoints in interface IDatabaseClustergetInstanceEndpoints in class DatabaseClusterBase@Stability(value=Stable) @NotNull public List<String> getInstanceIdentifiers()
getInstanceIdentifiers in interface IDatabaseClustergetInstanceIdentifiers in class DatabaseClusterBase@Stability(value=Stable) @NotNull public SecretRotationApplication getMultiUserRotationApplication()
@Stability(value=Stable) @NotNull protected CfnDBClusterProps getNewCfnProps()
@Stability(value=Stable) @NotNull protected List<ISecurityGroup> getSecurityGroups()
@Stability(value=Stable) @NotNull public SecretRotationApplication getSingleUserRotationApplication()
@Stability(value=Stable) @NotNull protected ISubnetGroup getSubnetGroup()
@Stability(value=Stable) @NotNull public IVpc getVpc()
@Stability(value=Stable) @Nullable public IClusterEngine getEngine()
Never undefined.
getEngine in interface IDatabaseClustergetEngine in class DatabaseClusterBase@Stability(value=Stable) @Nullable public ISecret getSecret()
@Stability(value=Stable) @Nullable public SubnetSelection getVpcSubnets()
Copyright © 2022. All rights reserved.