alicloud.selectdb.DbCluster
Explore with Pulumi AI
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:
- Cache
Size int - The desired cache size on creating cluster. The number should be divided by 100.
- Db
Cluster stringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - Db
Cluster stringDescription - The DBCluster description.
- Db
Instance stringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- Payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - Desired
Params List<Pulumi.Ali Cloud. Select DB. Inputs. Db Cluster Desired Param> - The modified parameter in DBCluster. See
desired_params
below. - Desired
Status 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 stringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - Db
Cluster stringDescription - The DBCluster description.
- Db
Instance stringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- Payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - Desired
Params []DbCluster Desired Param Args - The modified parameter in DBCluster. See
desired_params
below. - Desired
Status string - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
.
- cache
Size Integer - The desired cache size on creating cluster. The number should be divided by 100.
- db
Cluster StringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db
Cluster StringDescription - The DBCluster description.
- db
Instance StringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- payment
Type String - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - desired
Params List<DbCluster Desired Param> - The modified parameter in DBCluster. See
desired_params
below. - desired
Status String - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
.
- cache
Size number - The desired cache size on creating cluster. The number should be divided by 100.
- db
Cluster stringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db
Cluster stringDescription - The DBCluster description.
- db
Instance stringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - desired
Params DbCluster Desired Param[] - The modified parameter in DBCluster. See
desired_params
below. - desired
Status 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_ strclass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db_
cluster_ strdescription - The DBCluster description.
- db_
instance_ strid - 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[DbCluster Desired Param Args] - The modified parameter in DBCluster. See
desired_params
below. - desired_
status str - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
.
- cache
Size Number - The desired cache size on creating cluster. The number should be divided by 100.
- db
Cluster StringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db
Cluster StringDescription - The DBCluster description.
- db
Instance StringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- payment
Type String - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - desired
Params List<Property Map> - The modified parameter in DBCluster. See
desired_params
below. - desired
Status 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
. - Create
Time string - The time when DBCluster is created.
- Db
Cluster stringId - The id of the cluster.
- Engine string
- The engine of DBCluster. Always
selectdb
. - Engine
Version 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
. - Param
Change List<Pulumi.Logs Ali Cloud. Select DB. Outputs. Db Cluster Param Change Log> - The details about parameter changelogs in DBCluster returned.
- Region
Id string - The ID of region for the cluster.
- Status string
- The current status of the resource.
- Vpc
Id string - The ID of the VPC for the cluster.
- Zone
Id string - The ID of zone for the cluster.
- Cpu int
- The cpu resource amount of DBCluster. Depends on
db_cluster_class
. - Create
Time string - The time when DBCluster is created.
- Db
Cluster stringId - The id of the cluster.
- Engine string
- The engine of DBCluster. Always
selectdb
. - Engine
Version 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
. - Param
Change []DbLogs Cluster Param Change Log - The details about parameter changelogs in DBCluster returned.
- Region
Id string - The ID of region for the cluster.
- Status string
- The current status of the resource.
- Vpc
Id string - The ID of the VPC for the cluster.
- Zone
Id string - The ID of zone for the cluster.
- cpu Integer
- The cpu resource amount of DBCluster. Depends on
db_cluster_class
. - create
Time String - The time when DBCluster is created.
- db
Cluster StringId - The id of the cluster.
- engine String
- The engine of DBCluster. Always
selectdb
. - engine
Version 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
. - param
Change List<DbLogs Cluster Param Change Log> - The details about parameter changelogs in DBCluster returned.
- region
Id String - The ID of region for the cluster.
- status String
- The current status of the resource.
- vpc
Id String - The ID of the VPC for the cluster.
- zone
Id String - The ID of zone for the cluster.
- cpu number
- The cpu resource amount of DBCluster. Depends on
db_cluster_class
. - create
Time string - The time when DBCluster is created.
- db
Cluster stringId - The id of the cluster.
- engine string
- The engine of DBCluster. Always
selectdb
. - engine
Version 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
. - param
Change DbLogs Cluster Param Change Log[] - The details about parameter changelogs in DBCluster returned.
- region
Id string - The ID of region for the cluster.
- status string
- The current status of the resource.
- vpc
Id string - The ID of the VPC for the cluster.
- zone
Id 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_ strid - 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_ Sequence[Dblogs Cluster Param Change Log] - 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
. - create
Time String - The time when DBCluster is created.
- db
Cluster StringId - The id of the cluster.
- engine String
- The engine of DBCluster. Always
selectdb
. - engine
Version 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
. - param
Change List<Property Map>Logs - The details about parameter changelogs in DBCluster returned.
- region
Id String - The ID of region for the cluster.
- status String
- The current status of the resource.
- vpc
Id String - The ID of the VPC for the cluster.
- zone
Id 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.
- 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 string - The time when DBCluster is created.
- Db
Cluster stringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - Db
Cluster stringDescription - The DBCluster description.
- Db
Cluster stringId - The id of the cluster.
- Db
Instance stringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- Desired
Params List<Pulumi.Ali Cloud. Select DB. Inputs. Db Cluster Desired Param> - The modified parameter in DBCluster. See
desired_params
below. - Desired
Status string - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
. - Engine string
- The engine of DBCluster. Always
selectdb
. - Engine
Version string - The version of DBCluster.
- Memory int
- The memory resource amount of DBCluster. Depends on
db_cluster_class
. - Param
Change List<Pulumi.Logs Ali Cloud. Select DB. Inputs. Db Cluster Param Change Log> - The details about parameter changelogs in DBCluster returned.
- Payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - Region
Id string - The ID of region for the cluster.
- Status string
- The current status of the resource.
- Vpc
Id string - The ID of the VPC for the cluster.
- Zone
Id 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 string - The time when DBCluster is created.
- Db
Cluster stringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - Db
Cluster stringDescription - The DBCluster description.
- Db
Cluster stringId - The id of the cluster.
- Db
Instance stringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- Desired
Params []DbCluster Desired Param Args - The modified parameter in DBCluster. See
desired_params
below. - Desired
Status string - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
. - Engine string
- The engine of DBCluster. Always
selectdb
. - Engine
Version string - The version of DBCluster.
- Memory int
- The memory resource amount of DBCluster. Depends on
db_cluster_class
. - Param
Change []DbLogs Cluster Param Change Log Args - The details about parameter changelogs in DBCluster returned.
- Payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - Region
Id string - The ID of region for the cluster.
- Status string
- The current status of the resource.
- Vpc
Id string - The ID of the VPC for the cluster.
- Zone
Id string - The ID of zone for the cluster.
- cache
Size 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
. - create
Time String - The time when DBCluster is created.
- db
Cluster StringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db
Cluster StringDescription - The DBCluster description.
- db
Cluster StringId - The id of the cluster.
- db
Instance StringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- desired
Params List<DbCluster Desired Param> - The modified parameter in DBCluster. See
desired_params
below. - desired
Status String - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
. - engine String
- The engine of DBCluster. Always
selectdb
. - engine
Version String - The version of DBCluster.
- memory Integer
- The memory resource amount of DBCluster. Depends on
db_cluster_class
. - param
Change List<DbLogs Cluster Param Change Log> - The details about parameter changelogs in DBCluster returned.
- payment
Type String - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - region
Id String - The ID of region for the cluster.
- status String
- The current status of the resource.
- vpc
Id String - The ID of the VPC for the cluster.
- zone
Id String - The ID of zone for the cluster.
- cache
Size 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
. - create
Time string - The time when DBCluster is created.
- db
Cluster stringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db
Cluster stringDescription - The DBCluster description.
- db
Cluster stringId - The id of the cluster.
- db
Instance stringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- desired
Params DbCluster Desired Param[] - The modified parameter in DBCluster. See
desired_params
below. - desired
Status string - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
. - engine string
- The engine of DBCluster. Always
selectdb
. - engine
Version string - The version of DBCluster.
- memory number
- The memory resource amount of DBCluster. Depends on
db_cluster_class
. - param
Change DbLogs Cluster Param Change Log[] - The details about parameter changelogs in DBCluster returned.
- payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - region
Id string - The ID of region for the cluster.
- status string
- The current status of the resource.
- vpc
Id string - The ID of the VPC for the cluster.
- zone
Id 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_ strclass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db_
cluster_ strdescription - The DBCluster description.
- db_
cluster_ strid - The id of the cluster.
- db_
instance_ strid - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- desired_
params Sequence[DbCluster Desired Param Args] - 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_ Sequence[Dblogs Cluster Param Change Log Args] - 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.
- cache
Size 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
. - create
Time String - The time when DBCluster is created.
- db
Cluster StringClass - The DBCluster class. db_cluster_class has a range of class from
selectdb.xlarge
toselectdb.256xlarge
. - db
Cluster StringDescription - The DBCluster description.
- db
Cluster StringId - The id of the cluster.
- db
Instance StringId - The InstanceId of DBInstance for DBCluster. Every DBCluster requires one DBInstance to rely on.
- desired
Params List<Property Map> - The modified parameter in DBCluster. See
desired_params
below. - desired
Status String - The desired status for the resource. Valid values:
ACTIVATION
,STOPPED
,STARTING
,RESTART
. - engine String
- The engine of DBCluster. Always
selectdb
. - engine
Version String - The version of DBCluster.
- memory Number
- The memory resource amount of DBCluster. Depends on
db_cluster_class
. - param
Change List<Property Map>Logs - The details about parameter changelogs in DBCluster returned.
- payment
Type String - The payment type of the resource. Valid values:
PayAsYouGo
,Subscription
. - region
Id String - The ID of region for the cluster.
- status String
- The current status of the resource.
- vpc
Id String - The ID of the VPC for the cluster.
- zone
Id String - The ID of zone for the cluster.
Supporting Types
DbClusterDesiredParam, DbClusterDesiredParamArgs
DbClusterParamChangeLog, DbClusterParamChangeLogArgs
- Config
Id int - The id of parameter change.
- Gmt
Created string - When the parameter change is created.
- Gmt
Modified string - When the parameter change is modified.
- Is
Applied bool - Whether the parameter changing is applied.
- Name string
- Changed parameter name.
- New
Value string - The new value of parameter.
- Old
Value string - The old value of parameter.
- Config
Id int - The id of parameter change.
- Gmt
Created string - When the parameter change is created.
- Gmt
Modified string - When the parameter change is modified.
- Is
Applied bool - Whether the parameter changing is applied.
- Name string
- Changed parameter name.
- New
Value string - The new value of parameter.
- Old
Value string - The old value of parameter.
- config
Id Integer - The id of parameter change.
- gmt
Created String - When the parameter change is created.
- gmt
Modified String - When the parameter change is modified.
- is
Applied Boolean - Whether the parameter changing is applied.
- name String
- Changed parameter name.
- new
Value String - The new value of parameter.
- old
Value String - The old value of parameter.
- config
Id number - The id of parameter change.
- gmt
Created string - When the parameter change is created.
- gmt
Modified string - When the parameter change is modified.
- is
Applied boolean - Whether the parameter changing is applied.
- name string
- Changed parameter name.
- new
Value string - The new value of parameter.
- old
Value 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.
- config
Id Number - The id of parameter change.
- gmt
Created String - When the parameter change is created.
- gmt
Modified String - When the parameter change is modified.
- is
Applied Boolean - Whether the parameter changing is applied.
- name String
- Changed parameter name.
- new
Value String - The new value of parameter.
- old
Value 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.