DBClusterArgs

data class DBClusterArgs(val autoRenewPeriod: Output<Int>? = null, val computeResource: Output<String>? = null, val dbClusterCategory: Output<String>? = null, val dbClusterClass: Output<String>? = null, val dbClusterVersion: Output<String>? = null, val dbNodeClass: Output<String>? = null, val dbNodeCount: Output<Int>? = null, val dbNodeStorage: Output<Int>? = null, val description: Output<String>? = null, val elasticIoResource: Output<Int>? = null, val maintainTime: Output<String>? = null, val mode: Output<String>? = null, val modifyType: Output<String>? = null, val payType: Output<String>? = null, val paymentType: Output<String>? = null, val period: Output<Int>? = null, val renewalStatus: Output<String>? = null, val resourceGroupId: Output<String>? = null, val securityIps: Output<List<String>>? = null, val tags: Output<Map<String, Any>>? = null, val vpcId: Output<String>? = null, val vswitchId: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<DBClusterArgs>

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>

Constructors

Link copied to clipboard
fun DBClusterArgs(autoRenewPeriod: Output<Int>? = null, computeResource: Output<String>? = null, dbClusterCategory: Output<String>? = null, dbClusterClass: Output<String>? = null, dbClusterVersion: Output<String>? = null, dbNodeClass: Output<String>? = null, dbNodeCount: Output<Int>? = null, dbNodeStorage: Output<Int>? = null, description: Output<String>? = null, elasticIoResource: Output<Int>? = null, maintainTime: Output<String>? = null, mode: Output<String>? = null, modifyType: Output<String>? = null, payType: Output<String>? = null, paymentType: Output<String>? = null, period: Output<Int>? = null, renewalStatus: Output<String>? = null, resourceGroupId: Output<String>? = null, securityIps: Output<List<String>>? = null, tags: Output<Map<String, Any>>? = null, vpcId: Output<String>? = null, vswitchId: Output<String>? = null, zoneId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): DBClusterArgs

Properties

Link copied to clipboard
val autoRenewPeriod: Output<Int>? = null

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>? = null

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
val dbClusterCategory: Output<String>? = null

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

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

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

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

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

Link copied to clipboard
val dbNodeClass: Output<String>? = null

The db node class. For more information, see DBClusterClass

Link copied to clipboard
val dbNodeCount: Output<Int>? = null

The db node count.

Link copied to clipboard
val dbNodeStorage: Output<Int>? = null

The db node storage.

Link copied to clipboard
val description: Output<String>? = null

The description of DBCluster.

Link copied to clipboard
val elasticIoResource: Output<Int>? = null

The elastic io resource.

Link copied to clipboard
val maintainTime: Output<String>? = null

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

Link copied to clipboard
val mode: Output<String>? = null

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

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

The modify type.

Link copied to clipboard
val paymentType: Output<String>? = null

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>? = null

Field pay_type has been deprecated. New field payment_type instead.

Link copied to clipboard
val period: Output<Int>? = null
Link copied to clipboard
val renewalStatus: Output<String>? = null

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

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group.

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

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 tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val vpcId: Output<String>? = null

The vpc ID of the resource.

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

The vswitch id.

Link copied to clipboard
val zoneId: Output<String>? = null

The zone ID of the resource.