udb

package
v0.0.0-...-4e6c764 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBInstance

type DBInstance struct {
	pulumi.CustomResourceState

	AllowStoppingForUpdate pulumi.BoolPtrOutput `pulumi:"allowStoppingForUpdate"`
	// Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)
	AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
	// Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
	BackupBeginTime pulumi.IntOutput `pulumi:"backupBeginTime"`
	// The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
	BackupBlackLists pulumi.StringArrayOutput `pulumi:"backupBlackLists"`
	// Specifies the number of backup saved per week, it is 7 backups saved per week by default.
	BackupCount pulumi.IntPtrOutput `pulumi:"backupCount"`
	// 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.
	BackupDate pulumi.StringOutput `pulumi:"backupDate"`
	// The charge type of db instance, possible values are: `year`, `month` and `dynamic` as pay by hour (specific permission required). (Default: `month`).
	ChargeType pulumi.StringOutput `pulumi:"chargeType"`
	// The creation time of database, formatted by RFC3339 time string.
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// The duration that you will buy the db instance (Default: `1`). The value is `0` when pay by month and the instance will be vaild till the last day of that month. It is not required when `dynamic` (pay by hour).
	Duration pulumi.IntPtrOutput `pulumi:"duration"`
	// The type of database engine, possible values are: "mysql", "percona".
	Engine pulumi.StringOutput `pulumi:"engine"`
	// The database engine version, possible values are: "5.5", "5.6", "5.7".
	// - 5.5/5.6/5.7 for mysql and percona engine.
	EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
	// The expiration time of database, formatted by RFC3339 time string.
	ExpireTime pulumi.StringOutput `pulumi:"expireTime"`
	// Specifies the allocated storage size in gigabytes (GB), range from 20 to 4500GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for 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;
	InstanceStorage pulumi.IntOutput    `pulumi:"instanceStorage"`
	InstanceType    pulumi.StringOutput `pulumi:"instanceType"`
	// The modification time of database, formatted by RFC3339 time string.
	ModifyTime     pulumi.StringOutput `pulumi:"modifyTime"`
	Name           pulumi.StringOutput `pulumi:"name"`
	ParameterGroup pulumi.StringOutput `pulumi:"parameterGroup"`
	Password       pulumi.StringOutput `pulumi:"password"`
	// The port on which the database accepts connections, the default port is 3306 for mysql and percona.
	Port pulumi.IntOutput `pulumi:"port"`
	// The private IP address assigned to the database instance.
	PrivateIp pulumi.StringOutput `pulumi:"privateIp"`
	// 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.
	StandbyZone pulumi.StringPtrOutput `pulumi:"standbyZone"`
	// Specifies the status of database, possible values are: `Init`, `Fail`, `Starting`, `Running`, `Shutdown`, `Shutoff`, `Delete`, `Upgrading`, `Promoting`, `Recovering` and `Recover fail`.
	Status pulumi.StringOutput `pulumi:"status"`
	// The ID of subnet.
	SubnetId pulumi.StringOutput `pulumi:"subnetId"`
	// 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`).
	Tag pulumi.StringOutput `pulumi:"tag"`
	// The ID of VPC linked to the database instances.
	VpcId pulumi.StringOutput `pulumi:"vpcId"`
}

## Import

DB Instance can be imported using the `id`, e.g.

```sh

$ pulumi import ucloud:udb/dBInstance:DBInstance example udbha-abc123456

```

func GetDBInstance

func GetDBInstance(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DBInstanceState, opts ...pulumi.ResourceOption) (*DBInstance, error)

GetDBInstance gets an existing DBInstance resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDBInstance

func NewDBInstance(ctx *pulumi.Context,
	name string, args *DBInstanceArgs, opts ...pulumi.ResourceOption) (*DBInstance, error)

NewDBInstance registers a new resource with the given unique name, arguments, and options.

func (*DBInstance) ElementType

func (*DBInstance) ElementType() reflect.Type

func (*DBInstance) ToDBInstanceOutput

func (i *DBInstance) ToDBInstanceOutput() DBInstanceOutput

func (*DBInstance) ToDBInstanceOutputWithContext

func (i *DBInstance) ToDBInstanceOutputWithContext(ctx context.Context) DBInstanceOutput

