Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.21.0 published on Tuesday, Jun 14, 2022 by Pulumi

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

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
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.Id),
            VswitchName = name,
        });
        var @this = new AliCloud.Adb.DBCluster("this", new AliCloud.Adb.DBClusterArgs
        {
            DbClusterCategory = "Cluster",
            DbClusterClass = "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 = 
            {
                { "Created", "TF-update" },
                { "For", "acceptance-test-update" },
            },
            ResourceGroupId = "rg-aek2s7ylxx6****",
            SecurityIps = 
            {
                "10.168.1.12",
                "10.168.1.11",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/adb"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "adbClusterconfig"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		creation := "ADB"
		if param := cfg.Get("creation"); param != "" {
			creation = param
		}
		defaultZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef(creation),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
			VpcId:       defaultNetwork.ID(),
			CidrBlock:   pulumi.String("172.16.0.0/24"),
			ZoneId:      pulumi.String(defaultZones.Zones[0].Id),
			VswitchName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		_, err = adb.NewDBCluster(ctx, "this", &adb.DBClusterArgs{
			DbClusterCategory: pulumi.String("Cluster"),
			DbClusterClass:    pulumi.String("C8"),
			DbNodeCount:       pulumi.Int(4),
			DbNodeStorage:     pulumi.Int(400),
			Mode:              pulumi.String("reserver"),
			DbClusterVersion:  pulumi.String("3.0"),
			PaymentType:       pulumi.String("PayAsYouGo"),
			VswitchId:         defaultSwitch.ID(),
			Description:       pulumi.String("Test new adb again."),
			MaintainTime:      pulumi.String("23:00Z-00:00Z"),
			Tags: pulumi.AnyMap{
				"Created": pulumi.Any("TF-update"),
				"For":     pulumi.Any("acceptance-test-update"),
			},
			ResourceGroupId: pulumi.String("rg-aek2s7ylxx6****"),
			SecurityIps: pulumi.StringArray{
				pulumi.String("10.168.1.12"),
				pulumi.String("10.168.1.11"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "adbClusterconfig"
creation = config.get("creation")
if creation is None:
    creation = "ADB"
default_zones = alicloud.get_zones(available_resource_creation=creation)
default_network = alicloud.vpc.Network("defaultNetwork",
    vpc_name=name,
    cidr_block="172.16.0.0/16")
default_switch = alicloud.vpc.Switch("defaultSwitch",
    vpc_id=default_network.id,
    cidr_block="172.16.0.0/24",
    zone_id=default_zones.zones[0].id,
    vswitch_name=name)
this = alicloud.adb.DBCluster("this",
    db_cluster_category="Cluster",
    db_cluster_class="C8",
    db_node_count=4,
    db_node_storage=400,
    mode="reserver",
    db_cluster_version="3.0",
    payment_type="PayAsYouGo",
    vswitch_id=default_switch.id,
    description="Test new adb again.",
    maintain_time="23:00Z-00:00Z",
    tags={
        "Created": "TF-update",
        "For": "acceptance-test-update",
    },
    resource_group_id="rg-aek2s7ylxx6****",
    security_ips=[
        "10.168.1.12",
        "10.168.1.11",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "adbClusterconfig";
const creation = config.get("creation") || "ADB";
const defaultZones = alicloud.getZones({
    availableResourceCreation: creation,
});
const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
    vpcName: name,
    cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
    vpcId: defaultNetwork.id,
    cidrBlock: "172.16.0.0/24",
    zoneId: defaultZones.then(defaultZones => defaultZones.zones?[0]?.id),
    vswitchName: name,
});
const _this = new alicloud.adb.DBCluster("this", {
    dbClusterCategory: "Cluster",
    dbClusterClass: "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: {
        Created: "TF-update",
        For: "acceptance-test-update",
    },
    resourceGroupId: "rg-aek2s7ylxx6****",
    securityIps: [
        "10.168.1.12",
        "10.168.1.11",
    ],
});

Coming soon!

Create a DBCluster Resource

new DBCluster(name: string, args: DBClusterArgs, opts?: CustomResourceOptions);
@overload
def DBCluster(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              auto_renew_period: Optional[int] = None,
              compute_resource: Optional[str] = None,
              db_cluster_category: Optional[str] = None,
              db_cluster_class: Optional[str] = None,
              db_cluster_version: Optional[str] = None,
              db_node_class: Optional[str] = None,
              db_node_count: Optional[int] = None,
              db_node_storage: Optional[int] = None,
              description: Optional[str] = None,
              elastic_io_resource: Optional[int] = None,
              maintain_time: Optional[str] = None,
              mode: Optional[str] = None,
              modify_type: Optional[str] = None,
              pay_type: Optional[str] = None,
              payment_type: Optional[str] = None,
              period: Optional[int] = None,
              renewal_status: Optional[str] = None,
              resource_group_id: Optional[str] = None,
              security_ips: Optional[Sequence[str]] = None,
              tags: Optional[Mapping[str, Any]] = None,
              vswitch_id: Optional[str] = None,
              zone_id: Optional[str] = None)
@overload
def DBCluster(resource_name: str,
              args: DBClusterArgs,
              opts: Optional[ResourceOptions] = None)
func NewDBCluster(ctx *Context, name string, args DBClusterArgs, opts ...ResourceOption) (*DBCluster, error)
public DBCluster(string name, DBClusterArgs args, CustomResourceOptions? opts = null)
public DBCluster(String name, DBClusterArgs args)
public DBCluster(String name, DBClusterArgs args, CustomResourceOptions options)
type: alicloud:adb:DBCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DBClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DBClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DBClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DBClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DBClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DBCluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DBCluster resource accepts the following input properties:

DbClusterCategory string

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

Mode string

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

AutoRenewPeriod 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.

ComputeResource 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

DbClusterClass string

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

DbClusterVersion string

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

DbNodeClass string

The db node class. For more information, see DBClusterClass

DbNodeCount int

The db node count.

DbNodeStorage int

The db node storage.

Description string

The description of DBCluster.

ElasticIoResource int

The elastic io resource.

MaintainTime string

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

ModifyType string

The modify type.

PayType string

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

PaymentType 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+.

Period int
RenewalStatus string

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

ResourceGroupId string

The ID of the resource group.

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

Tags Dictionary<string, object>

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.
VswitchId string

The vswitch id.

ZoneId string

The zone ID of the resource.

DbClusterCategory string

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

Mode string

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

AutoRenewPeriod 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.

ComputeResource 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

DbClusterClass string

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

DbClusterVersion string

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

DbNodeClass string

The db node class. For more information, see DBClusterClass

DbNodeCount int

The db node count.

DbNodeStorage int

The db node storage.

Description string

The description of DBCluster.

ElasticIoResource int

The elastic io resource.

MaintainTime string

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

ModifyType string

The modify type.

PayType string

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

PaymentType 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+.

Period int
RenewalStatus string

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

ResourceGroupId string

The ID of the resource group.

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

Tags map[string]interface{}

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.
VswitchId string

The vswitch id.

ZoneId string

The zone ID of the resource.

dbClusterCategory String

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

mode String

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

autoRenewPeriod Integer

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.

computeResource 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

dbClusterClass String

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

dbClusterVersion String

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

dbNodeClass String

The db node class. For more information, see DBClusterClass

dbNodeCount Integer

The db node count.

dbNodeStorage Integer

The db node storage.

description String

The description of DBCluster.

elasticIoResource Integer

The elastic io resource.

maintainTime String

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

modifyType String

The modify type.

payType String

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

paymentType 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+.

period Integer
renewalStatus String

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

resourceGroupId String

The ID of the resource group.

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

tags Map<String,Object>

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.
vswitchId String

The vswitch id.

zoneId String

The zone ID of the resource.

dbClusterCategory string

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

mode string

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

autoRenewPeriod number

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.

computeResource 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

dbClusterClass string

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

dbClusterVersion string

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

dbNodeClass string

The db node class. For more information, see DBClusterClass

dbNodeCount number

The db node count.

dbNodeStorage number

The db node storage.

description string

The description of DBCluster.

elasticIoResource number

The elastic io resource.

maintainTime string

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

modifyType string

The modify type.

payType string

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

paymentType 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+.

period number
renewalStatus string

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

resourceGroupId string

The ID of the resource group.

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

tags {[key: string]: any}

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.
vswitchId string

The vswitch id.

zoneId string

The zone ID of the resource.

db_cluster_category str

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

mode str

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

auto_renew_period 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.

compute_resource str

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

db_cluster_class str

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

db_cluster_version str

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

db_node_class str

The db node class. For more information, see DBClusterClass

db_node_count int

The db node count.

db_node_storage int

The db node storage.

description str

The description of DBCluster.

elastic_io_resource int

The elastic io resource.

maintain_time str

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

modify_type str

The modify type.

pay_type str

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

payment_type str

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+.

period int
renewal_status str

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

resource_group_id str

The ID of the resource group.

security_ips Sequence[str]

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

tags Mapping[str, Any]

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.
vswitch_id str

The vswitch id.

zone_id str

The zone ID of the resource.

dbClusterCategory String

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

mode String

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

autoRenewPeriod Number

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.

computeResource 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

dbClusterClass String

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

dbClusterVersion String

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

dbNodeClass String

The db node class. For more information, see DBClusterClass

dbNodeCount Number

The db node count.

dbNodeStorage Number

The db node storage.

description String

The description of DBCluster.

elasticIoResource Number

The elastic io resource.

maintainTime String

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

modifyType String

The modify type.

payType String

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

paymentType 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+.

period Number
renewalStatus String

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

resourceGroupId String

The ID of the resource group.

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

tags Map<Any>

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.
vswitchId String

The vswitch id.

zoneId String

The zone ID of the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the DBCluster resource produces the following output properties:

ConnectionString string

The endpoint of the cluster.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the resource.

ConnectionString string

The endpoint of the cluster.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the resource.

connectionString String

The endpoint of the cluster.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the resource.

connectionString string

The endpoint of the cluster.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the resource.

connection_string str

The endpoint of the cluster.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the resource.

connectionString String

The endpoint of the cluster.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the resource.

Look up an Existing DBCluster Resource

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

public static get(name: string, id: Input<ID>, state?: DBClusterState, opts?: CustomResourceOptions): DBCluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auto_renew_period: Optional[int] = None,
        compute_resource: Optional[str] = None,
        connection_string: Optional[str] = None,
        db_cluster_category: Optional[str] = None,
        db_cluster_class: Optional[str] = None,
        db_cluster_version: Optional[str] = None,
        db_node_class: Optional[str] = None,
        db_node_count: Optional[int] = None,
        db_node_storage: Optional[int] = None,
        description: Optional[str] = None,
        elastic_io_resource: Optional[int] = None,
        maintain_time: Optional[str] = None,
        mode: Optional[str] = None,
        modify_type: Optional[str] = None,
        pay_type: Optional[str] = None,
        payment_type: Optional[str] = None,
        period: Optional[int] = None,
        renewal_status: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        security_ips: Optional[Sequence[str]] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, Any]] = None,
        vswitch_id: Optional[str] = None,
        zone_id: Optional[str] = None) -> DBCluster
func GetDBCluster(ctx *Context, name string, id IDInput, state *DBClusterState, opts ...ResourceOption) (*DBCluster, error)
public static DBCluster Get(string name, Input<string> id, DBClusterState? state, CustomResourceOptions? opts = null)
public static DBCluster get(String name, Output<String> id, DBClusterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AutoRenewPeriod 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.

ComputeResource 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

ConnectionString string

The endpoint of the cluster.

DbClusterCategory string

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

DbClusterClass string

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

DbClusterVersion string

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

DbNodeClass string

The db node class. For more information, see DBClusterClass

DbNodeCount int

The db node count.

DbNodeStorage int

The db node storage.

Description string

The description of DBCluster.

ElasticIoResource int

The elastic io resource.

MaintainTime string

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

Mode string

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

ModifyType string

The modify type.

PayType string

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

PaymentType 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+.

Period int
RenewalStatus string

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

ResourceGroupId string

The ID of the resource group.

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

Status string

The status of the resource.

Tags Dictionary<string, object>

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.
VswitchId string

The vswitch id.

ZoneId string

The zone ID of the resource.

AutoRenewPeriod 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.

ComputeResource 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

ConnectionString string

The endpoint of the cluster.

DbClusterCategory string

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

DbClusterClass string

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

DbClusterVersion string

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

DbNodeClass string

The db node class. For more information, see DBClusterClass

DbNodeCount int

The db node count.

DbNodeStorage int

The db node storage.

Description string

The description of DBCluster.

ElasticIoResource int

The elastic io resource.

MaintainTime string

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

Mode string

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

ModifyType string

The modify type.

PayType string

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

PaymentType 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+.

Period int
RenewalStatus string

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

ResourceGroupId string

The ID of the resource group.

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

Status string

The status of the resource.

Tags map[string]interface{}

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.
VswitchId string

The vswitch id.

ZoneId string

The zone ID of the resource.

autoRenewPeriod Integer

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.

computeResource 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

connectionString String

The endpoint of the cluster.

dbClusterCategory String

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

dbClusterClass String

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

dbClusterVersion String

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

dbNodeClass String

The db node class. For more information, see DBClusterClass

dbNodeCount Integer

The db node count.

dbNodeStorage Integer

The db node storage.

description String

The description of DBCluster.

elasticIoResource Integer

The elastic io resource.

maintainTime String

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

mode String

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

modifyType String

The modify type.

payType String

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

paymentType 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+.

period Integer
renewalStatus String

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

resourceGroupId String

The ID of the resource group.

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

status String

The status of the resource.

tags Map<String,Object>

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.
vswitchId String

The vswitch id.

zoneId String

The zone ID of the resource.

autoRenewPeriod number

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.

computeResource 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

connectionString string

The endpoint of the cluster.

dbClusterCategory string

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

dbClusterClass string

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

dbClusterVersion string

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

dbNodeClass string

The db node class. For more information, see DBClusterClass

dbNodeCount number

The db node count.

dbNodeStorage number

The db node storage.

description string

The description of DBCluster.

elasticIoResource number

The elastic io resource.

maintainTime string

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

mode string

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

modifyType string

The modify type.

payType string

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

paymentType 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+.

period number
renewalStatus string

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

resourceGroupId string

The ID of the resource group.

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

status string

The status of the resource.

tags {[key: string]: any}

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.
vswitchId string

The vswitch id.

zoneId string

The zone ID of the resource.

auto_renew_period 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.

compute_resource str

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

connection_string str

The endpoint of the cluster.

db_cluster_category str

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

db_cluster_class str

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

db_cluster_version str

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

db_node_class str

The db node class. For more information, see DBClusterClass

db_node_count int

The db node count.

db_node_storage int

The db node storage.

description str

The description of DBCluster.

elastic_io_resource int

The elastic io resource.

maintain_time str

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

mode str

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

modify_type str

The modify type.

pay_type str

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

payment_type str

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+.

period int
renewal_status str

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

resource_group_id str

The ID of the resource group.

security_ips Sequence[str]

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

status str

The status of the resource.

tags Mapping[str, Any]

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.
vswitch_id str

The vswitch id.

zone_id str

The zone ID of the resource.

autoRenewPeriod Number

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.

computeResource 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

connectionString String

The endpoint of the cluster.

dbClusterCategory String

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

dbClusterClass String

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

Deprecated:

It duplicates with attribute db_node_class and is deprecated from 1.121.2.

dbClusterVersion String

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

dbNodeClass String

The db node class. For more information, see DBClusterClass

dbNodeCount Number

The db node count.

dbNodeStorage Number

The db node storage.

description String

The description of DBCluster.

elasticIoResource Number

The elastic io resource.

maintainTime String

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

mode String

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

modifyType String

The modify type.

payType String

Field pay_type has been deprecated. New field payment_type instead.

Deprecated:

Attribute 'pay_type' has been deprecated from the provider version 1.166.0 and it will be remove in the future version. Please use the new attribute 'payment_type' instead.

paymentType 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+.

period Number
renewalStatus String

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

resourceGroupId String

The ID of the resource group.

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

status String

The status of the resource.

tags Map<Any>

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.
vswitchId String

The vswitch id.

zoneId String

The zone ID of the resource.

Import

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.