Skip to content

DBCluster

This class encapsulates and extends the ROS resource type ALIYUN::ADBLake::DBCluster.

Initializers

import com.aliyun.ros.cdk.adblake.DBCluster;
DBCluster.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .dbClusterVersion(java.lang.String)
    .dbClusterVersion(IResolvable)
    .payType(java.lang.String)
    .payType(IResolvable)
    .vpcId(java.lang.String)
    .vpcId(IResolvable)
    .vSwitchId(java.lang.String)
    .vSwitchId(IResolvable)
    .zoneId(java.lang.String)
    .zoneId(IResolvable)
//  .backupSetId(java.lang.String)
//  .backupSetId(IResolvable)
//  .cloneSourceRegionId(java.lang.String)
//  .cloneSourceRegionId(IResolvable)
//  .computeResource(java.lang.String)
//  .computeResource(IResolvable)
//  .dbClusterDescription(java.lang.String)
//  .dbClusterDescription(IResolvable)
//  .dbClusterNetworkType(java.lang.String)
//  .dbClusterNetworkType(IResolvable)
//  .diskEncryption(java.lang.Boolean)
//  .diskEncryption(IResolvable)
//  .enableDefaultResourcePool(java.lang.Boolean)
//  .enableDefaultResourcePool(IResolvable)
//  .kmsId(java.lang.String)
//  .kmsId(IResolvable)
//  .period(java.lang.String)
//  .period(IResolvable)
//  .periodType(java.lang.String)
//  .periodType(IResolvable)
//  .productForm(java.lang.String)
//  .productForm(IResolvable)
//  .productVersion(java.lang.String)
//  .productVersion(IResolvable)
//  .reservedNodeCount(java.lang.Number)
//  .reservedNodeCount(IResolvable)
//  .reservedNodeSize(java.lang.Number)
//  .reservedNodeSize(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .restoreToTime(java.lang.String)
//  .restoreToTime(IResolvable)
//  .restoreType(java.lang.String)
//  .restoreType(IResolvable)
//  .secondaryVSwitchId(java.lang.String)
//  .secondaryVSwitchId(IResolvable)
//  .secondaryZoneId(java.lang.String)
//  .secondaryZoneId(IResolvable)
//  .sourceDbClusterId(java.lang.String)
//  .sourceDbClusterId(IResolvable)
//  .storageResource(java.lang.String)
//  .storageResource(IResolvable)
//  .tags(java.util.List<TagsProperty>)
    .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.
dbClusterVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbClusterVersion: The version 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 virtual private cloud (VPC) ID of the cluster.
vSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vSwitchId: The vSwitch ID of the cluster.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The zone ID.
backupSetId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property backupSetId: The ID of the backup set that you want to use to restore data.
cloneSourceRegionId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property cloneSourceRegionId: The region ID of the source cluster.
computeResource java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property computeResource: The amount of reserved computing resources.
dbClusterDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbClusterDescription: The description of the cluster.
dbClusterNetworkType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbClusterNetworkType: The network type of the cluster.
diskEncryption java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property diskEncryption: Specifies whether to encrypt the disk.
enableDefaultResourcePool java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property enableDefaultResourcePool: Specifies whether to allocate all reserved computing resources to the user_default resource group.
kmsId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property kmsId: The ID of the key used to encrypt data on cloud disks.
period java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property period: The unit of the subscription duration.
periodType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property periodType: The subscription type of the subscription cluster.
productForm java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property productForm: The product form.
productVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property productVersion: The version of the cluster.Note If only ProductForm is set to IntegrationForm, enter this parameter.
reservedNodeCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property reservedNodeCount: The number of reserved nodes.
reservedNodeSize java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property reservedNodeSize: The resource specification of each reserved node, in ACUs.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: The resource group ID.
restoreToTime java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property restoreToTime: The point in time to which you want to restore the cluster.
restoreType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property restoreType: The method that you want to use to restore data.
secondaryVSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property secondaryVSwitchId: The ID of the secondary vSwitch.
secondaryZoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property secondaryZoneId: The ID of the secondary availability zone.
sourceDbClusterId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property sourceDbClusterId: The ID of the source AnalyticDB for MySQL Data Warehouse Edition cluster.
storageResource java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property storageResource: The amount of reserved storage resources.
tags java.util.List<TagsProperty> Property tags: Tags to attach to cluster.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

dbClusterVersionRequired

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

Property dbClusterVersion: The version of the cluster.

Set the value to 5.0.


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 virtual private cloud (VPC) ID of the cluster.


vSwitchIdRequired

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

Property vSwitchId: The vSwitch ID of the cluster.


zoneIdRequired

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

Property zoneId: The zone ID.

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


backupSetIdOptional

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

Property backupSetId: The ID of the backup set that you want to use to restore data.

Note You can call the DescribeBackups operation to query the backup sets of the cluster.