func (*DBInstance) ToDBInstancePtrOutput

func (i *DBInstance) ToDBInstancePtrOutput() DBInstancePtrOutput

func (*DBInstance) ToDBInstancePtrOutputWithContext

func (i *DBInstance) ToDBInstancePtrOutputWithContext(ctx context.Context) DBInstancePtrOutput

type DBInstanceArgs

type DBInstanceArgs struct {
	AllowStoppingForUpdate pulumi.BoolPtrInput
	// Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)
	AvailabilityZone pulumi.StringInput
	// Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
	BackupBeginTime pulumi.IntPtrInput
	// The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
	BackupBlackLists pulumi.StringArrayInput
	// Specifies the number of backup saved per week, it is 7 backups saved per week by default.
	BackupCount pulumi.IntPtrInput
	// 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.
	BackupDate pulumi.StringPtrInput
	// The charge type of db instance, possible values are: `year`, `month` and `dynamic` as pay by hour (specific permission required). (Default: `month`).
	ChargeType pulumi.StringPtrInput
	// The duration that you will buy the db instance (Default: `1`). The value is `0` when pay by month and the instance will be vaild till the last day of that month. It is not required when `dynamic` (pay by hour).
	Duration pulumi.IntPtrInput
	// The type of database engine, possible values are: "mysql", "percona".
	Engine pulumi.StringInput
	// The database engine version, possible values are: "5.5", "5.6", "5.7".
	// - 5.5/5.6/5.7 for mysql and percona engine.
	EngineVersion pulumi.StringInput
	// Specifies the allocated storage size in gigabytes (GB), range from 20 to 4500GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for 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;
	InstanceStorage pulumi.IntInput
	InstanceType    pulumi.StringInput
	Name            pulumi.StringPtrInput
	ParameterGroup  pulumi.StringPtrInput
	Password        pulumi.StringPtrInput
	// The port on which the database accepts connections, the default port is 3306 for mysql and percona.
	Port pulumi.IntPtrInput
	// 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.
	StandbyZone pulumi.StringPtrInput
	// The ID of subnet.
	SubnetId pulumi.StringPtrInput
	// 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`).
	Tag pulumi.StringPtrInput
	// The ID of VPC linked to the database instances.
	VpcId pulumi.StringPtrInput
}

The set of arguments for constructing a DBInstance resource.

func (DBInstanceArgs) ElementType

func (DBInstanceArgs) ElementType() reflect.Type

type DBInstanceArray

type DBInstanceArray []DBInstanceInput

func (DBInstanceArray) ElementType

func (DBInstanceArray) ElementType() reflect.Type

func (DBInstanceArray) ToDBInstanceArrayOutput

func (i DBInstanceArray) ToDBInstanceArrayOutput() DBInstanceArrayOutput

func (DBInstanceArray) ToDBInstanceArrayOutputWithContext

func (i DBInstanceArray) ToDBInstanceArrayOutputWithContext(ctx context.Context) DBInstanceArrayOutput

type DBInstanceArrayInput

type DBInstanceArrayInput interface {
	pulumi.Input

	ToDBInstanceArrayOutput() DBInstanceArrayOutput
	ToDBInstanceArrayOutputWithContext(context.Context) DBInstanceArrayOutput
}

DBInstanceArrayInput is an input type that accepts DBInstanceArray and DBInstanceArrayOutput values. You can construct a concrete instance of `DBInstanceArrayInput` via:

DBInstanceArray{ DBInstanceArgs{...} }

type DBInstanceArrayOutput

type DBInstanceArrayOutput struct{ *pulumi.OutputState }

func (DBInstanceArrayOutput) ElementType

func (DBInstanceArrayOutput) ElementType() reflect.Type

func (DBInstanceArrayOutput) Index

func (DBInstanceArrayOutput) ToDBInstanceArrayOutput

func (o DBInstanceArrayOutput) ToDBInstanceArrayOutput() DBInstanceArrayOutput

func (DBInstanceArrayOutput) ToDBInstanceArrayOutputWithContext

func (o DBInstanceArrayOutput) ToDBInstanceArrayOutputWithContext(ctx context.Context) DBInstanceArrayOutput

