Show / Hide Table of Contents

Class DatabaseCluster

Create a clustered database with a given number of instances.

Inheritance
System.Object
Construct
Resource
DatabaseClusterBase
DatabaseCluster
Implements
IDatabaseCluster
IResource
IConstruct
Constructs.IConstruct
IDependable
IConnectable
ISecretAttachmentTarget
Inherited Members
DatabaseClusterBase.AddProxy(String, IDatabaseProxyOptions)
DatabaseClusterBase.AsSecretAttachmentTarget()
DatabaseClusterBase.Metric(String, IMetricOptions)
DatabaseClusterBase.MetricCPUUtilization(IMetricOptions)
DatabaseClusterBase.MetricDatabaseConnections(IMetricOptions)
DatabaseClusterBase.MetricDeadlocks(IMetricOptions)
DatabaseClusterBase.MetricEngineUptime(IMetricOptions)
DatabaseClusterBase.MetricFreeableMemory(IMetricOptions)
DatabaseClusterBase.MetricFreeLocalStorage(IMetricOptions)
DatabaseClusterBase.MetricNetworkReceiveThroughput(IMetricOptions)
DatabaseClusterBase.MetricNetworkThroughput(IMetricOptions)
DatabaseClusterBase.MetricNetworkTransmitThroughput(IMetricOptions)
DatabaseClusterBase.MetricSnapshotStorageUsed(IMetricOptions)
DatabaseClusterBase.MetricTotalBackupStorageBilled(IMetricOptions)
DatabaseClusterBase.MetricVolumeBytesUsed(IMetricOptions)
DatabaseClusterBase.MetricVolumeReadIOPs(IMetricOptions)
DatabaseClusterBase.MetricVolumeWriteIOPs(IMetricOptions)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.AWS.RDS.dll
Syntax (csharp)
public class DatabaseCluster : DatabaseClusterBase, IDatabaseCluster, IResource, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Syntax (vb)
Public Class DatabaseCluster
    Inherits DatabaseClusterBase
    Implements IDatabaseCluster, IResource, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Remarks

Resource: AWS::RDS::DBCluster

ExampleMetadata: infused

Examples
Vpc vpc;

var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
    Engine = DatabaseClusterEngine.AURORA,
    InstanceProps = new InstanceProps { Vpc = vpc }
});

var proxy = new DatabaseProxy(this, "Proxy", new DatabaseProxyProps {
    ProxyTarget = ProxyTarget.FromCluster(cluster),
    Secrets = new [] { cluster.Secret },
    Vpc = vpc
});

var role = new Role(this, "DBProxyRole", new RoleProps { AssumedBy = new AccountPrincipal(Account) });
proxy.GrantConnect(role, "admin");

Synopsis

Constructors

