ClusterArgs

data class ClusterArgs(val autoRenew: Output<Boolean>? = null, val autoRenewPeriod: Output<Int>? = null, val clusterName: Output<String>? = null, val dataCenterName: Output<String>? = null, val diskSize: Output<Int>? = null, val diskType: Output<String>? = null, val enablePublic: Output<Boolean>? = null, val instanceType: Output<String>? = null, val ipWhite: Output<String>? = null, val maintainEndTime: Output<String>? = null, val maintainStartTime: Output<String>? = null, val majorVersion: Output<String>? = null, val nodeCount: Output<Int>? = null, val password: Output<String>? = null, val payType: Output<String>? = null, val period: Output<Int>? = null, val periodUnit: Output<String>? = null, val securityGroups: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val vswitchId: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<ClusterArgs>

Provides a Cassandra cluster resource supports replica set clusters only. The Cassandra provides stable, reliable, and automatic scalable database services. It offers a full range of database solutions, such as disaster recovery, backup, recovery, monitoring, and alarms. You can see detail product introduction here.

NOTE: Available in 1.88.0+. NOTE: The following regions support create Vpc network Cassandra cluster. The official website mark more regions. Or you can call DescribeRegions. NOTE: Create Cassandra cluster or change cluster type and storage would cost 30 minutes. Please make full preparation. DEPRECATED: This resource has been deprecated from version 1.220.0.

Example Usage

Create a cassandra cluster

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.cassandra.Cluster("default", {
clusterName: "cassandra-cluster-name-tf",
dataCenterName: "dc-1",
autoRenew: false,
instanceType: "cassandra.c.large",
majorVersion: "3.11",
nodeCount: 2,
payType: "PayAsYouGo",
vswitchId: "vsw-xxxx",
diskSize: 160,
diskType: "cloud_ssd",
maintainStartTime: "18:00Z",
maintainEndTime: "20:00Z",
ipWhite: "127.0.0.1",
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.cassandra.Cluster("default",
cluster_name="cassandra-cluster-name-tf",
data_center_name="dc-1",
auto_renew=False,
instance_type="cassandra.c.large",
major_version="3.11",
node_count=2,
pay_type="PayAsYouGo",
vswitch_id="vsw-xxxx",
disk_size=160,
disk_type="cloud_ssd",
maintain_start_time="18:00Z",
maintain_end_time="20:00Z",
ip_white="127.0.0.1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Cassandra.Cluster("default", new()
{
ClusterName = "cassandra-cluster-name-tf",
DataCenterName = "dc-1",
AutoRenew = false,
InstanceType = "cassandra.c.large",
MajorVersion = "3.11",
NodeCount = 2,
PayType = "PayAsYouGo",
VswitchId = "vsw-xxxx",
DiskSize = 160,
DiskType = "cloud_ssd",
MaintainStartTime = "18:00Z",
MaintainEndTime = "20:00Z",
IpWhite = "127.0.0.1",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cassandra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cassandra.NewCluster(ctx, "default", &cassandra.ClusterArgs{
ClusterName: pulumi.String("cassandra-cluster-name-tf"),
DataCenterName: pulumi.String("dc-1"),
AutoRenew: pulumi.Bool(false),
InstanceType: pulumi.String("cassandra.c.large"),
MajorVersion: pulumi.String("3.11"),
NodeCount: pulumi.Int(2),
PayType: pulumi.String("PayAsYouGo"),
VswitchId: pulumi.String("vsw-xxxx"),
DiskSize: pulumi.Int(160),
DiskType: pulumi.String("cloud_ssd"),
MaintainStartTime: pulumi.String("18:00Z"),
MaintainEndTime: pulumi.String("20:00Z"),
IpWhite: pulumi.String("127.0.0.1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cassandra.Cluster;
import com.pulumi.alicloud.cassandra.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) {
var default_ = new Cluster("default", ClusterArgs.builder()
.clusterName("cassandra-cluster-name-tf")
.dataCenterName("dc-1")
.autoRenew("false")
.instanceType("cassandra.c.large")
.majorVersion("3.11")
.nodeCount("2")
.payType("PayAsYouGo")
.vswitchId("vsw-xxxx")
.diskSize("160")
.diskType("cloud_ssd")
.maintainStartTime("18:00Z")
.maintainEndTime("20:00Z")
.ipWhite("127.0.0.1")
.build());
}
}
resources:
default:
type: alicloud:cassandra:Cluster
properties:
clusterName: cassandra-cluster-name-tf
dataCenterName: dc-1
autoRenew: 'false'
instanceType: cassandra.c.large
majorVersion: '3.11'
nodeCount: '2'
payType: PayAsYouGo
vswitchId: vsw-xxxx
diskSize: '160'
diskType: cloud_ssd
maintainStartTime: 18:00Z
maintainEndTime: 20:00Z
ipWhite: 127.0.0.1

This is a example for class netType cluster. You can find more detail with the examples/cassandra_cluster dir.

Import

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

$ pulumi import alicloud:cassandra/cluster:Cluster example cds-wz9sr400dd7xxxxx

Constructors

Link copied to clipboard
constructor(autoRenew: Output<Boolean>? = null, autoRenewPeriod: Output<Int>? = null, clusterName: Output<String>? = null, dataCenterName: Output<String>? = null, diskSize: Output<Int>? = null, diskType: Output<String>? = null, enablePublic: Output<Boolean>? = null, instanceType: Output<String>? = null, ipWhite: Output<String>? = null, maintainEndTime: Output<String>? = null, maintainStartTime: Output<String>? = null, majorVersion: Output<String>? = null, nodeCount: Output<Int>? = null, password: Output<String>? = null, payType: Output<String>? = null, period: Output<Int>? = null, periodUnit: Output<String>? = null, securityGroups: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, vswitchId: Output<String>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard
val autoRenew: Output<Boolean>? = null

Auto renew of dataCenter-1,true or false. System default to false, valid when pay_type = PrePaid.

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

Period of dataCenter-1 auto renew, if auto renew is true, one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.

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

Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period ., underline _, or dash - are permitted.

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

Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period ., underline _, or dash - are permitted.

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

User-defined Cassandra dataCenter-1 one node's storage space.Unit: GB. Value range:

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

The disk type of Cassandra dataCenter-1. Valid values are cloud_ssd, cloud_efficiency, local_hdd_pro, local_ssd_pro, local_disk size is fixed.

Link copied to clipboard
val enablePublic: Output<Boolean>? = null
Link copied to clipboard
val instanceType: Output<String>? = null

Instance specification. See Instance specifications. Or you can call describeInstanceType api.

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

Set the instance's IP whitelist in VPC network.

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

The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).

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

The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).

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

Cassandra major version. Now only support version 3.11.

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

The node count of Cassandra dataCenter-1 default to 2.

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

The pay type of Cassandra dataCenter-1. Valid values are Subscription, PayAsYouGo,System default to PayAsYouGo.

Link copied to clipboard
val period: Output<Int>? = null
Link copied to clipboard
val periodUnit: Output<String>? = null
Link copied to clipboard
val securityGroups: Output<List<String>>? = null

A list of security group ids to associate with.

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

A mapping of tags to assign to the resource.

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

The vswitch_id of dataCenter-1, can not empty.

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

The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be "" or consistent.

Functions

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