type DBInstanceInput

type DBInstanceInput interface {
	pulumi.Input

	ToDBInstanceOutput() DBInstanceOutput
	ToDBInstanceOutputWithContext(ctx context.Context) DBInstanceOutput
}

type DBInstanceMap

type DBInstanceMap map[string]DBInstanceInput

func (DBInstanceMap) ElementType

func (DBInstanceMap) ElementType() reflect.Type

func (DBInstanceMap) ToDBInstanceMapOutput

func (i DBInstanceMap) ToDBInstanceMapOutput() DBInstanceMapOutput

func (DBInstanceMap) ToDBInstanceMapOutputWithContext

func (i DBInstanceMap) ToDBInstanceMapOutputWithContext(ctx context.Context) DBInstanceMapOutput

type DBInstanceMapInput

type DBInstanceMapInput interface {
	pulumi.Input

	ToDBInstanceMapOutput() DBInstanceMapOutput
	ToDBInstanceMapOutputWithContext(context.Context) DBInstanceMapOutput
}

DBInstanceMapInput is an input type that accepts DBInstanceMap and DBInstanceMapOutput values. You can construct a concrete instance of `DBInstanceMapInput` via:

DBInstanceMap{ "key": DBInstanceArgs{...} }

type DBInstanceMapOutput

type DBInstanceMapOutput struct{ *pulumi.OutputState }

func (DBInstanceMapOutput) ElementType

func (DBInstanceMapOutput) ElementType() reflect.Type

func (DBInstanceMapOutput) MapIndex

func (DBInstanceMapOutput) ToDBInstanceMapOutput

func (o DBInstanceMapOutput) ToDBInstanceMapOutput() DBInstanceMapOutput

func (DBInstanceMapOutput) ToDBInstanceMapOutputWithContext

func (o DBInstanceMapOutput) ToDBInstanceMapOutputWithContext(ctx context.Context) DBInstanceMapOutput

type DBInstanceOutput

type DBInstanceOutput struct {
	*pulumi.OutputState
}

func (DBInstanceOutput) ElementType

func (DBInstanceOutput) ElementType() reflect.Type

func (DBInstanceOutput) ToDBInstanceOutput

func (o DBInstanceOutput) ToDBInstanceOutput() DBInstanceOutput

func (DBInstanceOutput) ToDBInstanceOutputWithContext

func (o DBInstanceOutput) ToDBInstanceOutputWithContext(ctx context.Context) DBInstanceOutput

func (DBInstanceOutput) ToDBInstancePtrOutput

func (o DBInstanceOutput) ToDBInstancePtrOutput() DBInstancePtrOutput

func (DBInstanceOutput) ToDBInstancePtrOutputWithContext

func (o DBInstanceOutput) ToDBInstancePtrOutputWithContext(ctx context.Context) DBInstancePtrOutput

type DBInstancePtrInput

type DBInstancePtrInput interface {
	pulumi.Input

	ToDBInstancePtrOutput() DBInstancePtrOutput
	ToDBInstancePtrOutputWithContext(ctx context.Context) DBInstancePtrOutput
}

type DBInstancePtrOutput

type DBInstancePtrOutput struct {
	*pulumi.OutputState
}

func (DBInstancePtrOutput) ElementType

func (DBInstancePtrOutput) ElementType() reflect.Type

func (DBInstancePtrOutput) ToDBInstancePtrOutput

func (o DBInstancePtrOutput) ToDBInstancePtrOutput() DBInstancePtrOutput

func (DBInstancePtrOutput) ToDBInstancePtrOutputWithContext

func (o DBInstancePtrOutput) ToDBInstancePtrOutputWithContext(ctx context.Context) DBInstancePtrOutput

type DBInstanceState

