ucloud.DbInstance
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
// Create database instance
const master = new ucloud.DbInstance("master", {
availabilityZone: "cn-bj2-05",
engine: "mysql",
engineVersion: "5.7",
instanceStorage: 20,
instanceType: "mysql-ha-1",
password: "2018_dbInstance",
});
import pulumi
import pulumi_ucloud as ucloud
# Create database instance
master = ucloud.DbInstance("master",
availability_zone="cn-bj2-05",
engine="mysql",
engine_version="5.7",
instance_storage=20,
instance_type="mysql-ha-1",
password="2018_dbInstance")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create database instance
_, err := ucloud.NewDbInstance(ctx, "master", &ucloud.DbInstanceArgs{
AvailabilityZone: pulumi.String("cn-bj2-05"),
Engine: pulumi.String("mysql"),
EngineVersion: pulumi.String("5.7"),
InstanceStorage: pulumi.Float64(20),
InstanceType: pulumi.String("mysql-ha-1"),
Password: pulumi.String("2018_dbInstance"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
// Create database instance
var master = new Ucloud.DbInstance("master", new()
{
AvailabilityZone = "cn-bj2-05",
Engine = "mysql",
EngineVersion = "5.7",
InstanceStorage = 20,
InstanceType = "mysql-ha-1",
Password = "2018_dbInstance",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.DbInstance;
import com.pulumi.ucloud.DbInstanceArgs;
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) {
// Create database instance
var master = new DbInstance("master", DbInstanceArgs.builder()
.availabilityZone("cn-bj2-05")
.engine("mysql")
.engineVersion("5.7")
.instanceStorage(20)
.instanceType("mysql-ha-1")
.password("2018_dbInstance")
.build());
}
}
resources:
# Create database instance
master:
type: ucloud:DbInstance
properties:
availabilityZone: cn-bj2-05
engine: mysql
engineVersion: '5.7'
instanceStorage: 20
instanceType: mysql-ha-1
password: 2018_dbInstance
Create DbInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DbInstance(name: string, args: DbInstanceArgs, opts?: CustomResourceOptions);
@overload
def DbInstance(resource_name: str,
args: DbInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DbInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
engine: Optional[str] = None,
availability_zone: Optional[str] = None,
instance_type: Optional[str] = None,
instance_storage: Optional[float] = None,
engine_version: Optional[str] = None,
backup_date: Optional[str] = None,
name: Optional[str] = None,
db_instance_id: Optional[str] = None,
duration: Optional[float] = None,
allow_stopping_for_update: Optional[bool] = None,
backup_count: Optional[float] = None,
from_backup_id: Optional[float] = None,
backup_black_lists: Optional[Sequence[str]] = None,
backup_begin_time: Optional[float] = None,
charge_type: Optional[str] = None,
parameter_group: Optional[str] = None,
password: Optional[str] = None,
port: Optional[float] = None,
standby_zone: Optional[str] = None,
subnet_id: Optional[str] = None,
tag: Optional[str] = None,
timeouts: Optional[DbInstanceTimeoutsArgs] = None,
vpc_id: Optional[str] = None)
func NewDbInstance(ctx *Context, name string, args DbInstanceArgs, opts ...ResourceOption) (*DbInstance, error)
public DbInstance(string name, DbInstanceArgs args, CustomResourceOptions? opts = null)
public DbInstance(String name, DbInstanceArgs args)
public DbInstance(String name, DbInstanceArgs args, CustomResourceOptions options)
type: ucloud:DbInstance
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 DbInstanceArgs
- 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 DbInstanceArgs
- 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 DbInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DbInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DbInstanceArgs
- 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 dbInstanceResource = new Ucloud.DbInstance("dbInstanceResource", new()
{
Engine = "string",
AvailabilityZone = "string",
InstanceType = "string",
InstanceStorage = 0,
EngineVersion = "string",
BackupDate = "string",
Name = "string",
DbInstanceId = "string",
Duration = 0,
AllowStoppingForUpdate = false,
BackupCount = 0,
FromBackupId = 0,
BackupBlackLists = new[]
{
"string",
},
BackupBeginTime = 0,
ChargeType = "string",
ParameterGroup = "string",
Password = "string",
Port = 0,
StandbyZone = "string",
SubnetId = "string",
Tag = "string",
Timeouts = new Ucloud.Inputs.DbInstanceTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
VpcId = "string",
});
example, err := ucloud.NewDbInstance(ctx, "dbInstanceResource", &ucloud.DbInstanceArgs{
Engine: pulumi.String("string"),
AvailabilityZone: pulumi.String("string"),
InstanceType: pulumi.String("string"),
InstanceStorage: pulumi.Float64(0),
EngineVersion: pulumi.String("string"),
BackupDate: pulumi.String("string"),
Name: pulumi.String("string"),
DbInstanceId: pulumi.String("string"),
Duration: pulumi.Float64(0),
AllowStoppingForUpdate: pulumi.Bool(false),
BackupCount: pulumi.Float64(0),
FromBackupId: pulumi.Float64(0),
BackupBlackLists: pulumi.StringArray{
pulumi.String("string"),
},
BackupBeginTime: pulumi.Float64(0),
ChargeType: pulumi.String("string"),
ParameterGroup: pulumi.String("string"),
Password: pulumi.String("string"),
Port: pulumi.Float64(0),
StandbyZone: pulumi.String("string"),
SubnetId: pulumi.String("string"),
Tag: pulumi.String("string"),
Timeouts: &.DbInstanceTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
VpcId: pulumi.String("string"),
})
var dbInstanceResource = new DbInstance("dbInstanceResource", DbInstanceArgs.builder()
.engine("string")
.availabilityZone("string")
.instanceType("string")
.instanceStorage(0)
.engineVersion("string")
.backupDate("string")
.name("string")
.dbInstanceId("string")
.duration(0)
.allowStoppingForUpdate(false)
.backupCount(0)
.fromBackupId(0)
.backupBlackLists("string")
.backupBeginTime(0)
.chargeType("string")
.parameterGroup("string")
.password("string")
.port(0)
.standbyZone("string")
.subnetId("string")
.tag("string")
.timeouts(DbInstanceTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.vpcId("string")
.build());
db_instance_resource = ucloud.DbInstance("dbInstanceResource",
engine="string",
availability_zone="string",
instance_type="string",
instance_storage=0,
engine_version="string",
backup_date="string",
name="string",
db_instance_id="string",
duration=0,
allow_stopping_for_update=False,
backup_count=0,
from_backup_id=0,
backup_black_lists=["string"],
backup_begin_time=0,
charge_type="string",
parameter_group="string",
password="string",
port=0,
standby_zone="string",
subnet_id="string",
tag="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
vpc_id="string")
const dbInstanceResource = new ucloud.DbInstance("dbInstanceResource", {
engine: "string",
availabilityZone: "string",
instanceType: "string",
instanceStorage: 0,
engineVersion: "string",
backupDate: "string",
name: "string",
dbInstanceId: "string",
duration: 0,
allowStoppingForUpdate: false,
backupCount: 0,
fromBackupId: 0,
backupBlackLists: ["string"],
backupBeginTime: 0,
chargeType: "string",
parameterGroup: "string",
password: "string",
port: 0,
standbyZone: "string",
subnetId: "string",
tag: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
vpcId: "string",
});
type: ucloud:DbInstance
properties:
allowStoppingForUpdate: false
availabilityZone: string
backupBeginTime: 0
backupBlackLists:
- string
backupCount: 0
backupDate: string
chargeType: string
dbInstanceId: string
duration: 0
engine: string
engineVersion: string
fromBackupId: 0
instanceStorage: 0
instanceType: string
name: string
parameterGroup: string
password: string
port: 0
standbyZone: string
subnetId: string
tag: string
timeouts:
create: string
delete: string
update: string
vpcId: string
DbInstance 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 DbInstance resource accepts the following input properties:
- Availability
Zone string - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- Engine string
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- Engine
Version string - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- Instance
Storage double - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- Instance
Type string - The type of database instance, please visit the instance type table.
- Allow
Stopping boolFor Update - Backup
Begin doubleTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- Backup
Black List<string>Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- Backup
Count double - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- Backup
Date string - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- Charge
Type string - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - Db
Instance stringId - The ID of the resource db instance.
- Duration double
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - From
Backup doubleId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - Name string
- Parameter
Group string - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- Password string
- Port double
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- Standby
Zone string - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- Subnet
Id string - The ID of subnet.
- Tag string
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Timeouts
Db
Instance Timeouts - Vpc
Id string - The ID of VPC linked to the database instances.
- Availability
Zone string - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- Engine string
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- Engine
Version string - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- Instance
Storage float64 - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- Instance
Type string - The type of database instance, please visit the instance type table.
- Allow
Stopping boolFor Update - Backup
Begin float64Time - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- Backup
Black []stringLists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- Backup
Count float64 - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- Backup
Date string - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- Charge
Type string - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - Db
Instance stringId - The ID of the resource db instance.
- Duration float64
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - From
Backup float64Id - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - Name string
- Parameter
Group string - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- Password string
- Port float64
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- Standby
Zone string - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- Subnet
Id string - The ID of subnet.
- Tag string
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Timeouts
Db
Instance Timeouts Args - Vpc
Id string - The ID of VPC linked to the database instances.
- availability
Zone String - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- engine String
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine
Version String - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- instance
Storage Double - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance
Type String - The type of database instance, please visit the instance type table.
- allow
Stopping BooleanFor Update - backup
Begin DoubleTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup
Black List<String>Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup
Count Double - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup
Date String - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge
Type String - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - db
Instance StringId - The ID of the resource db instance.
- duration Double
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - from
Backup DoubleId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - name String
- parameter
Group String - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password String
- port Double
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- standby
Zone String - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- subnet
Id String - The ID of subnet.
- tag String
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts
Db
Instance Timeouts - vpc
Id String - The ID of VPC linked to the database instances.
- availability
Zone string - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- engine string
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine
Version string - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- instance
Storage number - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance
Type string - The type of database instance, please visit the instance type table.
- allow
Stopping booleanFor Update - backup
Begin numberTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup
Black string[]Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup
Count number - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup
Date string - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge
Type string - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - db
Instance stringId - The ID of the resource db instance.
- duration number
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - from
Backup numberId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - name string
- parameter
Group string - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password string
- port number
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- standby
Zone string - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- subnet
Id string - The ID of subnet.
- tag string
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts
Db
Instance Timeouts - vpc
Id string - The ID of VPC linked to the database instances.
- availability_
zone str - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- engine str
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine_
version str - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- instance_
storage float - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance_
type str - The type of database instance, please visit the instance type table.
- allow_
stopping_ boolfor_ update - backup_
begin_ floattime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup_
black_ Sequence[str]lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup_
count float - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup_
date str - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge_
type str - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - db_
instance_ strid - The ID of the resource db instance.
- duration float
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - from_
backup_ floatid - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - name str
- parameter_
group str - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password str
- port float
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- standby_
zone str - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- subnet_
id str - The ID of subnet.
- tag str
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts
Db
Instance Timeouts Args - vpc_
id str - The ID of VPC linked to the database instances.
- availability
Zone String - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- engine String
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine
Version String - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- instance
Storage Number - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance
Type String - The type of database instance, please visit the instance type table.
- allow
Stopping BooleanFor Update - backup
Begin NumberTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup
Black List<String>Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup
Count Number - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup
Date String - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge
Type String - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - db
Instance StringId - The ID of the resource db instance.
- duration Number
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - from
Backup NumberId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - name String
- parameter
Group String - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password String
- port Number
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- standby
Zone String - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- subnet
Id String - The ID of subnet.
- tag String
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts Property Map
- vpc
Id String - The ID of VPC linked to the database instances.
Outputs
All input properties are implicitly available as output properties. Additionally, the DbInstance resource produces the following output properties:
- Create
Time string - The creation time of database, formatted by RFC3339 time string.
- Expire
Time string - The expiration time of database, formatted by RFC3339 time string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modify
Time string - The modification time of database, formatted by RFC3339 time string.
- Private
Ip string - The private IP address assigned to the database instance.
- Status string
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
.
- Create
Time string - The creation time of database, formatted by RFC3339 time string.
- Expire
Time string - The expiration time of database, formatted by RFC3339 time string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modify
Time string - The modification time of database, formatted by RFC3339 time string.
- Private
Ip string - The private IP address assigned to the database instance.
- Status string
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
.
- create
Time String - The creation time of database, formatted by RFC3339 time string.
- expire
Time String - The expiration time of database, formatted by RFC3339 time string.
- id String
- The provider-assigned unique ID for this managed resource.
- modify
Time String - The modification time of database, formatted by RFC3339 time string.
- private
Ip String - The private IP address assigned to the database instance.
- status String
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
.
- create
Time string - The creation time of database, formatted by RFC3339 time string.
- expire
Time string - The expiration time of database, formatted by RFC3339 time string.
- id string
- The provider-assigned unique ID for this managed resource.
- modify
Time string - The modification time of database, formatted by RFC3339 time string.
- private
Ip string - The private IP address assigned to the database instance.
- status string
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
.
- create_
time str - The creation time of database, formatted by RFC3339 time string.
- expire_
time str - The expiration time of database, formatted by RFC3339 time string.
- id str
- The provider-assigned unique ID for this managed resource.
- modify_
time str - The modification time of database, formatted by RFC3339 time string.
- private_
ip str - The private IP address assigned to the database instance.
- status str
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
.
- create
Time String - The creation time of database, formatted by RFC3339 time string.
- expire
Time String - The expiration time of database, formatted by RFC3339 time string.
- id String
- The provider-assigned unique ID for this managed resource.
- modify
Time String - The modification time of database, formatted by RFC3339 time string.
- private
Ip String - The private IP address assigned to the database instance.
- status String
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
.
Look up Existing DbInstance Resource
Get an existing DbInstance 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?: DbInstanceState, opts?: CustomResourceOptions): DbInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_stopping_for_update: Optional[bool] = None,
availability_zone: Optional[str] = None,
backup_begin_time: Optional[float] = None,
backup_black_lists: Optional[Sequence[str]] = None,
backup_count: Optional[float] = None,
backup_date: Optional[str] = None,
charge_type: Optional[str] = None,
create_time: Optional[str] = None,
db_instance_id: Optional[str] = None,
duration: Optional[float] = None,
engine: Optional[str] = None,
engine_version: Optional[str] = None,
expire_time: Optional[str] = None,
from_backup_id: Optional[float] = None,
instance_storage: Optional[float] = None,
instance_type: Optional[str] = None,
modify_time: Optional[str] = None,
name: Optional[str] = None,
parameter_group: Optional[str] = None,
password: Optional[str] = None,
port: Optional[float] = None,
private_ip: Optional[str] = None,
standby_zone: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
tag: Optional[str] = None,
timeouts: Optional[DbInstanceTimeoutsArgs] = None,
vpc_id: Optional[str] = None) -> DbInstance
func GetDbInstance(ctx *Context, name string, id IDInput, state *DbInstanceState, opts ...ResourceOption) (*DbInstance, error)
public static DbInstance Get(string name, Input<string> id, DbInstanceState? state, CustomResourceOptions? opts = null)
public static DbInstance get(String name, Output<String> id, DbInstanceState state, CustomResourceOptions options)
resources: _: type: ucloud:DbInstance 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.
- Allow
Stopping boolFor Update - Availability
Zone string - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- Backup
Begin doubleTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- Backup
Black List<string>Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- Backup
Count double - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- Backup
Date string - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- Charge
Type string - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - Create
Time string - The creation time of database, formatted by RFC3339 time string.
- Db
Instance stringId - The ID of the resource db instance.
- Duration double
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - Engine string
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- Engine
Version string - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- Expire
Time string - The expiration time of database, formatted by RFC3339 time string.
- From
Backup doubleId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - Instance
Storage double - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- Instance
Type string - The type of database instance, please visit the instance type table.
- Modify
Time string - The modification time of database, formatted by RFC3339 time string.
- Name string
- Parameter
Group string - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- Password string
- Port double
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- Private
Ip string - The private IP address assigned to the database instance.
- Standby
Zone string - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- Status string
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
. - Subnet
Id string - The ID of subnet.
- Tag string
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Timeouts
Db
Instance Timeouts - Vpc
Id string - The ID of VPC linked to the database instances.
- Allow
Stopping boolFor Update - Availability
Zone string - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- Backup
Begin float64Time - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- Backup
Black []stringLists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- Backup
Count float64 - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- Backup
Date string - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- Charge
Type string - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - Create
Time string - The creation time of database, formatted by RFC3339 time string.
- Db
Instance stringId - The ID of the resource db instance.
- Duration float64
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - Engine string
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- Engine
Version string - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- Expire
Time string - The expiration time of database, formatted by RFC3339 time string.
- From
Backup float64Id - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - Instance
Storage float64 - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- Instance
Type string - The type of database instance, please visit the instance type table.
- Modify
Time string - The modification time of database, formatted by RFC3339 time string.
- Name string
- Parameter
Group string - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- Password string
- Port float64
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- Private
Ip string - The private IP address assigned to the database instance.
- Standby
Zone string - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- Status string
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
. - Subnet
Id string - The ID of subnet.
- Tag string
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Timeouts
Db
Instance Timeouts Args - Vpc
Id string - The ID of VPC linked to the database instances.
- allow
Stopping BooleanFor Update - availability
Zone String - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- backup
Begin DoubleTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup
Black List<String>Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup
Count Double - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup
Date String - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge
Type String - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - create
Time String - The creation time of database, formatted by RFC3339 time string.
- db
Instance StringId - The ID of the resource db instance.
- duration Double
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - engine String
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine
Version String - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- expire
Time String - The expiration time of database, formatted by RFC3339 time string.
- from
Backup DoubleId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - instance
Storage Double - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance
Type String - The type of database instance, please visit the instance type table.
- modify
Time String - The modification time of database, formatted by RFC3339 time string.
- name String
- parameter
Group String - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password String
- port Double
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- private
Ip String - The private IP address assigned to the database instance.
- standby
Zone String - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- status String
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
. - subnet
Id String - The ID of subnet.
- tag String
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts
Db
Instance Timeouts - vpc
Id String - The ID of VPC linked to the database instances.
- allow
Stopping booleanFor Update - availability
Zone string - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- backup
Begin numberTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup
Black string[]Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup
Count number - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup
Date string - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge
Type string - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - create
Time string - The creation time of database, formatted by RFC3339 time string.
- db
Instance stringId - The ID of the resource db instance.
- duration number
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - engine string
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine
Version string - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- expire
Time string - The expiration time of database, formatted by RFC3339 time string.
- from
Backup numberId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - instance
Storage number - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance
Type string - The type of database instance, please visit the instance type table.
- modify
Time string - The modification time of database, formatted by RFC3339 time string.
- name string
- parameter
Group string - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password string
- port number
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- private
Ip string - The private IP address assigned to the database instance.
- standby
Zone string - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- status string
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
. - subnet
Id string - The ID of subnet.
- tag string
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts
Db
Instance Timeouts - vpc
Id string - The ID of VPC linked to the database instances.
- allow_
stopping_ boolfor_ update - availability_
zone str - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- backup_
begin_ floattime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup_
black_ Sequence[str]lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup_
count float - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup_
date str - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge_
type str - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - create_
time str - The creation time of database, formatted by RFC3339 time string.
- db_
instance_ strid - The ID of the resource db instance.
- duration float
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - engine str
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine_
version str - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- expire_
time str - The expiration time of database, formatted by RFC3339 time string.
- from_
backup_ floatid - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - instance_
storage float - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance_
type str - The type of database instance, please visit the instance type table.
- modify_
time str - The modification time of database, formatted by RFC3339 time string.
- name str
- parameter_
group str - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password str
- port float
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- private_
ip str - The private IP address assigned to the database instance.
- standby_
zone str - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- status str
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
. - subnet_
id str - The ID of subnet.
- tag str
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts
Db
Instance Timeouts Args - vpc_
id str - The ID of VPC linked to the database instances.
- allow
Stopping BooleanFor Update - availability
Zone String - Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to list of availability zone
- backup
Begin NumberTime - Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
- backup
Black List<String>Lists - The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
- backup
Count Number - Specifies the number of backup saved per week, it is 7 backups saved per week by default.
- backup
Date String - Specifies whether the backup took place from Sunday to Saturday by displaying 7 digits. 0 stands for backup disabled and 1 stands for backup enabled. The rightmost digit specifies whether the backup took place on Sunday, and the digits from right to left specify whether the backup took place from Monday to Saturday, it's mandatory required to backup twice per week at least. such as: digits "1100000" stands for the backup took place on Saturday and Friday.
- charge
Type String - The charge type of db instance, possible values are:
year
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - create
Time String - The creation time of database, formatted by RFC3339 time string.
- db
Instance StringId - The ID of the resource db instance.
- duration Number
- The duration that you will buy the db instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - engine String
- The type of database engine, possible values are: "mysql", "percona", "postgresql".
- engine
Version String - The database engine version, possible values are: "5.5", "5.6", "5.7", "9.4", "9.6", "10.4".
- 5.5/5.6/5.7 for mysql and percona engine.
- 9.4/9.6/10.4 for postgresql engine.
- expire
Time String - The expiration time of database, formatted by RFC3339 time string.
- from
Backup NumberId - Create the database instance with the
content of specified backup. The backup id can be retrieved from UDB console
or by using the
ucloud.getDbBackups
datasource. - instance
Storage Number - Specifies the allocated storage size in gigabytes (GB), range from 20 to 32000GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for Highly Availability NVMe SSD is range 20 to 32000GB; The maximum disk volume for Highly Availability SATA SSD type are:
- 500GB if the memory chosen is equal or less than 6GB;
- 1000GB if the memory chosen is from 8 to 16GB;
- 2000GB if the memory chosen is 24GB or 32GB;
- 3500GB if the memory chosen is 48GB or 64GB;
- 4500GB if the memory chosen is equal or more than 96GB;
- instance
Type String - The type of database instance, please visit the instance type table.
- modify
Time String - The modification time of database, formatted by RFC3339 time string.
- name String
- parameter
Group String - The parameter group for database. If you not set, the default parameter group will be used. You can select one by the data source ucloud_db_parameter_groups.
- password String
- port Number
- The port on which the database accepts connections, the default port is 3306 for mysql and percona.
- private
Ip String - The private IP address assigned to the database instance.
- standby
Zone String - Availability zone where the standby database instance is located for the high availability database instance with multiple zone; The disaster recovery of data center can be activated by switching to the standby database instance for the high availability database instance.
- status String
- Specifies the status of database, possible values are:
Init
,Fail
,Starting
,Running
,Shutdown
,Shutoff
,Delete
,Upgrading
,Promoting
,Recovering
andRecover fail
. - subnet
Id String - The ID of subnet.
- tag String
- A tag assigned to database instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - timeouts Property Map
- vpc
Id String - The ID of VPC linked to the database instances.
Supporting Types
DbInstanceTimeouts, DbInstanceTimeoutsArgs
Import
DB Instance can be imported using the id
, e.g.
$ pulumi import ucloud:index/dbInstance:DbInstance example udbha-abc123456
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloud
Terraform Provider.