Class ClusterInstance
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.rds.ClusterInstance
- All Implemented Interfaces:
IClusterInstance
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:08.245Z")
@Stability(Stable)
public class ClusterInstance
extends software.amazon.jsii.JsiiObject
implements IClusterInstance
Create an RDS Aurora Cluster Instance.
You can create either provisioned or serverless v2 instances.
Example:
Vpc vpc; DatabaseCluster myCluster = DatabaseCluster.Builder.create(this, "Database") .engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder().version(AuroraMysqlEngineVersion.VER_2_08_1).build())) .writer(ClusterInstance.provisioned("writer", ProvisionedClusterInstanceProps.builder() .instanceType(InstanceType.of(InstanceClass.R6G, InstanceSize.XLARGE4)) .build())) .serverlessV2MinCapacity(6.5) .serverlessV2MaxCapacity(64) .readers(List.of(ClusterInstance.serverlessV2("reader1", ServerlessV2ClusterInstanceProps.builder().scaleWithWriter(true).build()), ClusterInstance.serverlessV2("reader2"))) .vpc(vpc) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.rds.IClusterInstance
IClusterInstance.Jsii$Default, IClusterInstance.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
ClusterInstance
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ClusterInstance
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind
(software.constructs.Construct scope, IDatabaseCluster cluster, ClusterInstanceBindOptions props) Add the ClusterInstance to the cluster.static IClusterInstance
provisioned
(String id) Add a provisioned instance to the cluster.static IClusterInstance
provisioned
(String id, ProvisionedClusterInstanceProps props) Add a provisioned instance to the cluster.static IClusterInstance
serverlessV2
(String id) Add a serverless v2 instance to the cluster.static IClusterInstance
serverlessV2
(String id, ServerlessV2ClusterInstanceProps props) Add a serverless v2 instance to the cluster.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ClusterInstance
protected ClusterInstance(software.amazon.jsii.JsiiObjectRef objRef) -
ClusterInstance
protected ClusterInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
provisioned
@Stability(Stable) @NotNull public static IClusterInstance provisioned(@NotNull String id, @Nullable ProvisionedClusterInstanceProps props) Add a provisioned instance to the cluster.Example:
ClusterInstance.provisioned("ClusterInstance", ProvisionedClusterInstanceProps.builder() .instanceType(InstanceType.of(InstanceClass.R6G, InstanceSize.XLARGE4)) .build());
- Parameters:
id
- This parameter is required.props
-
-
provisioned
Add a provisioned instance to the cluster.Example:
ClusterInstance.provisioned("ClusterInstance", ProvisionedClusterInstanceProps.builder() .instanceType(InstanceType.of(InstanceClass.R6G, InstanceSize.XLARGE4)) .build());
- Parameters:
id
- This parameter is required.
-
serverlessV2
@Stability(Stable) @NotNull public static IClusterInstance serverlessV2(@NotNull String id, @Nullable ServerlessV2ClusterInstanceProps props) Add a serverless v2 instance to the cluster.Example:
ClusterInstance.serverlessV2("ClusterInstance", ServerlessV2ClusterInstanceProps.builder() .scaleWithWriter(true) .build());
- Parameters:
id
- This parameter is required.props
-
-
serverlessV2
Add a serverless v2 instance to the cluster.Example:
ClusterInstance.serverlessV2("ClusterInstance", ServerlessV2ClusterInstanceProps.builder() .scaleWithWriter(true) .build());
- Parameters:
id
- This parameter is required.
-
bind
@Stability(Stable) @NotNull public IAuroraClusterInstance bind(@NotNull software.constructs.Construct scope, @NotNull IDatabaseCluster cluster, @NotNull ClusterInstanceBindOptions props) Add the ClusterInstance to the cluster.- Specified by:
bind
in interfaceIClusterInstance
- Parameters:
scope
- This parameter is required.cluster
- This parameter is required.props
- This parameter is required.
-