type DBInstanceState struct {
	AllowStoppingForUpdate pulumi.BoolPtrInput
	// Availability zone where database instance is located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)
	AvailabilityZone pulumi.StringPtrInput
	// Specifies when the backup starts, measured in hour, it starts at one o'clock of 1, 2, 3, 4 in the morning by default.
	BackupBeginTime pulumi.IntPtrInput
	// The backup for database such as "test.%" or table such as "city.address" specified in the black lists are not supported.
	BackupBlackLists pulumi.StringArrayInput
	// Specifies the number of backup saved per week, it is 7 backups saved per week by default.
	BackupCount pulumi.IntPtrInput
	// 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.
	BackupDate pulumi.StringPtrInput
	// The charge type of db instance, possible values are: `year`, `month` and `dynamic` as pay by hour (specific permission required). (Default: `month`).
	ChargeType pulumi.StringPtrInput
	// The creation time of database, formatted by RFC3339 time string.
	CreateTime pulumi.StringPtrInput
	// The duration that you will buy the db instance (Default: `1`). The value is `0` when pay by month and the instance will be vaild till the last day of that month. It is not required when `dynamic` (pay by hour).
	Duration pulumi.IntPtrInput
	// The type of database engine, possible values are: "mysql", "percona".
	Engine pulumi.StringPtrInput
	// The database engine version, possible values are: "5.5", "5.6", "5.7".
	// - 5.5/5.6/5.7 for mysql and percona engine.
	EngineVersion pulumi.StringPtrInput
	// The expiration time of database, formatted by RFC3339 time string.
	ExpireTime pulumi.StringPtrInput
	// Specifies the allocated storage size in gigabytes (GB), range from 20 to 4500GB. The volume adjustment must be a multiple of 10 GB. The maximum disk volume for 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;
	InstanceStorage pulumi.IntPtrInput
	InstanceType    pulumi.StringPtrInput
	// The modification time of database, formatted by RFC3339 time string.
	ModifyTime     pulumi.StringPtrInput
	Name           pulumi.StringPtrInput
	ParameterGroup pulumi.StringPtrInput
	Password       pulumi.StringPtrInput
	// The port on which the database accepts connections, the default port is 3306 for mysql and percona.
	Port pulumi.IntPtrInput
	// The private IP address assigned to the database instance.
	PrivateIp pulumi.StringPtrInput
	// 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.
	StandbyZone pulumi.StringPtrInput
	// Specifies the status of database, possible values are: `Init`, `Fail`, `Starting`, `Running`, `Shutdown`, `Shutoff`, `Delete`, `Upgrading`, `Promoting`, `Recovering` and `Recover fail`.
	Status pulumi.StringPtrInput
	// The ID of subnet.
	SubnetId pulumi.StringPtrInput
	// 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`).
	Tag pulumi.StringPtrInput
	// The ID of VPC linked to the database instances.
	VpcId pulumi.StringPtrInput
}

func (DBInstanceState) ElementType

func (DBInstanceState) ElementType() reflect.Type

type GetDBInstanceDbInstance

type GetDBInstanceDbInstance struct {
	// Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)
	AvailabilityZone string `pulumi:"availabilityZone"`
	// Specifies when the backup starts, measured in hour.
	BackupBeginTime int `pulumi:"backupBeginTime"`
	// The backup for database instance such as "test.%" or table such as "city.address" specified in the black lists are not supported.
	BackupBlackLists []string `pulumi:"backupBlackLists"`
	// Specifies the number of backup saved per week.
	BackupCount int `pulumi:"backupCount"`
	// 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.
	BackupDate string `pulumi:"backupDate"`
	// The charge type of db instance.
	ChargeType string `pulumi:"chargeType"`
	// The creation time of database instance , formatted by RFC3339 time string.
	CreateTime string `pulumi:"createTime"`
	// The type of database instance engine.
	Engine string `pulumi:"engine"`
	// The database instance engine version.
	EngineVersion string `pulumi:"engineVersion"`
	// The expiration time of database instance , formatted by RFC3339 time string.
	ExpireTime string `pulumi:"expireTime"`
	// The ID of database instance.
	Id string `pulumi:"id"`
	// Specifies the allocated storage size in gigabytes (GB).
	InstanceStorage int `pulumi:"instanceStorage"`
	// Specifies the type of database instance.
	InstanceType string `pulumi:"instanceType"`
	// The modification time of database instance , formatted by RFC3339 time string.
	ModifyTime string `pulumi:"modifyTime"`
	// The name of database instance.
	Name string `pulumi:"name"`
	// The port on which the database instance accepts connections.
	Port int `pulumi:"port"`
	// The private IP address assigned to the database instance.
	PrivateIp string `pulumi:"privateIp"`
	// Availability zone where the standby database instance is located for the high availability database instance with multiple zone.
	StandbyZone string `pulumi:"standbyZone"`
	// Specifies the status of database instance , possible values are: `Init`, `Fail`, `Starting`, `Running`, `Shutdown`, `Shutoff`, `Delete`, `Upgrading`, `Promoting`, `Recovering` and `Recover fail`.
	Status string `pulumi:"status"`
	// The ID of subnet linked to the database instances.
	SubnetId string `pulumi:"subnetId"`
	// A tag assigned to database instance.
	Tag string `pulumi:"tag"`
	// The ID of VPC linked to the database instances.
	VpcId string `pulumi:"vpcId"`
}

type GetDBInstanceDbInstanceArgs

type GetDBInstanceDbInstanceArgs struct {
	// Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)
	AvailabilityZone pulumi.StringInput `pulumi:"availabilityZone"`
	// Specifies when the backup starts, measured in hour.
	BackupBeginTime pulumi.IntInput `pulumi:"backupBeginTime"`
	// The backup for database instance such as "test.%" or table such as "city.address" specified in the black lists are not supported.
	BackupBlackLists pulumi.StringArrayInput `pulumi:"backupBlackLists"`
	// Specifies the number of backup saved per week.
	BackupCount pulumi.IntInput `pulumi:"backupCount"`
	// 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.
	BackupDate pulumi.StringInput `pulumi:"backupDate"`
	// The charge type of db instance.
	ChargeType pulumi.StringInput `pulumi:"chargeType"`
	// The creation time of database instance , formatted by RFC3339 time string.
	CreateTime pulumi.StringInput `pulumi:"createTime"`
	// The type of database instance engine.
	Engine pulumi.StringInput `pulumi:"engine"`
	// The database instance engine version.
	EngineVersion pulumi.StringInput `pulumi:"engineVersion"`
	// The expiration time of database instance , formatted by RFC3339 time string.
	ExpireTime pulumi.StringInput `pulumi:"expireTime"`
	// The ID of database instance.
	Id pulumi.StringInput `pulumi:"id"`
	// Specifies the allocated storage size in gigabytes (GB).
	InstanceStorage pulumi.IntInput `pulumi:"instanceStorage"`
	// Specifies the type of database instance.
	InstanceType pulumi.StringInput `pulumi:"instanceType"`
	// The modification time of database instance , formatted by RFC3339 time string.
	ModifyTime pulumi.StringInput `pulumi:"modifyTime"`
	// The name of database instance.
	Name pulumi.StringInput `pulumi:"name"`
	// The port on which the database instance accepts connections.
	Port pulumi.IntInput `pulumi:"port"`
	// The private IP address assigned to the database instance.
	PrivateIp pulumi.StringInput `pulumi:"privateIp"`
	// Availability zone where the standby database instance is located for the high availability database instance with multiple zone.
	StandbyZone pulumi.StringInput `pulumi:"standbyZone"`
	// Specifies the status of database instance , possible values are: `Init`, `Fail`, `Starting`, `Running`, `Shutdown`, `Shutoff`, `Delete`, `Upgrading`, `Promoting`, `Recovering` and `Recover fail`.
	Status pulumi.StringInput `pulumi:"status"`
	// The ID of subnet linked to the database instances.
	SubnetId pulumi.StringInput `pulumi:"subnetId"`
	// A tag assigned to database instance.
	Tag pulumi.StringInput `pulumi:"tag"`
	// The ID of VPC linked to the database instances.
	VpcId pulumi.StringInput `pulumi:"vpcId"`
}

func (GetDBInstanceDbInstanceArgs) ElementType

func (GetDBInstanceDbInstanceArgs) ToGetDBInstanceDbInstanceOutput

func (i GetDBInstanceDbInstanceArgs) ToGetDBInstanceDbInstanceOutput() GetDBInstanceDbInstanceOutput

func (GetDBInstanceDbInstanceArgs) ToGetDBInstanceDbInstanceOutputWithContext

