alicloud.polardb.ZonalDbCluster
Provides an PolarDB zonal cluster resource. An PolarDB zonal cluster is an isolated database environment in the cloud. An PolarDB zonal cluster can contain multiple user-created databases.
NOTE: Available since v1.66.0.
Example Usage
Create a PolarDB MySQL zonal cluster
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
// The advanced configuration for all nodes in the cluster except for the RW node, including db_node_class, hot_replica_mode, and imci_switch properties.
const dbClusterNodesConfigs = config.getObject<Record<string, {dbNodeClass?: string, dbNodeRole?: string, hotReplicaMode?: string, imciSwitch?: string}>>("dbClusterNodesConfigs") || {
db_node_1: {
dbNodeClass: "polar.mysql.x4.medium.c",
dbNodeRole: "Writer",
hotReplicaMode: null,
imciSwitch: null,
},
db_node_2: {
dbNodeClass: "polar.mysql.x4.medium.c",
dbNodeRole: "Reader",
hotReplicaMode: null,
imciSwitch: null,
},
};
const _default = new alicloud.ens.Network("default", {
networkName: "terraform-example",
description: "LoadBalancerNetworkDescription_test",
cidrBlock: "192.168.2.0/24",
ensRegionId: "tr-Istanbul-1",
});
const defaultVswitch = new alicloud.ens.Vswitch("default", {
description: "LoadBalancerVSwitchDescription_test",
cidrBlock: "192.168.2.0/24",
vswitchName: "terraform-example",
ensRegionId: "tr-Istanbul-1",
networkId: _default.id,
});
const defaultZonalDbCluster = new alicloud.polardb.ZonalDbCluster("default", {
dbNodeClass: "polar.mysql.x4.medium.c",
description: "terraform-example",
ensRegionId: "tr-Istanbul-1",
vpcId: _default.id,
vswitchId: defaultVswitch.id,
dbClusterNodesConfigs: Object.entries(dbClusterNodesConfigs).reduce((__obj, [node, config]) => ({ ...__obj, [node]: JSON.stringify(Object.entries(config).filter(([k, v]) => v != null).reduce((__obj, [k, v]) => ({ ...__obj, [k]: v }))) })),
});
import pulumi
import json
import pulumi_alicloud as alicloud
config = pulumi.Config()
# The advanced configuration for all nodes in the cluster except for the RW node, including db_node_class, hot_replica_mode, and imci_switch properties.
db_cluster_nodes_configs = config.get_object("dbClusterNodesConfigs")
if db_cluster_nodes_configs is None:
db_cluster_nodes_configs = {
"db_node_1": {
"dbNodeClass": "polar.mysql.x4.medium.c",
"dbNodeRole": "Writer",
"hotReplicaMode": None,
"imciSwitch": None,
},
"db_node_2": {
"dbNodeClass": "polar.mysql.x4.medium.c",
"dbNodeRole": "Reader",
"hotReplicaMode": None,
"imciSwitch": None,
},
}
default = alicloud.ens.Network("default",
network_name="terraform-example",
description="LoadBalancerNetworkDescription_test",
cidr_block="192.168.2.0/24",
ens_region_id="tr-Istanbul-1")
default_vswitch = alicloud.ens.Vswitch("default",
description="LoadBalancerVSwitchDescription_test",
cidr_block="192.168.2.0/24",
vswitch_name="terraform-example",
ens_region_id="tr-Istanbul-1",
network_id=default.id)
default_zonal_db_cluster = alicloud.polardb.ZonalDbCluster("default",
db_node_class="polar.mysql.x4.medium.c",
description="terraform-example",
ens_region_id="tr-Istanbul-1",
vpc_id=default.id,
vswitch_id=default_vswitch.id,
db_cluster_nodes_configs={node: json.dumps({k: v for k, v in config if v != None}) for node, config in db_cluster_nodes_configs})
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
// The advanced configuration for all nodes in the cluster except for the RW node, including db_node_class, hot_replica_mode, and imci_switch properties.
var dbClusterNodesConfigs = config.GetObject<Dictionary<string, DbClusterNodesConfigs>>("dbClusterNodesConfigs") ??
{
{ "db_node_1",
{
{ "dbNodeClass", "polar.mysql.x4.medium.c" },
{ "dbNodeRole", "Writer" },
{ "hotReplicaMode", null },
{ "imciSwitch", null },
} },
{ "db_node_2",
{
{ "dbNodeClass", "polar.mysql.x4.medium.c" },
{ "dbNodeRole", "Reader" },
{ "hotReplicaMode", null },
{ "imciSwitch", null },
} },
};
var @default = new AliCloud.Ens.Network("default", new()
{
NetworkName = "terraform-example",
Description = "LoadBalancerNetworkDescription_test",
CidrBlock = "192.168.2.0/24",
EnsRegionId = "tr-Istanbul-1",
});
var defaultVswitch = new AliCloud.Ens.Vswitch("default", new()
{
Description = "LoadBalancerVSwitchDescription_test",
CidrBlock = "192.168.2.0/24",
VswitchName = "terraform-example",
EnsRegionId = "tr-Istanbul-1",
NetworkId = @default.Id,
});
var defaultZonalDbCluster = new AliCloud.PolarDB.ZonalDbCluster("default", new()
{
DbNodeClass = "polar.mysql.x4.medium.c",
Description = "terraform-example",
EnsRegionId = "tr-Istanbul-1",
VpcId = @default.Id,
VswitchId = defaultVswitch.Id,
DbClusterNodesConfigs = dbClusterNodesConfigs.Select(pair => new { pair.Key, pair.Value }).ToDictionary(item => {
var node = item.Key;
return node;
}, item => {
var config = item.Value;
return JsonSerializer.Serialize(.ToDictionary(item => {
var k = item.Key;
return k;
}, item => {
var v = item.Value;
return v;
}));
}),
});
});
public class DbClusterNodesConfigs
{
public string dbNodeClass { get; set; }
public string dbNodeRole { get; set; }
public string hotReplicaMode { get; set; }
public string imciSwitch { get; set; }
}
Example coming soon!
Example coming soon!
Create ZonalDbCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZonalDbCluster(name: string, args: ZonalDbClusterArgs, opts?: CustomResourceOptions);@overload
def ZonalDbCluster(resource_name: str,
args: ZonalDbClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZonalDbCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_node_class: Optional[str] = None,
vswitch_id: Optional[str] = None,
vpc_id: Optional[str] = None,
db_cluster_nodes_configs: Optional[Mapping[str, str]] = None,
ens_region_id: Optional[str] = None,
description: Optional[str] = None,
db_type: Optional[str] = None,
db_version: Optional[str] = None,
auto_renew_period: Optional[int] = None,
db_minor_version: Optional[str] = None,
pay_type: Optional[str] = None,
renewal_status: Optional[str] = None,
storage_space: Optional[int] = None,
storage_type: Optional[str] = None,
target_minor_version: Optional[str] = None,
used_time: Optional[int] = None,
creation_category: Optional[str] = None,
cluster_version: Optional[str] = None)func NewZonalDbCluster(ctx *Context, name string, args ZonalDbClusterArgs, opts ...ResourceOption) (*ZonalDbCluster, error)public ZonalDbCluster(string name, ZonalDbClusterArgs args, CustomResourceOptions? opts = null)
public ZonalDbCluster(String name, ZonalDbClusterArgs args)
public ZonalDbCluster(String name, ZonalDbClusterArgs args, CustomResourceOptions options)
type: alicloud:polardb:ZonalDbCluster
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 ZonalDbClusterArgs
- 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 ZonalDbClusterArgs
- 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 ZonalDbClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZonalDbClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZonalDbClusterArgs
- 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 zonalDbClusterResource = new AliCloud.PolarDB.ZonalDbCluster("zonalDbClusterResource", new()
{
DbNodeClass = "string",
VswitchId = "string",
VpcId = "string",
DbClusterNodesConfigs =
{
{ "string", "string" },
},
EnsRegionId = "string",
Description = "string",
DbType = "string",
DbVersion = "string",
AutoRenewPeriod = 0,
DbMinorVersion = "string",
PayType = "string",
RenewalStatus = "string",
StorageSpace = 0,
StorageType = "string",
TargetMinorVersion = "string",
UsedTime = 0,
CreationCategory = "string",
ClusterVersion = "string",
});
example, err := polardb.NewZonalDbCluster(ctx, "zonalDbClusterResource", &polardb.ZonalDbClusterArgs{
DbNodeClass: pulumi.String("string"),
VswitchId: pulumi.String("string"),
VpcId: pulumi.String("string"),
DbClusterNodesConfigs: pulumi.StringMap{
"string": pulumi.String("string"),
},
EnsRegionId: pulumi.String("string"),
Description: pulumi.String("string"),
DbType: pulumi.String("string"),
DbVersion: pulumi.String("string"),
AutoRenewPeriod: pulumi.Int(0),
DbMinorVersion: pulumi.String("string"),
PayType: pulumi.String("string"),
RenewalStatus: pulumi.String("string"),
StorageSpace: pulumi.Int(0),
StorageType: pulumi.String("string"),
TargetMinorVersion: pulumi.String("string"),
UsedTime: pulumi.Int(0),
CreationCategory: pulumi.String("string"),
ClusterVersion: pulumi.String("string"),
})
var zonalDbClusterResource = new ZonalDbCluster("zonalDbClusterResource", ZonalDbClusterArgs.builder()
.dbNodeClass("string")
.vswitchId("string")
.vpcId("string")
.dbClusterNodesConfigs(Map.of("string", "string"))
.ensRegionId("string")
.description("string")
.dbType("string")
.dbVersion("string")
.autoRenewPeriod(0)
.dbMinorVersion("string")
.payType("string")
.renewalStatus("string")
.storageSpace(0)
.storageType("string")
.targetMinorVersion("string")
.usedTime(0)
.creationCategory("string")
.clusterVersion("string")
.build());
zonal_db_cluster_resource = alicloud.polardb.ZonalDbCluster("zonalDbClusterResource",
db_node_class="string",
vswitch_id="string",
vpc_id="string",
db_cluster_nodes_configs={
"string": "string",
},
ens_region_id="string",
description="string",
db_type="string",
db_version="string",
auto_renew_period=0,
db_minor_version="string",
pay_type="string",
renewal_status="string",
storage_space=0,
storage_type="string",
target_minor_version="string",
used_time=0,
creation_category="string",
cluster_version="string")
const zonalDbClusterResource = new alicloud.polardb.ZonalDbCluster("zonalDbClusterResource", {
dbNodeClass: "string",
vswitchId: "string",
vpcId: "string",
dbClusterNodesConfigs: {
string: "string",
},
ensRegionId: "string",
description: "string",
dbType: "string",
dbVersion: "string",
autoRenewPeriod: 0,
dbMinorVersion: "string",
payType: "string",
renewalStatus: "string",
storageSpace: 0,
storageType: "string",
targetMinorVersion: "string",
usedTime: 0,
creationCategory: "string",
clusterVersion: "string",
});
type: alicloud:polardb:ZonalDbCluster
properties:
autoRenewPeriod: 0
clusterVersion: string
creationCategory: string
dbClusterNodesConfigs:
string: string
dbMinorVersion: string
dbNodeClass: string
dbType: string
dbVersion: string
description: string
ensRegionId: string
payType: string
renewalStatus: string
storageSpace: 0
storageType: string
targetMinorVersion: string
usedTime: 0
vpcId: string
vswitchId: string
ZonalDbCluster Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ZonalDbCluster resource accepts the following input properties:
- Db
Cluster Dictionary<string, string>Nodes Configs - Map of node needs to be created after DB cluster was launched.
- Db
Node stringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- Ens
Region stringId - The Zone to launch the DB cluster.
- Vpc
Id string - The id of the ENS VPC.
- Vswitch
Id string - The ENS virtual switch ID to launch DB instances in one VPC.
- Auto
Renew intPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - Cluster
Version string - current DB Cluster revision Version.
- Creation
Category string - The edition of the PolarDB service. Valid values are
SENormal. - Db
Minor stringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - Db
Type string - Database type. Value options: MySQL, Oracle, PostgreSQL.
- Db
Version string - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - Description string
- The description of cluster.
- Pay
Type string - Valid values are
PrePaid,PostPaid, Default toPostPaid. - Renewal
Status string - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - Storage
Space int Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- Storage
Type string - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - Target
Minor stringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- Used
Time int The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.
- Db
Cluster map[string]stringNodes Configs - Map of node needs to be created after DB cluster was launched.
- Db
Node stringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- Ens
Region stringId - The Zone to launch the DB cluster.
- Vpc
Id string - The id of the ENS VPC.
- Vswitch
Id string - The ENS virtual switch ID to launch DB instances in one VPC.
- Auto
Renew intPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - Cluster
Version string - current DB Cluster revision Version.
- Creation
Category string - The edition of the PolarDB service. Valid values are
SENormal. - Db
Minor stringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - Db
Type string - Database type. Value options: MySQL, Oracle, PostgreSQL.
- Db
Version string - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - Description string
- The description of cluster.
- Pay
Type string - Valid values are
PrePaid,PostPaid, Default toPostPaid. - Renewal
Status string - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - Storage
Space int Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- Storage
Type string - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - Target
Minor stringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- Used
Time int The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.
- db
Cluster Map<String,String>Nodes Configs - Map of node needs to be created after DB cluster was launched.
- db
Node StringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- ens
Region StringId - The Zone to launch the DB cluster.
- vpc
Id String - The id of the ENS VPC.
- vswitch
Id String - The ENS virtual switch ID to launch DB instances in one VPC.
- auto
Renew IntegerPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster
Version String - current DB Cluster revision Version.
- creation
Category String - The edition of the PolarDB service. Valid values are
SENormal. - db
Minor StringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db
Type String - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db
Version String - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description String
- The description of cluster.
- pay
Type String - Valid values are
PrePaid,PostPaid, Default toPostPaid. - renewal
Status String - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage
Space Integer Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage
Type String - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target
Minor StringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used
Time Integer The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.
- db
Cluster {[key: string]: string}Nodes Configs - Map of node needs to be created after DB cluster was launched.
- db
Node stringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- ens
Region stringId - The Zone to launch the DB cluster.
- vpc
Id string - The id of the ENS VPC.
- vswitch
Id string - The ENS virtual switch ID to launch DB instances in one VPC.
- auto
Renew numberPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster
Version string - current DB Cluster revision Version.
- creation
Category string - The edition of the PolarDB service. Valid values are
SENormal. - db
Minor stringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db
Type string - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db
Version string - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description string
- The description of cluster.
- pay
Type string - Valid values are
PrePaid,PostPaid, Default toPostPaid. - renewal
Status string - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage
Space number Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage
Type string - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target
Minor stringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used
Time number The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.
- db_
cluster_ Mapping[str, str]nodes_ configs - Map of node needs to be created after DB cluster was launched.
- db_
node_ strclass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- ens_
region_ strid - The Zone to launch the DB cluster.
- vpc_
id str - The id of the ENS VPC.
- vswitch_
id str - The ENS virtual switch ID to launch DB instances in one VPC.
- auto_
renew_ intperiod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster_
version str - current DB Cluster revision Version.
- creation_
category str - The edition of the PolarDB service. Valid values are
SENormal. - db_
minor_ strversion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db_
type str - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db_
version str - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description str
- The description of cluster.
- pay_
type str - Valid values are
PrePaid,PostPaid, Default toPostPaid. - renewal_
status str - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage_
space int Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage_
type str - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target_
minor_ strversion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used_
time int The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.
- db
Cluster Map<String>Nodes Configs - Map of node needs to be created after DB cluster was launched.
- db
Node StringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- ens
Region StringId - The Zone to launch the DB cluster.
- vpc
Id String - The id of the ENS VPC.
- vswitch
Id String - The ENS virtual switch ID to launch DB instances in one VPC.
- auto
Renew NumberPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster
Version String - current DB Cluster revision Version.
- creation
Category String - The edition of the PolarDB service. Valid values are
SENormal. - db
Minor StringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db
Type String - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db
Version String - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description String
- The description of cluster.
- pay
Type String - Valid values are
PrePaid,PostPaid, Default toPostPaid. - renewal
Status String - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage
Space Number Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage
Type String - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target
Minor StringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used
Time Number The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZonalDbCluster resource produces the following output properties:
- Cluster
Latest stringVersion - PolarDB zonal cluster latest version.
- Create
Time string - PolarDB zonal cluster creation time.
- Db
Cluster Dictionary<string, string>Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- Db
Cluster Dictionary<string, string>Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - PolarDB zonal cluster region
- Storage
Pay stringType - The billing method of the storage. Valid values
Prepaid.
- Cluster
Latest stringVersion - PolarDB zonal cluster latest version.
- Create
Time string - PolarDB zonal cluster creation time.
- Db
Cluster map[string]stringNodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- Db
Cluster map[string]stringNodes Ids - Cache of node ID for PolarDB zonal Cluster
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - PolarDB zonal cluster region
- Storage
Pay stringType - The billing method of the storage. Valid values
Prepaid.
- cluster
Latest StringVersion - PolarDB zonal cluster latest version.
- create
Time String - PolarDB zonal cluster creation time.
- db
Cluster Map<String,String>Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db
Cluster Map<String,String>Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - PolarDB zonal cluster region
- storage
Pay StringType - The billing method of the storage. Valid values
Prepaid.
- cluster
Latest stringVersion - PolarDB zonal cluster latest version.
- create
Time string - PolarDB zonal cluster creation time.
- db
Cluster {[key: string]: string}Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db
Cluster {[key: string]: string}Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- id string
- The provider-assigned unique ID for this managed resource.
- region
Id string - PolarDB zonal cluster region
- storage
Pay stringType - The billing method of the storage. Valid values
Prepaid.
- cluster_
latest_ strversion - PolarDB zonal cluster latest version.
- create_
time str - PolarDB zonal cluster creation time.
- db_
cluster_ Mapping[str, str]nodes_ attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db_
cluster_ Mapping[str, str]nodes_ ids - Cache of node ID for PolarDB zonal Cluster
- id str
- The provider-assigned unique ID for this managed resource.
- region_
id str - PolarDB zonal cluster region
- storage_
pay_ strtype - The billing method of the storage. Valid values
Prepaid.
- cluster
Latest StringVersion - PolarDB zonal cluster latest version.
- create
Time String - PolarDB zonal cluster creation time.
- db
Cluster Map<String>Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db
Cluster Map<String>Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - PolarDB zonal cluster region
- storage
Pay StringType - The billing method of the storage. Valid values
Prepaid.
Look up Existing ZonalDbCluster Resource
Get an existing ZonalDbCluster 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?: ZonalDbClusterState, opts?: CustomResourceOptions): ZonalDbCluster@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_renew_period: Optional[int] = None,
cluster_latest_version: Optional[str] = None,
cluster_version: Optional[str] = None,
create_time: Optional[str] = None,
creation_category: Optional[str] = None,
db_cluster_nodes_attributes: Optional[Mapping[str, str]] = None,
db_cluster_nodes_configs: Optional[Mapping[str, str]] = None,
db_cluster_nodes_ids: Optional[Mapping[str, str]] = None,
db_minor_version: Optional[str] = None,
db_node_class: Optional[str] = None,
db_type: Optional[str] = None,
db_version: Optional[str] = None,
description: Optional[str] = None,
ens_region_id: Optional[str] = None,
pay_type: Optional[str] = None,
region_id: Optional[str] = None,
renewal_status: Optional[str] = None,
storage_pay_type: Optional[str] = None,
storage_space: Optional[int] = None,
storage_type: Optional[str] = None,
target_minor_version: Optional[str] = None,
used_time: Optional[int] = None,
vpc_id: Optional[str] = None,
vswitch_id: Optional[str] = None) -> ZonalDbClusterfunc GetZonalDbCluster(ctx *Context, name string, id IDInput, state *ZonalDbClusterState, opts ...ResourceOption) (*ZonalDbCluster, error)public static ZonalDbCluster Get(string name, Input<string> id, ZonalDbClusterState? state, CustomResourceOptions? opts = null)public static ZonalDbCluster get(String name, Output<String> id, ZonalDbClusterState state, CustomResourceOptions options)resources: _: type: alicloud:polardb:ZonalDbCluster get: id: ${id}- 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.
- Auto
Renew intPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - Cluster
Latest stringVersion - PolarDB zonal cluster latest version.
- Cluster
Version string - current DB Cluster revision Version.
- Create
Time string - PolarDB zonal cluster creation time.
- Creation
Category string - The edition of the PolarDB service. Valid values are
SENormal. - Db
Cluster Dictionary<string, string>Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- Db
Cluster Dictionary<string, string>Nodes Configs - Map of node needs to be created after DB cluster was launched.
- Db
Cluster Dictionary<string, string>Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- Db
Minor stringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - Db
Node stringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- Db
Type string - Database type. Value options: MySQL, Oracle, PostgreSQL.
- Db
Version string - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - Description string
- The description of cluster.
- Ens
Region stringId - The Zone to launch the DB cluster.
- Pay
Type string - Valid values are
PrePaid,PostPaid, Default toPostPaid. - Region
Id string - PolarDB zonal cluster region
- Renewal
Status string - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - Storage
Pay stringType - The billing method of the storage. Valid values
Prepaid. - Storage
Space int Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- Storage
Type string - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - Target
Minor stringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- Used
Time int The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.- Vpc
Id string - The id of the ENS VPC.
- Vswitch
Id string - The ENS virtual switch ID to launch DB instances in one VPC.
- Auto
Renew intPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - Cluster
Latest stringVersion - PolarDB zonal cluster latest version.
- Cluster
Version string - current DB Cluster revision Version.
- Create
Time string - PolarDB zonal cluster creation time.
- Creation
Category string - The edition of the PolarDB service. Valid values are
SENormal. - Db
Cluster map[string]stringNodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- Db
Cluster map[string]stringNodes Configs - Map of node needs to be created after DB cluster was launched.
- Db
Cluster map[string]stringNodes Ids - Cache of node ID for PolarDB zonal Cluster
- Db
Minor stringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - Db
Node stringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- Db
Type string - Database type. Value options: MySQL, Oracle, PostgreSQL.
- Db
Version string - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - Description string
- The description of cluster.
- Ens
Region stringId - The Zone to launch the DB cluster.
- Pay
Type string - Valid values are
PrePaid,PostPaid, Default toPostPaid. - Region
Id string - PolarDB zonal cluster region
- Renewal
Status string - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - Storage
Pay stringType - The billing method of the storage. Valid values
Prepaid. - Storage
Space int Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- Storage
Type string - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - Target
Minor stringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- Used
Time int The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.- Vpc
Id string - The id of the ENS VPC.
- Vswitch
Id string - The ENS virtual switch ID to launch DB instances in one VPC.
- auto
Renew IntegerPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster
Latest StringVersion - PolarDB zonal cluster latest version.
- cluster
Version String - current DB Cluster revision Version.
- create
Time String - PolarDB zonal cluster creation time.
- creation
Category String - The edition of the PolarDB service. Valid values are
SENormal. - db
Cluster Map<String,String>Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db
Cluster Map<String,String>Nodes Configs - Map of node needs to be created after DB cluster was launched.
- db
Cluster Map<String,String>Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- db
Minor StringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db
Node StringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- db
Type String - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db
Version String - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description String
- The description of cluster.
- ens
Region StringId - The Zone to launch the DB cluster.
- pay
Type String - Valid values are
PrePaid,PostPaid, Default toPostPaid. - region
Id String - PolarDB zonal cluster region
- renewal
Status String - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage
Pay StringType - The billing method of the storage. Valid values
Prepaid. - storage
Space Integer Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage
Type String - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target
Minor StringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used
Time Integer The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.- vpc
Id String - The id of the ENS VPC.
- vswitch
Id String - The ENS virtual switch ID to launch DB instances in one VPC.
- auto
Renew numberPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster
Latest stringVersion - PolarDB zonal cluster latest version.
- cluster
Version string - current DB Cluster revision Version.
- create
Time string - PolarDB zonal cluster creation time.
- creation
Category string - The edition of the PolarDB service. Valid values are
SENormal. - db
Cluster {[key: string]: string}Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db
Cluster {[key: string]: string}Nodes Configs - Map of node needs to be created after DB cluster was launched.
- db
Cluster {[key: string]: string}Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- db
Minor stringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db
Node stringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- db
Type string - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db
Version string - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description string
- The description of cluster.
- ens
Region stringId - The Zone to launch the DB cluster.
- pay
Type string - Valid values are
PrePaid,PostPaid, Default toPostPaid. - region
Id string - PolarDB zonal cluster region
- renewal
Status string - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage
Pay stringType - The billing method of the storage. Valid values
Prepaid. - storage
Space number Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage
Type string - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target
Minor stringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used
Time number The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.- vpc
Id string - The id of the ENS VPC.
- vswitch
Id string - The ENS virtual switch ID to launch DB instances in one VPC.
- auto_
renew_ intperiod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster_
latest_ strversion - PolarDB zonal cluster latest version.
- cluster_
version str - current DB Cluster revision Version.
- create_
time str - PolarDB zonal cluster creation time.
- creation_
category str - The edition of the PolarDB service. Valid values are
SENormal. - db_
cluster_ Mapping[str, str]nodes_ attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db_
cluster_ Mapping[str, str]nodes_ configs - Map of node needs to be created after DB cluster was launched.
- db_
cluster_ Mapping[str, str]nodes_ ids - Cache of node ID for PolarDB zonal Cluster
- db_
minor_ strversion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db_
node_ strclass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- db_
type str - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db_
version str - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description str
- The description of cluster.
- ens_
region_ strid - The Zone to launch the DB cluster.
- pay_
type str - Valid values are
PrePaid,PostPaid, Default toPostPaid. - region_
id str - PolarDB zonal cluster region
- renewal_
status str - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage_
pay_ strtype - The billing method of the storage. Valid values
Prepaid. - storage_
space int Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage_
type str - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target_
minor_ strversion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used_
time int The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.- vpc_
id str - The id of the ENS VPC.
- vswitch_
id str - The ENS virtual switch ID to launch DB instances in one VPC.
- auto
Renew NumberPeriod - Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1. - cluster
Latest StringVersion - PolarDB zonal cluster latest version.
- cluster
Version String - current DB Cluster revision Version.
- create
Time String - PolarDB zonal cluster creation time.
- creation
Category String - The edition of the PolarDB service. Valid values are
SENormal. - db
Cluster Map<String>Nodes Attributes - Cache of the relationship between node key and node ID for PolarDB zonal Cluster
- db
Cluster Map<String>Nodes Configs - Map of node needs to be created after DB cluster was launched.
- db
Cluster Map<String>Nodes Ids - Cache of node ID for PolarDB zonal Cluster
- db
Minor StringVersion - Database minor version. Value options can refer to the latest docs CreateDBCluster
DBMinorVersion. This parameter takes effect only whendb_typeis MySQL anddb_versionis 8.0. - db
Node StringClass - The db_node_class of cluster node.Only effective when the cluster is created for the first time. After the cluster is started, the cluster specification is maintained through the node class.
- db
Type String - Database type. Value options: MySQL, Oracle, PostgreSQL.
- db
Version String - Database version. Value options can refer to the latest docs CreateDBCluster
DBVersion. - description String
- The description of cluster.
- ens
Region StringId - The Zone to launch the DB cluster.
- pay
Type String - Valid values are
PrePaid,PostPaid, Default toPostPaid. - region
Id String - PolarDB zonal cluster region
- renewal
Status String - Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal. - storage
Pay StringType - The billing method of the storage. Valid values
Prepaid. - storage
Space Number Storage space charged by space (monthly package). Unit: GB.
NOTE: Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. It is valid when pay_type are
PrePaid,PostPaid.- storage
Type String - The storage type of the cluster. Valid values are
ESSDPL1,ESSDPL0. - target
Minor StringVersion - The Version Code of the target version, whose parameter values can be obtained from the DescribeDBClusterVersionZonal interface.
- used
Time Number The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36.NOTE: The attribute
periodis only used to create Subscription instance or modify the PayAsYouGo instance toPostPaid. Once effect, it will not be modified that means runningpulumi upwill not affect the resource.- vpc
Id String - The id of the ENS VPC.
- vswitch
Id String - The ENS virtual switch ID to launch DB instances in one VPC.
Import
PolarDB zonal cluster can be imported using the id, e.g.
$ pulumi import alicloud:polardb/zonalDbCluster:ZonalDbCluster example pc-abc12345678
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
alicloudTerraform Provider.
