Class ClusterInstance
Create an RDS Aurora Cluster Instance.
Inheritance
System.Object
ClusterInstance
Implements
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ClusterInstance : DeputyBase, IClusterInstance
Syntax (vb)
Public Class ClusterInstance
Inherits DeputyBase
Implements IClusterInstance
Remarks
You can create either provisioned or serverless v2 instances.
Examples
Vpc vpc;
var myCluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps { Version = AuroraMysqlEngineVersion.VER_2_08_1 }),
Writer = ClusterInstance.Provisioned("writer", new ProvisionedClusterInstanceProps {
InstanceType = InstanceType.Of(InstanceClass.R6G, InstanceSize.XLARGE4)
}),
ServerlessV2MinCapacity = 6.5,
ServerlessV2MaxCapacity = 64,
Readers = new [] { ClusterInstance.ServerlessV2("reader1", new ServerlessV2ClusterInstanceProps { ScaleWithWriter = true }), ClusterInstance.ServerlessV2("reader2") },
Vpc = vpc
});
Synopsis
Constructors
ClusterInstance(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ClusterInstance(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IDatabaseCluster, IClusterInstanceBindOptions) | Add the ClusterInstance to the cluster. |
Provisioned(String, IProvisionedClusterInstanceProps) | Add a provisioned instance to the cluster. |
ServerlessV2(String, IServerlessV2ClusterInstanceProps) | Add a serverless v2 instance to the cluster. |
Constructors
ClusterInstance(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ClusterInstance(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ClusterInstance(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ClusterInstance(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IDatabaseCluster, IClusterInstanceBindOptions)
Add the ClusterInstance to the cluster.
public virtual IAuroraClusterInstance Bind(Construct scope, IDatabaseCluster cluster, IClusterInstanceBindOptions props)
Parameters
- scope Constructs.Construct
- cluster IDatabaseCluster
- props IClusterInstanceBindOptions
Returns
Provisioned(String, IProvisionedClusterInstanceProps)
Add a provisioned instance to the cluster.
public static IClusterInstance Provisioned(string id, IProvisionedClusterInstanceProps props = null)
Parameters
- id System.String
- props IProvisionedClusterInstanceProps
Returns
Examples
ClusterInstance.Provisioned("ClusterInstance", new ProvisionedClusterInstanceProps {
InstanceType = InstanceType.Of(InstanceClass.R6G, InstanceSize.XLARGE4)
});
ServerlessV2(String, IServerlessV2ClusterInstanceProps)
Add a serverless v2 instance to the cluster.
public static IClusterInstance ServerlessV2(string id, IServerlessV2ClusterInstanceProps props = null)
Parameters
- id System.String
- props IServerlessV2ClusterInstanceProps
Returns
Examples
ClusterInstance.ServerlessV2("ClusterInstance", new ServerlessV2ClusterInstanceProps {
ScaleWithWriter = true
});