func (i GetDBInstanceDbInstanceArgs) ToGetDBInstanceDbInstanceOutputWithContext(ctx context.Context) GetDBInstanceDbInstanceOutput

type GetDBInstanceDbInstanceArray

type GetDBInstanceDbInstanceArray []GetDBInstanceDbInstanceInput

func (GetDBInstanceDbInstanceArray) ElementType

func (GetDBInstanceDbInstanceArray) ToGetDBInstanceDbInstanceArrayOutput

func (i GetDBInstanceDbInstanceArray) ToGetDBInstanceDbInstanceArrayOutput() GetDBInstanceDbInstanceArrayOutput

func (GetDBInstanceDbInstanceArray) ToGetDBInstanceDbInstanceArrayOutputWithContext

func (i GetDBInstanceDbInstanceArray) ToGetDBInstanceDbInstanceArrayOutputWithContext(ctx context.Context) GetDBInstanceDbInstanceArrayOutput

type GetDBInstanceDbInstanceArrayInput

type GetDBInstanceDbInstanceArrayInput interface {
	pulumi.Input

	ToGetDBInstanceDbInstanceArrayOutput() GetDBInstanceDbInstanceArrayOutput
	ToGetDBInstanceDbInstanceArrayOutputWithContext(context.Context) GetDBInstanceDbInstanceArrayOutput
}

GetDBInstanceDbInstanceArrayInput is an input type that accepts GetDBInstanceDbInstanceArray and GetDBInstanceDbInstanceArrayOutput values. You can construct a concrete instance of `GetDBInstanceDbInstanceArrayInput` via:

GetDBInstanceDbInstanceArray{ GetDBInstanceDbInstanceArgs{...} }

type GetDBInstanceDbInstanceArrayOutput

type GetDBInstanceDbInstanceArrayOutput struct{ *pulumi.OutputState }

func (GetDBInstanceDbInstanceArrayOutput) ElementType

func (GetDBInstanceDbInstanceArrayOutput) Index

func (GetDBInstanceDbInstanceArrayOutput) ToGetDBInstanceDbInstanceArrayOutput

func (o GetDBInstanceDbInstanceArrayOutput) ToGetDBInstanceDbInstanceArrayOutput() GetDBInstanceDbInstanceArrayOutput

func (GetDBInstanceDbInstanceArrayOutput) ToGetDBInstanceDbInstanceArrayOutputWithContext

func (o GetDBInstanceDbInstanceArrayOutput) ToGetDBInstanceDbInstanceArrayOutputWithContext(ctx context.Context) GetDBInstanceDbInstanceArrayOutput

type GetDBInstanceDbInstanceInput

type GetDBInstanceDbInstanceInput interface {
	pulumi.Input

	ToGetDBInstanceDbInstanceOutput() GetDBInstanceDbInstanceOutput
	ToGetDBInstanceDbInstanceOutputWithContext(context.Context) GetDBInstanceDbInstanceOutput
}

GetDBInstanceDbInstanceInput is an input type that accepts GetDBInstanceDbInstanceArgs and GetDBInstanceDbInstanceOutput values. You can construct a concrete instance of `GetDBInstanceDbInstanceInput` via:

GetDBInstanceDbInstanceArgs{...}

type GetDBInstanceDbInstanceOutput

type GetDBInstanceDbInstanceOutput struct{ *pulumi.OutputState }

func (GetDBInstanceDbInstanceOutput) AvailabilityZone

func (o GetDBInstanceDbInstanceOutput) AvailabilityZone() pulumi.StringOutput

Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)

func (GetDBInstanceDbInstanceOutput) BackupBeginTime

func (o GetDBInstanceDbInstanceOutput) BackupBeginTime() pulumi.IntOutput

Specifies when the backup starts, measured in hour.

func (GetDBInstanceDbInstanceOutput) BackupBlackLists

The backup for database instance such as "test.%" or table such as "city.address" specified in the black lists are not supported.

func (GetDBInstanceDbInstanceOutput) BackupCount

Specifies the number of backup saved per week.

func (GetDBInstanceDbInstanceOutput) BackupDate

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.

func (GetDBInstanceDbInstanceOutput) ChargeType

The charge type of db instance.

func (GetDBInstanceDbInstanceOutput) CreateTime

