1. Packages
  2. Alicloud Provider
  3. API Docs
  4. selectdb
  5. DbCluster
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.selectdb.DbCluster

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a SelectDB DBCluster resource.

    For information about SelectDB DBCluster and how to use it, see What is DBCluster.

    NOTE: Available since v1.229.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform_example";
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: _default.zones?.[0]?.id,
    }));
    const defaultDbInstance = new alicloud.selectdb.DbInstance("default", {
        dbInstanceClass: "selectdb.xlarge",
        dbInstanceDescription: name,
        cacheSize: 200,
        paymentType: "PayAsYouGo",
        vpcId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.vswitches?.[0]?.vpcId),
        zoneId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.vswitches?.[0]?.zoneId),
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.vswitches?.[0]?.id),
    });
    const defaultDbCluster = new alicloud.selectdb.DbCluster("default", {
        dbInstanceId: defaultDbInstance.id,
        dbClusterDescription: name,
        dbClusterClass: "selectdb.2xlarge",
        cacheSize: 400,
        paymentType: "PayAsYouGo",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform_example"
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id=default.zones[0].id)
    default_db_instance = alicloud.selectdb.DbInstance("default",
        db_instance_class="selectdb.xlarge",
        db_instance_description=name,
        cache_size=200,
        payment_type="PayAsYouGo",
        vpc_id=default_get_switches.vswitches[0].vpc_id,
        zone_id=default_get_switches.vswitches[0].zone_id,
        vswitch_id=default_get_switches.vswitches[0].id)
    default_db_cluster = alicloud.selectdb.DbCluster("default",
        db_instance_id=default_db_instance.id,
        db_cluster_description=name,
        db_cluster_class="selectdb.2xlarge",
        cache_size=400,
        payment_type="PayAsYouGo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/selectdb"
    	"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 {
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cfg := config.New(ctx, "")
    		name := "terraform_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(_default.Zones[0].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultDbInstance, err := selectdb.NewDbInstance(ctx, "default", &selectdb.DbInstanceArgs{
    			DbInstanceClass:       pulumi.String("selectdb.xlarge"),
    			DbInstanceDescription: pulumi.String(name),
    			CacheSize:             pulumi.Int(200),
    			PaymentType:           pulumi.String("PayAsYouGo"),
    			VpcId:                 pulumi.String(defaultGetSwitches.Vswitches[0].VpcId),
    			ZoneId:                pulumi.String(defaultGetSwitches.Vswitches[0].ZoneId),
    			VswitchId:             pulumi.String(defaultGetSwitches.Vswitches[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = selectdb.NewDbCluster(ctx, "default", &selectdb.DbClusterArgs{
    			DbInstanceId:         defaultDbInstance.ID(),
    			DbClusterDescription: pulumi.String(name),
    			DbClusterClass:       pulumi.String("selectdb.2xlarge"),
    			CacheSize:            pulumi.Int(400),
    			PaymentType:          pulumi.String("PayAsYouGo"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var config = new Config();
        var name = config.Get("name") ?? "terraform_example";
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultDbInstance = new AliCloud.SelectDB.DbInstance("default", new()
        {
            DbInstanceClass = "selectdb.xlarge",
            DbInstanceDescription = name,
            CacheSize = 200,
            PaymentType = "PayAsYouGo",
            VpcId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.VpcId),
            ZoneId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.ZoneId),
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.Id),
        });
    
        var defaultDbCluster = new AliCloud.SelectDB.DbCluster("default", new()
        {
            DbInstanceId = defaultDbInstance.Id,
            DbClusterDescription = name,
            DbClusterClass = "selectdb.2xlarge",
            CacheSize = 400,
            PaymentType = "PayAsYouGo",
        });
    
    });
    
    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.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.selectdb.DbInstance;
    import com.pulumi.alicloud.selectdb.DbInstanceArgs;
    import com.pulumi.alicloud.selectdb.DbCluster;
    import com.pulumi.alicloud.selectdb.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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var name = config.get("name").orElse("terraform_example");
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(default_.zones()[0].id())
                .build());
    
            var defaultDbInstance = new DbInstance("defaultDbInstance", DbInstanceArgs.builder()
                .dbInstanceClass("selectdb.xlarge")
                .dbInstanceDescription(name)
                .cacheSize(200)
                .paymentType("PayAsYouGo")
                .vpcId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].vpcId()))
                .zoneId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].zoneId()))
                .vswitchId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].id()))
                .build());
    
            var defaultDbCluster = new DbCluster("defaultDbCluster", DbClusterArgs.builder()
                .dbInstanceId(defaultDbInstance.id())
                .dbClusterDescription(name)
                .dbClusterClass("selectdb.2xlarge")
                .cacheSize(400)
                .paymentType("PayAsYouGo")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform_example
    resources:
      defaultDbInstance:
        type: alicloud:selectdb:DbInstance
        name: default
        properties:
          dbInstanceClass: selectdb.xlarge
          dbInstanceDescription: ${name}
          cacheSize: 200
          paymentType: PayAsYouGo
          vpcId: ${defaultGetSwitches.vswitches[0].vpcId}
          zoneId: ${defaultGetSwitches.vswitches[0].zoneId}
          vswitchId: ${defaultGetSwitches.vswitches[0].id}
      defaultDbCluster:
        type: alicloud:selectdb:DbCluster
        name: default
        properties:
          dbInstanceId: ${defaultDbInstance.id}
          dbClusterDescription: ${name}
          dbClusterClass: selectdb.2xlarge
          cacheSize: 400
          paymentType: PayAsYouGo
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      defaultGetNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: ^default-NODELETING$
      defaultGetSwitches:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${default.zones[0].id}
    

    Create DbCluster Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DbCluster(name: string, args: DbClusterArgs, opts?: CustomResourceOptions);
    @overload
    def DbCluster(resource_name: str,
                  args: DbClusterArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def DbCluster(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  cache_size: Optional[int] = None,
                  db_cluster_class: Optional[str] = None,
                  db_cluster_description: Optional[str] = None,
                  db_instance_id: Optional[str] = None,
                  payment_type: Optional[str] = None,
                  desired_params: Optional[Sequence[DbClusterDesiredParamArgs]] = None,
                  desired_status: Optional[str] = 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:selectdb:DbCluster
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var alicloudDbClusterResource = new AliCloud.SelectDB.DbCluster("alicloudDbClusterResource", new()
    {
        CacheSize = 0,
        DbClusterClass = "string",
        DbClusterDescription = "string",
        DbInstanceId = "string",
        PaymentType = "string",
        DesiredParams = new[]
        {
            new AliCloud.SelectDB.Inputs.DbClusterDesiredParamArgs
            {
                Name = "string",
                Value = "string",
            },
        },
        DesiredStatus = "string",
    });
    
    example, err := selectdb.NewDbCluster(ctx, "alicloudDbClusterResource", &selectdb.DbClusterArgs{
    	CacheSize:            pulumi.Int(0),
    	DbClusterClass:       pulumi.String("string"),
    	DbClusterDescription: pulumi.String("string"),
    	DbInstanceId:         pulumi.String("string"),
    	PaymentType:          pulumi.String("string"),
    	DesiredParams: selectdb.DbClusterDesiredParamArray{
    		&selectdb.DbClusterDesiredParamArgs{
    			Name:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	DesiredStatus: pulumi.String("string"),
    })
    
    var alicloudDbClusterResource = new DbCluster("alicloudDbClusterResource", DbClusterArgs.builder()
        .cacheSize(0)
        .dbClusterClass("string")
        .dbClusterDescription("string")
        .dbInstanceId("string")
        .paymentType("string")
        .desiredParams(DbClusterDesiredParamArgs.builder()
            .name("string")
            .value("string")
            .build())
        .desiredStatus("string")
        .build());
    
    alicloud_db_cluster_resource = alicloud.selectdb.DbCluster("alicloudDbClusterResource",
        cache_size=0,
        db_cluster_class="string",
        db_cluster_description="string",
        db_instance_id="string",
        payment_type="string",
        desired_params=[alicloud.selectdb.DbClusterDesiredParamArgs(
            name="string",
            value="string",
        )],
        desired_status="string")
    
    const alicloudDbClusterResource = new alicloud.selectdb.DbCluster("alicloudDbClusterResource", {
        cacheSize: 0,
        dbClusterClass: "string",
        dbClusterDescription: "string",
        dbInstanceId: "string",
        paymentType: "string",
        desiredParams: [{
            name: "string",
            value: "string",
        }],
        desiredStatus: "string",
    });
    
    type: alicloud:selectdb:DbCluster
    properties:
        cacheSize: 0
        dbClusterClass: string
        dbClusterDescription: string
        dbInstanceId: string
        desiredParams:
            - name: string
              value: string
        desiredStatus: string
        paymentType: string
    

    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:

    CacheSize int
    The desired cache size on creating cluster. The number should be divided by 100.
    DbClusterClass string
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    DbClusterDescription string
    The DBCluster description.
    DbInstanceId string
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    DesiredParams List<Pulumi.AliCloud.SelectDB.Inputs.DbClusterDesiredParam>
    The modified parameter in DBCluster. See desired_params below.
    DesiredStatus string
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    CacheSize int
    The desired cache size on creating cluster. The number should be divided by 100.
    DbClusterClass string
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    DbClusterDescription string
    The DBCluster description.
    DbInstanceId string
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    DesiredParams []DbClusterDesiredParamArgs
    The modified parameter in DBCluster. See desired_params below.
    DesiredStatus string
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    cacheSize Integer
    The desired cache size on creating cluster. The number should be divided by 100.
    dbClusterClass String
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    dbClusterDescription String
    The DBCluster description.
    dbInstanceId String
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    desiredParams List<DbClusterDesiredParam>
    The modified parameter in DBCluster. See desired_params below.
    desiredStatus String
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    cacheSize number
    The desired cache size on creating cluster. The number should be divided by 100.
    dbClusterClass string
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    dbClusterDescription string
    The DBCluster description.
    dbInstanceId string
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    paymentType string
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    desiredParams DbClusterDesiredParam[]
    The modified parameter in DBCluster. See desired_params below.
    desiredStatus string
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    cache_size int
    The desired cache size on creating cluster. The number should be divided by 100.
    db_cluster_class str
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    db_cluster_description str
    The DBCluster description.
    db_instance_id str
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    payment_type str
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    desired_params Sequence[DbClusterDesiredParamArgs]
    The modified parameter in DBCluster. See desired_params below.
    desired_status str
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    cacheSize Number
    The desired cache size on creating cluster. The number should be divided by 100.
    dbClusterClass String
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    dbClusterDescription String
    The DBCluster description.
    dbInstanceId String
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    desiredParams List<Property Map>
    The modified parameter in DBCluster. See desired_params below.
    desiredStatus String
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.

    Outputs

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

    Cpu int
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    CreateTime string
    The time when DBCluster is created.
    DbClusterId string
    The id of the cluster.
    Engine string
    The engine of DBCluster. Always selectdb.
    EngineVersion string
    The version of DBCluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    Memory int
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    ParamChangeLogs List<Pulumi.AliCloud.SelectDB.Outputs.DbClusterParamChangeLog>
    The details about parameter changelogs in DBCluster returned.
    RegionId string
    The ID of region for the cluster.
    Status string
    The current status of the resource.
    VpcId string
    The ID of the VPC for the cluster.
    ZoneId string
    The ID of zone for the cluster.
    Cpu int
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    CreateTime string
    The time when DBCluster is created.
    DbClusterId string
    The id of the cluster.
    Engine string
    The engine of DBCluster. Always selectdb.
    EngineVersion string
    The version of DBCluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    Memory int
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    ParamChangeLogs []DbClusterParamChangeLog
    The details about parameter changelogs in DBCluster returned.
    RegionId string
    The ID of region for the cluster.
    Status string
    The current status of the resource.
    VpcId string
    The ID of the VPC for the cluster.
    ZoneId string
    The ID of zone for the cluster.
    cpu Integer
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    createTime String
    The time when DBCluster is created.
    dbClusterId String
    The id of the cluster.
    engine String
    The engine of DBCluster. Always selectdb.
    engineVersion String
    The version of DBCluster.
    id String
    The provider-assigned unique ID for this managed resource.
    memory Integer
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    paramChangeLogs List<DbClusterParamChangeLog>
    The details about parameter changelogs in DBCluster returned.
    regionId String
    The ID of region for the cluster.
    status String
    The current status of the resource.
    vpcId String
    The ID of the VPC for the cluster.
    zoneId String
    The ID of zone for the cluster.
    cpu number
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    createTime string
    The time when DBCluster is created.
    dbClusterId string
    The id of the cluster.
    engine string
    The engine of DBCluster. Always selectdb.
    engineVersion string
    The version of DBCluster.
    id string
    The provider-assigned unique ID for this managed resource.
    memory number
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    paramChangeLogs DbClusterParamChangeLog[]
    The details about parameter changelogs in DBCluster returned.
    regionId string
    The ID of region for the cluster.
    status string
    The current status of the resource.
    vpcId string
    The ID of the VPC for the cluster.
    zoneId string
    The ID of zone for the cluster.
    cpu int
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    create_time str
    The time when DBCluster is created.
    db_cluster_id str
    The id of the cluster.
    engine str
    The engine of DBCluster. Always selectdb.
    engine_version str
    The version of DBCluster.
    id str
    The provider-assigned unique ID for this managed resource.
    memory int
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    param_change_logs Sequence[DbClusterParamChangeLog]
    The details about parameter changelogs in DBCluster returned.
    region_id str
    The ID of region for the cluster.
    status str
    The current status of the resource.
    vpc_id str
    The ID of the VPC for the cluster.
    zone_id str
    The ID of zone for the cluster.
    cpu Number
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    createTime String
    The time when DBCluster is created.
    dbClusterId String
    The id of the cluster.
    engine String
    The engine of DBCluster. Always selectdb.
    engineVersion String
    The version of DBCluster.
    id String
    The provider-assigned unique ID for this managed resource.
    memory Number
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    paramChangeLogs List<Property Map>
    The details about parameter changelogs in DBCluster returned.
    regionId String
    The ID of region for the cluster.
    status String
    The current status of the resource.
    vpcId String
    The ID of the VPC for the cluster.
    zoneId String
    The ID of zone for the cluster.

    Look up 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,
            cache_size: Optional[int] = None,
            cpu: Optional[int] = None,
            create_time: Optional[str] = None,
            db_cluster_class: Optional[str] = None,
            db_cluster_description: Optional[str] = None,
            db_cluster_id: Optional[str] = None,
            db_instance_id: Optional[str] = None,
            desired_params: Optional[Sequence[DbClusterDesiredParamArgs]] = None,
            desired_status: Optional[str] = None,
            engine: Optional[str] = None,
            engine_version: Optional[str] = None,
            memory: Optional[int] = None,
            param_change_logs: Optional[Sequence[DbClusterParamChangeLogArgs]] = None,
            payment_type: Optional[str] = None,
            region_id: Optional[str] = None,
            status: Optional[str] = None,
            vpc_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:
    CacheSize int
    The desired cache size on creating cluster. The number should be divided by 100.
    Cpu int
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    CreateTime string
    The time when DBCluster is created.
    DbClusterClass string
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    DbClusterDescription string
    The DBCluster description.
    DbClusterId string
    The id of the cluster.
    DbInstanceId string
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    DesiredParams List<Pulumi.AliCloud.SelectDB.Inputs.DbClusterDesiredParam>
    The modified parameter in DBCluster. See desired_params below.
    DesiredStatus string
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    Engine string
    The engine of DBCluster. Always selectdb.
    EngineVersion string
    The version of DBCluster.
    Memory int
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    ParamChangeLogs List<Pulumi.AliCloud.SelectDB.Inputs.DbClusterParamChangeLog>
    The details about parameter changelogs in DBCluster returned.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    RegionId string
    The ID of region for the cluster.
    Status string
    The current status of the resource.
    VpcId string
    The ID of the VPC for the cluster.
    ZoneId string
    The ID of zone for the cluster.
    CacheSize int
    The desired cache size on creating cluster. The number should be divided by 100.
    Cpu int
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    CreateTime string
    The time when DBCluster is created.
    DbClusterClass string
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    DbClusterDescription string
    The DBCluster description.
    DbClusterId string
    The id of the cluster.
    DbInstanceId string
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    DesiredParams []DbClusterDesiredParamArgs
    The modified parameter in DBCluster. See desired_params below.
    DesiredStatus string
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    Engine string
    The engine of DBCluster. Always selectdb.
    EngineVersion string
    The version of DBCluster.
    Memory int
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    ParamChangeLogs []DbClusterParamChangeLogArgs
    The details about parameter changelogs in DBCluster returned.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    RegionId string
    The ID of region for the cluster.
    Status string
    The current status of the resource.
    VpcId string
    The ID of the VPC for the cluster.
    ZoneId string
    The ID of zone for the cluster.
    cacheSize Integer
    The desired cache size on creating cluster. The number should be divided by 100.
    cpu Integer
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    createTime String
    The time when DBCluster is created.
    dbClusterClass String
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    dbClusterDescription String
    The DBCluster description.
    dbClusterId String
    The id of the cluster.
    dbInstanceId String
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    desiredParams List<DbClusterDesiredParam>
    The modified parameter in DBCluster. See desired_params below.
    desiredStatus String
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    engine String
    The engine of DBCluster. Always selectdb.
    engineVersion String
    The version of DBCluster.
    memory Integer
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    paramChangeLogs List<DbClusterParamChangeLog>
    The details about parameter changelogs in DBCluster returned.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    regionId String
    The ID of region for the cluster.
    status String
    The current status of the resource.
    vpcId String
    The ID of the VPC for the cluster.
    zoneId String
    The ID of zone for the cluster.
    cacheSize number
    The desired cache size on creating cluster. The number should be divided by 100.
    cpu number
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    createTime string
    The time when DBCluster is created.
    dbClusterClass string
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    dbClusterDescription string
    The DBCluster description.
    dbClusterId string
    The id of the cluster.
    dbInstanceId string
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    desiredParams DbClusterDesiredParam[]
    The modified parameter in DBCluster. See desired_params below.
    desiredStatus string
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    engine string
    The engine of DBCluster. Always selectdb.
    engineVersion string
    The version of DBCluster.
    memory number
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    paramChangeLogs DbClusterParamChangeLog[]
    The details about parameter changelogs in DBCluster returned.
    paymentType string
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    regionId string
    The ID of region for the cluster.
    status string
    The current status of the resource.
    vpcId string
    The ID of the VPC for the cluster.
    zoneId string
    The ID of zone for the cluster.
    cache_size int
    The desired cache size on creating cluster. The number should be divided by 100.
    cpu int
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    create_time str
    The time when DBCluster is created.
    db_cluster_class str
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    db_cluster_description str
    The DBCluster description.
    db_cluster_id str
    The id of the cluster.
    db_instance_id str
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    desired_params Sequence[DbClusterDesiredParamArgs]
    The modified parameter in DBCluster. See desired_params below.
    desired_status str
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    engine str
    The engine of DBCluster. Always selectdb.
    engine_version str
    The version of DBCluster.
    memory int
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    param_change_logs Sequence[DbClusterParamChangeLogArgs]
    The details about parameter changelogs in DBCluster returned.
    payment_type str
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    region_id str
    The ID of region for the cluster.
    status str
    The current status of the resource.
    vpc_id str
    The ID of the VPC for the cluster.
    zone_id str
    The ID of zone for the cluster.
    cacheSize Number
    The desired cache size on creating cluster. The number should be divided by 100.
    cpu Number
    The cpu resource amount of DBCluster. Depends on db_cluster_class.
    createTime String
    The time when DBCluster is created.
    dbClusterClass String
    The DBCluster class. db_cluster_class has a range of class from selectdb.xlarge to selectdb.256xlarge.
    dbClusterDescription String
    The DBCluster description.
    dbClusterId String
    The id of the cluster.
    dbInstanceId String
    The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
    desiredParams List<Property Map>
    The modified parameter in DBCluster. See desired_params below.
    desiredStatus String
    The desired status for the resource. Valid values: ACTIVATION,STOPPED,STARTING,RESTART.
    engine String
    The engine of DBCluster. Always selectdb.
    engineVersion String
    The version of DBCluster.
    memory Number
    The memory resource amount of DBCluster. Depends on db_cluster_class.
    paramChangeLogs List<Property Map>
    The details about parameter changelogs in DBCluster returned.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo,Subscription.
    regionId String
    The ID of region for the cluster.
    status String
    The current status of the resource.
    vpcId String
    The ID of the VPC for the cluster.
    zoneId String
    The ID of zone for the cluster.

    Supporting Types

    DbClusterDesiredParam, DbClusterDesiredParamArgs

    Name string
    Parameter name.
    Value string
    The new value of Parameter.
    Name string
    Parameter name.
    Value string
    The new value of Parameter.
    name String
    Parameter name.
    value String
    The new value of Parameter.
    name string
    Parameter name.
    value string
    The new value of Parameter.
    name str
    Parameter name.
    value str
    The new value of Parameter.
    name String
    Parameter name.
    value String
    The new value of Parameter.

    DbClusterParamChangeLog, DbClusterParamChangeLogArgs

    ConfigId int
    The id of parameter change.
    GmtCreated string
    When the parameter change is created.
    GmtModified string
    When the parameter change is modified.
    IsApplied bool
    Whether the parameter changing is applied.
    Name string
    Changed parameter name.
    NewValue string
    The new value of parameter.
    OldValue string
    The old value of parameter.
    ConfigId int
    The id of parameter change.
    GmtCreated string
    When the parameter change is created.
    GmtModified string
    When the parameter change is modified.
    IsApplied bool
    Whether the parameter changing is applied.
    Name string
    Changed parameter name.
    NewValue string
    The new value of parameter.
    OldValue string
    The old value of parameter.
    configId Integer
    The id of parameter change.
    gmtCreated String
    When the parameter change is created.
    gmtModified String
    When the parameter change is modified.
    isApplied Boolean
    Whether the parameter changing is applied.
    name String
    Changed parameter name.
    newValue String
    The new value of parameter.
    oldValue String
    The old value of parameter.
    configId number
    The id of parameter change.
    gmtCreated string
    When the parameter change is created.
    gmtModified string
    When the parameter change is modified.
    isApplied boolean
    Whether the parameter changing is applied.
    name string
    Changed parameter name.
    newValue string
    The new value of parameter.
    oldValue string
    The old value of parameter.
    config_id int
    The id of parameter change.
    gmt_created str
    When the parameter change is created.
    gmt_modified str
    When the parameter change is modified.
    is_applied bool
    Whether the parameter changing is applied.
    name str
    Changed parameter name.
    new_value str
    The new value of parameter.
    old_value str
    The old value of parameter.
    configId Number
    The id of parameter change.
    gmtCreated String
    When the parameter change is created.
    gmtModified String
    When the parameter change is modified.
    isApplied Boolean
    Whether the parameter changing is applied.
    name String
    Changed parameter name.
    newValue String
    The new value of parameter.
    oldValue String
    The old value of parameter.

    Import

    SelectDB DBCluster can be imported using the id, e.g.

    $ pulumi import alicloud:selectdb/dbCluster:DbCluster example <db_instance_id>:<db_cluster_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi