Show / Hide Table of Contents

Class Cluster

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

NOTE: Available in v1.71.0+.

Example Usage

Create a ADB MySQL cluster

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var name = config.Get("name") ?? "adbClusterconfig";
    var creation = config.Get("creation") ?? "ADB";
    var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
    {
        AvailableResourceCreation = creation,
    }));
    var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "172.16.0.0/16",
    });
    var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
    {
        AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
        CidrBlock = "172.16.0.0/24",
        VpcId = defaultNetwork.Id,
    });
    var defaultCluster = new AliCloud.Adb.Cluster("defaultCluster", new AliCloud.Adb.ClusterArgs
    {
        DbClusterCategory = "Cluster",
        DbClusterVersion = "3.0",
        DbNodeClass = "C8",
        DbNodeCount = 2,
        DbNodeStorage = 200,
        Description = name,
        PayType = "PostPaid",
        VswitchId = defaultSwitch.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Cluster
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Adb
Assembly: Pulumi.AliCloud.dll
Syntax
public class Cluster : CustomResource

Constructors

View Source

Cluster(String, ClusterArgs, CustomResourceOptions)

Create a Cluster resource with the given unique name, arguments, and options.

Declaration
public Cluster(string name, ClusterArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ClusterArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AutoRenewPeriod

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.

Declaration
public Output<int?> AutoRenewPeriod { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

DbClusterCategory

Cluster category. Value options: Basic, Cluster.

Declaration
public Output<string> DbClusterCategory { get; }
Property Value
Type Description
Output<System.String>
View Source

DbClusterVersion

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

Declaration
public Output<string> DbClusterVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

DbNodeClass

The db_node_class of cluster node.

Declaration
public Output<string> DbNodeClass { get; }
Property Value
Type Description
Output<System.String>
View Source

DbNodeCount

The db_node_count of cluster node.

Declaration
public Output<int> DbNodeCount { get; }
Property Value
Type Description
Output<System.Int32>
View Source

DbNodeStorage

The db_node_storage of cluster node.

Declaration
public Output<int> DbNodeStorage { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Description

The description of cluster.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

MaintainTime

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

Declaration
public Output<string> MaintainTime { get; }
Property Value
Type Description
Output<System.String>
View Source

PayType

Valid values are PrePaid, PostPaid, Default to PostPaid. Currently, the resource can not supports change pay type.

Declaration
public Output<string> PayType { get; }
Property Value
Type Description
Output<System.String>
View Source

Period

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.

Declaration
public Output<int?> Period { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

RenewalStatus

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

Declaration
public Output<string> RenewalStatus { get; }
Property Value
Type Description
Output<System.String>
View Source

SecurityIps

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]).

Declaration
public Output<ImmutableArray<string>> SecurityIps { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Tags

A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

VswitchId

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

Declaration
public Output<string> VswitchId { get; }
Property Value
Type Description
Output<System.String>
View Source

ZoneId

The Zone to launch the DB cluster.

Declaration
public Output<string> ZoneId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ClusterState, CustomResourceOptions)

Get an existing Cluster resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Cluster Get(string name, Input<string> id, ClusterState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ClusterState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Cluster
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.