DBCluster
- Implements: IDBCluster
This class encapsulates and extends the ROS resource type ALIYUN::ADB::DBCluster.
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)
// .diskEncryption(java.lang.Boolean)
// .diskEncryption(IResolvable)
// .elasticIoResource(java.lang.Number)
// .elasticIoResource(IResolvable)
// .enableSsl(java.lang.Boolean)
// .enableSsl(IResolvable)
// .executorCount(java.lang.Number)
// .executorCount(IResolvable)
// .kmsId(java.lang.String)
// .kmsId(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 cluster edition. |
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 cluster mode. |
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 compute resources for 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. |
diskEncryption | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property diskEncryption: Whether to enable cloud disk encryption. Value:. |
elasticIoResource | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property elasticIoResource: The number of Elastic IO Units (EIUs). |
enableSsl | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property enableSsl: Whether to enable SSL link encryption function, value:. |
executorCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property executorCount: This parameter is reserved. |
kmsId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property kmsId: The kmsId used for cloud disk encryption, effective only when DiskEncryption is true. |
period | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property period: The subscription period unit. |
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 cluster edition.
Valid values:
- Cluster: reserved cluster.
Reserved clusters are available only in the Chinese mainland and Singapore regions. In the Singapore region, you can purchase reserved clusters only with the pay-as-you-go billing method.
- MixedStorage: elastic cluster (new).
If you set
DBClusterCategorytoCluster, you must set theModeparameter toReserved. If you setDBClusterCategorytoMixedStorage, you must set theModeparameter toFlexible. Otherwise, cluster creation will fail.
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 cluster mode.
Valid values:
- Reserved: reserved mode.
- Flexible: flexible 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 compute resources for the cluster.
Compute resources are used for data queries. A larger amount of compute resources can provide better query performance. Compute resources are available in cluster and single-node editions:
- Cluster edition: includes specifications such as 16 cores/64 GB, 24 cores/96 GB, and 32 cores or more. The cluster edition supports resource pool isolation, scheduled scaling, and tiered storage of hot and cold data.
- Single-node edition: includes specifications such as 8 cores/32 GB and 16 cores/64 GB. The single-node edition does not provide an SLA guarantee and has a long recovery time from failures (4 to 8 hours). We do not recommend that you use the single-node edition in production environments.
- You can call the DescribeAvailableResource operation to query the compute resources that are available in a specific region.
- This parameter is required when
Modeis set toFlexible(flexible 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.
- The description cannot start with
http:\/\/orhttps:\/\/. - The description must be 2 to 256 characters long.
dbNodeGroupCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dbNodeGroupCount: The number of node groups.
The value must be an integer from 1 to 200.
This parameter is required when
Modeis set toReserved(reserved mode).
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.
diskEncryptionOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property diskEncryption: Whether to enable cloud disk encryption. Value:.
- true: yes.
- false: no.
elasticIoResourceOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property elasticIoResource: The number of Elastic IO Units (EIUs).
enableSslOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableSsl: Whether to enable SSL link encryption function, value:.
- true: open.
- false: close.
executorCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property executorCount: This parameter is reserved.
kmsIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property kmsId: The kmsId used for cloud disk encryption, effective only when DiskEncryption is true.
periodOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property period: The subscription period unit.
Valid values:
- Year
- Month
This parameter is required when
PayTypeis set toPrepaid(subscription).
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
- Type: java.util.List<TagsProperty>
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. |
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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- 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)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- 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.
- 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. |
attrArn | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attrConnectionString | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ConnectionString: Vpc connection string. |
attrDbClusterId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DBClusterId: The ID of the cluster. |
attrOrderId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute OrderId: The ID of the order. |
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
attrArnRequired
public java.lang.Object getAttrArn();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attrConnectionStringRequired
public java.lang.Object getAttrConnectionString();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ConnectionString: Vpc connection string.
attrDbClusterIdRequired
public java.lang.Object getAttrDbClusterId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DBClusterId: The ID of the cluster.
attrOrderIdRequired
public java.lang.Object getAttrOrderId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute OrderId: The ID of the order.
propsRequired
public DBClusterProps getProps();
- Type: DBClusterProps