Class DatabaseCluster
Create a clustered database with a given number of instances.
Implements
Inherited Members
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
Overrides
ClusterIdentifier
Identifier of the cluster.
public override string ClusterIdentifier { get; }
Property Value
System.String
Overrides
ClusterReadEndpoint
Endpoint to use for load-balanced read-only operations.
public override Endpoint ClusterReadEndpoint { get; }
Property Value
Overrides
Connections
Access to the network connections.
public override Connections_ Connections { get; }
Property Value
Overrides
Engine
The engine for this Cluster.
public override IClusterEngine Engine { get; }
Property Value
Overrides
Remarks
Never undefined.
InstanceEndpoints
Endpoints which address each individual replica.
public override Endpoint[] InstanceEndpoints { get; }
Property Value
Endpoint[]
Overrides
InstanceIdentifiers
Identifiers of the replicas.
public override string[] InstanceIdentifiers { get; }
Property Value
System.String[]
Overrides
MultiUserRotationApplication
Application for multi user rotation to this cluster.
public virtual SecretRotationApplication MultiUserRotationApplication { get; }
Property Value
NewCfnProps
Secret
SecurityGroups
SingleUserRotationApplication
Application for single user rotation of the master password to this cluster.
public virtual SecretRotationApplication SingleUserRotationApplication { get; }
Property Value
SubnetGroup
Vpc
VpcSubnets
The cluster's subnets.
public virtual ISubnetSelection VpcSubnets { get; }
Property Value
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
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
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