cloneSourceRegionIdOptional

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

Property cloneSourceRegionId: The region ID of the source cluster.

This parameter is required for cross-region cloning.


computeResourceOptional

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

Property computeResource: The amount of reserved computing resources.

Unit: ACUs. Valid values: 0ACU to 4096ACU. The value must be in increments of 16 ACUs. Each ACU is equivalent to 1 core and 4 GB memory. Note This parameter must be specified with a unit.


dbClusterDescriptionOptional

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

Property dbClusterDescription: The description of the cluster.

The description cannot start with http:// or https://. The description must be 2 to 256 characters in length


dbClusterNetworkTypeOptional

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

Property dbClusterNetworkType: The network type of the cluster.

Valid values: VPC


diskEncryptionOptional

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

Property diskEncryption: Specifies whether to encrypt the disk.

Valid values: true false (default)


enableDefaultResourcePoolOptional

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

Property enableDefaultResourcePool: Specifies whether to allocate all reserved computing resources to the user_default resource group.

Valid values: true (default) false


kmsIdOptional

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

Property kmsId: The ID of the key used to encrypt data on cloud disks.

This parameter takes effect only when disk encryption is enabled for the AnalyticDB for MySQL cluster.


periodOptional

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

Property period: The unit of the subscription duration.

Valid values:

  • Year
  • Month

This parameter is required if you set PayType to Prepaid.


periodTypeOptional

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

Property periodType: The subscription type of the subscription cluster.

Valid values: Year: subscription on a yearly basis. Month: subscription on a monthly basis. Note This parameter must be specified when PayType is set to Prepaid.


productFormOptional

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

Property productForm: The product form.

Valid values:

  • IntegrationForm: Integration Form.
  • LegacyForm: Data Lakehouse Edition.

productVersionOptional

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

Property productVersion: The version of the cluster.Note If only ProductForm is set to IntegrationForm, enter this parameter.


reservedNodeCountOptional

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

Property reservedNodeCount: The number of reserved nodes.

  • For Enterprise Edition, the value must be a multiple of 3. The default value is

1.

  • For Basic Edition, the default value is 1.

This parameter is available only when ProductForm is set to IntegrationForm.


reservedNodeSizeOptional

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

Property reservedNodeSize: The resource specification of each reserved node, in ACUs.


resourceGroupIdOptional

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

Property resourceGroupId: The resource group ID.


restoreToTimeOptional

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

Property restoreToTime: The point in time to which you want to restore the cluster.

Specify the time in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.


restoreTypeOptional

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

Property restoreType: The method that you want to use to restore data.

Valid values: backup: restores data from a backup set. You must also specify the BackupSetId and SourceDBClusterId parameters. timepoint: restores data to a point in time. You must also specify the RestoreToTime and SourceDBClusterId parameters.


secondaryVSwitchIdOptional

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

Property secondaryVSwitchId: The ID of the secondary vSwitch.

The value of this parameter cannot be the same as the value of the VSwitchId parameter.


secondaryZoneIdOptional

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

Property secondaryZoneId: The ID of the secondary availability zone.

The value of this parameter cannot be the same as the value of the ZoneId parameter.


sourceDbClusterIdOptional

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

Property sourceDbClusterId: The ID of the source AnalyticDB for MySQL Data Warehouse Edition cluster.

If you want to restore a Data Lakehouse Edition cluster from a Data Warehouse Edition cluster, you must specify this parameter.


storageResourceOptional

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

Property storageResource: The amount of reserved storage resources.

Unit: AnalyticDB compute units (ACUs). Valid values: 0ACU to 2064ACU. The value must be in increments of 24 ACUs. Each ACU is equivalent to 1 core and 4 GB memory. Note This parameter must be specified with a unit.


tagsOptional

Property tags: Tags to attach to cluster.

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


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.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc 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

fetchCondition

public RosCondition fetchCondition()

fetchDependency

public java.util.List<java.lang.String> fetchDependency()

fetchResourceDesc

public java.lang.String fetchResourceDesc()

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.adblake.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.
env com.aliyun.ros.cdk.core.IResourceEnvironment The environment this resource belongs to.
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 java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ConnectionString: The public endpoint that is used to connect to the cluster.
attrDbClusterId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute DBClusterId: The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster.
attrOrderId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute OrderId: The order ID.
props DBClusterProps No description.

nodeRequired

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

The construct tree node associated with this construct.


envRequired

public IResourceEnvironment getEnv();
  • Type: com.aliyun.ros.cdk.core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


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 java.lang.Object getAttrConnectionString();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ConnectionString: The public endpoint that is used to connect to the cluster.


attrDbClusterIdRequired

public java.lang.Object getAttrDbClusterId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute DBClusterId: The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster.


attrOrderIdRequired

public java.lang.Object getAttrOrderId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute OrderId: The order ID.


propsRequired

public DBClusterProps getProps();