DBCluster

Provides a AnalyticDB for MySQL (ADB) DBCluster resource. For information about AnalyticDB for MySQL (ADB) DBCluster and how to use it, see What is DBCluster.

NOTE: Available in v1.121.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.adb.DBCluster;
import com.pulumi.alicloud.adb.DBClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("adbClusterconfig");
final var creation = config.get("creation").orElse("ADB");
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation(creation)
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.16.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(defaultNetwork.id())
.cidrBlock("172.16.0.0/24")
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vswitchName(name)
.build());
var this_ = new DBCluster("this", DBClusterArgs.builder()
.dbClusterCategory("Cluster")
.dbNodeClass("C8")
.dbNodeCount("4")
.dbNodeStorage("400")
.mode("reserver")
.dbClusterVersion("3.0")
.paymentType("PayAsYouGo")
.vswitchId(defaultSwitch.id())
.description("Test new adb again.")
.maintainTime("23:00Z-00:00Z")
.tags(Map.ofEntries(
Map.entry("Created", "TF-update"),
Map.entry("For", "acceptance-test-update")
))
.resourceGroupId("rg-aek2s7ylxx6****")
.securityIps(
"10.168.1.12",
"10.168.1.11")
.build());
}
}

Import

AnalyticDB for MySQL (ADB) DBCluster can be imported using the id, e.g.

$ pulumi import alicloud:adb/dBCluster:DBCluster example <id>

Properties

Link copied to clipboard
val autoRenewPeriod: Output<Int>

Auto-renewal period of an cluster, in the unit of the month. It is valid when payment_type is Subscription. Valid values: 1, 2, 3, 6, 12, 24, 36. Default to 1.

Link copied to clipboard
val computeResource: Output<String>?

The specifications of computing resources in elastic mode. The increase of resources can speed up queries. AnalyticDB for MySQL automatically scales computing resources. For more information, see ComputeResource

Link copied to clipboard

The connection string of the cluster.

Link copied to clipboard

The db cluster category. Valid values: Basic, Cluster, MixedStorage.

Link copied to clipboard
val dbClusterClass: Output<String>?

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Link copied to clipboard
val dbClusterVersion: Output<String>?

The db cluster version. Value options: 3.0, Default to 3.0.

Link copied to clipboard
val dbNodeClass: Output<String>

The db node class. For more information, see DBClusterClass

Link copied to clipboard
val dbNodeCount: Output<Int>

The db node count.

Link copied to clipboard
val dbNodeStorage: Output<Int>

The db node storage.

Link copied to clipboard
val description: Output<String>

The description of DBCluster.

Link copied to clipboard
val elasticIoResource: Output<Int>

The elastic io resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val maintainTime: Output<String>

The maintenance window of the cluster. Format: hh:mmZ-hh:mmZ.

Link copied to clipboard
val mode: Output<String>

The mode of the cluster. Valid values: reserver, flexible.

Link copied to clipboard
val modifyType: Output<String>?

The modify type.

Link copied to clipboard
val paymentType: Output<String>

The payment type of the resource. Valid values are PayAsYouGo and Subscription. Default to PayAsYouGo. Note: The payment_type supports updating from v1.166.0+.

Link copied to clipboard
val payType: Output<String>

Field pay_type has been deprecated. New field payment_type instead.

Link copied to clipboard
val period: Output<Int>?
Link copied to clipboard
val port: Output<String>

(Available in 1.196.0+) The connection port of the ADB cluster.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val renewalStatus: Output<String>

Valid values are AutoRenewal, Normal, NotRenewal, Default to NotRenewal.

Link copied to clipboard
val resourceGroupId: Output<String>

The ID of the resource group.

Link copied to clipboard
val securityIps: Output<List<String>>

List of IP addresses allowed to access all databases of an cluster. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is 1,32).

Link copied to clipboard
val status: Output<String>

The status of the resource.

Link copied to clipboard
val tags: Output<Map<String, Any>>?

A mapping of tags to assign to the resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The vpc ID of the resource.

Link copied to clipboard
val vswitchId: Output<String>?

The vswitch id.

Link copied to clipboard
val zoneId: Output<String>

The zone ID of the resource.