Skip to content

DBCluster

This class encapsulates and extends the ROS resource type ALIYUN::ADB::DBCluster, which is used to create an AnalyticDB for MySQL cluster.

Initializers

import com.aliyun.ros.cdk.adb.DBCluster;
DBCluster.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .dbClusterCategory(java.lang.String)
    .dbClusterCategory(IResolvable)
    .dbClusterVersion(java.lang.String)
    .dbClusterVersion(IResolvable)
    .mode(java.lang.String)
    .mode(IResolvable)
    .payType(java.lang.String)
    .payType(IResolvable)
    .vpcId(java.lang.String)
    .vpcId(IResolvable)
    .vSwitchId(java.lang.String)
    .vSwitchId(IResolvable)
//  .computeResource(java.lang.String)
//  .computeResource(IResolvable)
//  .dbClusterClass(java.lang.String)
//  .dbClusterClass(IResolvable)
//  .dbClusterDescription(java.lang.String)
//  .dbClusterDescription(IResolvable)
//  .dbNodeGroupCount(java.lang.Number)
//  .dbNodeGroupCount(IResolvable)
//  .dbNodeStorage(java.lang.Number)
//  .dbNodeStorage(IResolvable)
//  .elasticIoResource(java.lang.Number)
//  .elasticIoResource(IResolvable)
//  .executorCount(java.lang.Number)
//  .executorCount(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .periodType(java.lang.String)
//  .periodType(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .zoneId(java.lang.String)
//  .zoneId(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
dbClusterCategory java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbClusterCategory: The edition of the cluster.
dbClusterVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbClusterVersion: The version of the cluster.
mode java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property mode: The mode of the cluster.
payType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property payType: The billing method of the cluster.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: The ID of the VPC.
vSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vSwitchId: The ID of the vSwitch.
computeResource java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property computeResource: The computing resource of the cluster.
dbClusterClass java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbClusterClass: The specification of the cluster.
dbClusterDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbClusterDescription: The description of the cluster.
dbNodeGroupCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property dbNodeGroupCount: The number of node groups.
dbNodeStorage java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property dbNodeStorage: The storage space of the node.
elasticIoResource java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property elasticIoResource: Elastic IO Unit Note the flexible mode cluster will use this parameter.
executorCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property executorCount: ExecutorCount.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: Valid values when the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
periodType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property periodType: The subscription period for the cluster.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: The ID of the resource group.
tags java.util.List<TagsProperty> Property tags: Tags to attach to instance.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The zone ID of the cluster.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

dbClusterCategoryRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property dbClusterCategory: The edition of the cluster.

Valid values when the cluster is in reserved mode: Basic Cluster When the cluster is in elastic mode, set the value to MixedStorage.


dbClusterVersionRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property dbClusterVersion: The version of the cluster.

Set the value to 3.0.


modeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property mode: The mode of the cluster.

Valid values: Reserver: the reserved mode Flexible: the elastic mode


payTypeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property payType: The billing method of the cluster.

Valid values: Postpaid: pay-as-you-go Prepaid: subscription


vpcIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vpcId: The ID of the VPC.


vSwitchIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vSwitchId: The ID of the vSwitch.


computeResourceOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property computeResource: The computing resource of the cluster.

This parameter is required in elastic mode.


dbClusterClassOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property dbClusterClass: The specification of the cluster.

This parameter is required in reserved mode. Valid values: Basic Edition: T8, T16, T32, and T52 Cluster Edition: C8 and C32


dbClusterDescriptionOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property dbClusterDescription: The description of the cluster.


dbNodeGroupCountOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property dbNodeGroupCount: The number of node groups.

This parameter is required in reserved mode. Valid values: T8, T16, T32, and T52: 1 C8 and C32: 1 to 128


dbNodeStorageOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property dbNodeStorage: The storage space of the node.

This parameter is required in reserved mode. Unit: GB. Valid values: T8: 100 to 500 T16 and T32: 100 to 2000 T52: 100 to 4000 C8: 100 to 1000 C32: 100 to 8000 Note The storage space less than 1,000 GB increases in increments of 100 GB. The storage space greater than 1,000 GB increases in increments of 1,000 GB.


elasticIoResourceOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property elasticIoResource: Elastic IO Unit Note the flexible mode cluster will use this parameter.


executorCountOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property executorCount: ExecutorCount.


periodOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property period: Valid values when the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.

Valid values when the Period parameter is set to Year: 1, 2, and 3.


periodTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property periodType: The subscription period for the cluster.

This parameter is required if the PayType parameter is set to Prepaid. Valid values: Year: subscription on a yearly basis Month: subscription on a monthly basis


resourceGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: The ID of the resource group.


tagsOptional

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


zoneIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property zoneId: The zone ID of the cluster.

You can call the DescribeRegions operation to query the most recent zone list.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.adb.DBCluster;
DBCluster.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrConnectionString com.aliyun.ros.cdk.core.IResolvable Attribute ConnectionString: Vpc connection string.
attrDbClusterId com.aliyun.ros.cdk.core.IResolvable Attribute DBClusterId: The ID of the cluster.
attrOrderId com.aliyun.ros.cdk.core.IResolvable Attribute OrderId: The ID of the order.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrConnectionStringRequired

public IResolvable getAttrConnectionString();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ConnectionString: Vpc connection string.


attrDbClusterIdRequired

public IResolvable getAttrDbClusterId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DBClusterId: The ID of the cluster.


attrOrderIdRequired

public IResolvable getAttrOrderId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute OrderId: The ID of the order.