DatabaseCluster(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

DatabaseCluster(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

DatabaseCluster(Construct, String, IDatabaseClusterProps)

Properties

ClusterEndpoint

The endpoint to use for read/write operations.

ClusterIdentifier

Identifier of the cluster.

ClusterReadEndpoint

Endpoint to use for load-balanced read-only operations.

Connections

Access to the network connections.

Engine

The engine for this Cluster.

InstanceEndpoints

Endpoints which address each individual replica.

InstanceIdentifiers

Identifiers of the replicas.

MultiUserRotationApplication

Application for multi user rotation to this cluster.

NewCfnProps
Secret

The secret attached to this cluster.

SecurityGroups
SingleUserRotationApplication

Application for single user rotation of the master password to this cluster.

SubnetGroup
Vpc

The VPC network to place the cluster in.

VpcSubnets

The cluster's subnets.

Methods

AddRotationMultiUser(String, IRotationMultiUserOptions)

Adds the multi user rotation to this cluster.

AddRotationSingleUser(IRotationSingleUserOptions)

Adds the single user rotation of the master password to this cluster.

FromDatabaseClusterAttributes(Construct, String, IDatabaseClusterAttributes)

Import an existing DatabaseCluster from properties.

Constructors

DatabaseCluster(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected DatabaseCluster(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

DatabaseCluster(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected DatabaseCluster(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

DatabaseCluster(Construct, String, IDatabaseClusterProps)

public DatabaseCluster(Construct scope, string id, IDatabaseClusterProps props)
Parameters
scope Constructs.Construct
id System.String
props IDatabaseClusterProps

Properties

ClusterEndpoint

The endpoint to use for read/write operations.

public override Endpoint ClusterEndpoint { get; }
Property Value

Endpoint

Overrides
DatabaseClusterBase.ClusterEndpoint

ClusterIdentifier

Identifier of the cluster.

public override string ClusterIdentifier { get; }
Property Value

System.String

Overrides
DatabaseClusterBase.ClusterIdentifier

ClusterReadEndpoint

Endpoint to use for load-balanced read-only operations.

public override Endpoint ClusterReadEndpoint { get; }
Property Value

Endpoint

Overrides
DatabaseClusterBase.ClusterReadEndpoint

Connections

Access to the network connections.

public override Connections_ Connections { get; }
Property Value

Connections_

Overrides
DatabaseClusterBase.Connections

Engine

The engine for this Cluster.

public override IClusterEngine Engine { get; }
Property Value

IClusterEngine

Overrides
DatabaseClusterBase.Engine
Remarks

Never undefined.

InstanceEndpoints

Endpoints which address each individual replica.

public override Endpoint[] InstanceEndpoints { get; }
Property Value

Endpoint[]

Overrides
DatabaseClusterBase.InstanceEndpoints

InstanceIdentifiers

Identifiers of the replicas.

public override string[] InstanceIdentifiers { get; }
Property Value

System.String[]

Overrides
DatabaseClusterBase.InstanceIdentifiers

MultiUserRotationApplication

Application for multi user rotation to this cluster.

public virtual SecretRotationApplication MultiUserRotationApplication { get; }
Property Value

SecretRotationApplication

NewCfnProps

protected virtual ICfnDBClusterProps NewCfnProps { get; }
Property Value

ICfnDBClusterProps

Secret

The secret attached to this cluster.

public virtual ISecret Secret { get; }
Property Value

ISecret

SecurityGroups

protected virtual ISecurityGroup[] SecurityGroups { get; }
Property Value

ISecurityGroup[]

SingleUserRotationApplication

Application for single user rotation of the master password to this cluster.

public virtual SecretRotationApplication SingleUserRotationApplication { get; }
Property Value

SecretRotationApplication

SubnetGroup

protected virtual ISubnetGroup SubnetGroup { get; }
Property Value

ISubnetGroup

Vpc

The VPC network to place the cluster in.

public virtual IVpc Vpc { get; }
Property Value

IVpc

VpcSubnets

The cluster's subnets.

public virtual ISubnetSelection VpcSubnets { get; }
Property Value

ISubnetSelection

Methods

AddRotationMultiUser(String, IRotationMultiUserOptions)

Adds the multi user rotation to this cluster.

public virtual SecretRotation AddRotationMultiUser(string id, IRotationMultiUserOptions options)
Parameters
id System.String
options IRotationMultiUserOptions
Returns

SecretRotation

AddRotationSingleUser(IRotationSingleUserOptions)

Adds the single user rotation of the master password to this cluster.

public virtual SecretRotation AddRotationSingleUser(IRotationSingleUserOptions options = null)
Parameters
options IRotationSingleUserOptions
Returns

SecretRotation

FromDatabaseClusterAttributes(Construct, String, IDatabaseClusterAttributes)

Import an existing DatabaseCluster from properties.

public static IDatabaseCluster FromDatabaseClusterAttributes(Construct scope, string id, IDatabaseClusterAttributes attrs)
Parameters
scope Constructs.Construct
id System.String
attrs IDatabaseClusterAttributes
Returns

IDatabaseCluster

Implements

IDatabaseCluster
IResource
IConstruct
Constructs.IConstruct
IDependable
IConnectable
ISecretAttachmentTarget
Back to top Generated by DocFX