The creation time of database instance , formatted by RFC3339 time string.

func (GetDBInstanceDbInstanceOutput) ElementType

func (GetDBInstanceDbInstanceOutput) Engine

The type of database instance engine.

func (GetDBInstanceDbInstanceOutput) EngineVersion

The database instance engine version.

func (GetDBInstanceDbInstanceOutput) ExpireTime

The expiration time of database instance , formatted by RFC3339 time string.

func (GetDBInstanceDbInstanceOutput) Id

The ID of database instance.

func (GetDBInstanceDbInstanceOutput) InstanceStorage

func (o GetDBInstanceDbInstanceOutput) InstanceStorage() pulumi.IntOutput

Specifies the allocated storage size in gigabytes (GB).

func (GetDBInstanceDbInstanceOutput) InstanceType

Specifies the type of database instance.

func (GetDBInstanceDbInstanceOutput) ModifyTime

The modification time of database instance , formatted by RFC3339 time string.

func (GetDBInstanceDbInstanceOutput) Name

The name of database instance.

func (GetDBInstanceDbInstanceOutput) Port

The port on which the database instance accepts connections.

func (GetDBInstanceDbInstanceOutput) PrivateIp

The private IP address assigned to the database instance.

func (GetDBInstanceDbInstanceOutput) StandbyZone

Availability zone where the standby database instance is located for the high availability database instance with multiple zone.

func (GetDBInstanceDbInstanceOutput) Status

Specifies the status of database instance , possible values are: `Init`, `Fail`, `Starting`, `Running`, `Shutdown`, `Shutoff`, `Delete`, `Upgrading`, `Promoting`, `Recovering` and `Recover fail`.

func (GetDBInstanceDbInstanceOutput) SubnetId

The ID of subnet linked to the database instances.

func (GetDBInstanceDbInstanceOutput) Tag

A tag assigned to database instance.

func (GetDBInstanceDbInstanceOutput) ToGetDBInstanceDbInstanceOutput

func (o GetDBInstanceDbInstanceOutput) ToGetDBInstanceDbInstanceOutput() GetDBInstanceDbInstanceOutput

func (GetDBInstanceDbInstanceOutput) ToGetDBInstanceDbInstanceOutputWithContext

func (o GetDBInstanceDbInstanceOutput) ToGetDBInstanceDbInstanceOutputWithContext(ctx context.Context) GetDBInstanceDbInstanceOutput

func (GetDBInstanceDbInstanceOutput) VpcId

The ID of VPC linked to the database instances.

type LookupDBInstanceArgs

type LookupDBInstanceArgs struct {
	// Availability zone where database instances are located. Such as: "cn-bj2-02". You may refer to [list of availability zone](https://docs.ucloud.cn/api/summary/regionlist)
	AvailabilityZone *string `pulumi:"availabilityZone"`
	// A list of database instance IDs, all the database instances belong to this region will be retrieved if the ID is `[]`.
	Ids []string `pulumi:"ids"`
	// A regex string to filter resulting database instances by name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getDBInstance.

type LookupDBInstanceResult

type LookupDBInstanceResult struct {
	// Availability zone where database instance is located.
	AvailabilityZone *string `pulumi:"availabilityZone"`
	// It is a nested type which documented below.
	DbInstances []GetDBInstanceDbInstance `pulumi:"dbInstances"`
	// The provider-assigned unique ID for this managed resource.
	Id         string   `pulumi:"id"`
	Ids        []string `pulumi:"ids"`
	NameRegex  *string  `pulumi:"nameRegex"`
	OutputFile *string  `pulumi:"outputFile"`
	// Total number of database instances that satisfy the condition.
	TotalCount int `pulumi:"totalCount"`
}

A collection of values returned by getDBInstance.

func LookupDBInstance

func LookupDBInstance(ctx *pulumi.Context, args *LookupDBInstanceArgs, opts ...pulumi.InvokeOption) (*LookupDBInstanceResult, error)

This data source provides a list of database instance resources according to their database instance ID and name.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-ucloud/sdk/go/ucloud/udb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := udb.LookupDBInstance(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("first", example.DbInstances[0].Id)
		return nil
	})
}

```

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL