ClusterArgs

data class ClusterArgs(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 diskPerformanceLevel: Output<String>? = null, val elasticIoResource: Output<Int>? = null, val elasticIoResourceSize: Output<String>? = 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<ClusterArgs>

Provides a ADB cluster resource. An ADB cluster is an isolated database environment in the cloud. An ADB cluster can contain multiple user-created databases.

DEPRECATED: This resource has been deprecated from version 1.121.0. Please use new resource alicloud_adb_db_cluster. NOTE: Available in v1.71.0+.

Example Usage

Create a ADB MySQL cluster

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.Cluster;
import com.pulumi.alicloud.adb.ClusterArgs;
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 defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.dbClusterVersion("3.0")
.dbClusterCategory("Cluster")
.dbNodeClass("C8")
.dbNodeCount(2)
.dbNodeStorage(200)
.payType("PostPaid")
.description(name)
.vswitchId(defaultSwitch.id())
.build());
}
}

Import

ADB cluster can be imported using the id, e.g.

$ pulumi import alicloud:adb/cluster:Cluster example am-abc12345678

Constructors

Link copied to clipboard
fun ClusterArgs(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, diskPerformanceLevel: Output<String>? = null, elasticIoResource: Output<Int>? = null, elasticIoResourceSize: Output<String>? = 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(): ClusterArgs

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 pay_type is PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1.

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

Cluster category. Value options: Basic, Cluster.

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

Cluster version. Value options: 3.0, Default to 3.0.

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

The db_node_class of cluster node.

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

The db_node_count of cluster node.

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

The db_node_storage of cluster node.

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

The description of cluster.

Link copied to clipboard
val diskPerformanceLevel: Output<String>? = null
Link copied to clipboard
val elasticIoResource: Output<Int>? = null
Link copied to clipboard
val elasticIoResourceSize: Output<String>? = null
Link copied to clipboard
val maintainTime: Output<String>? = null

Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)

Link copied to clipboard
val mode: Output<String>? = null
Link copied to clipboard
val modifyType: Output<String>? = null
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

The duration that you will buy DB cluster (in month). It is valid when pay_type is PrePaid. Valid values: 1~9, 12, 24, 36. Default to 1.

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
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
Link copied to clipboard
val vswitchId: Output<String>? = null

The virtual switch ID to launch DB instances in one VPC.

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

The Zone to launch the DB cluster.