tencentcloud.MysqlDrInstance
Explore with Pulumi AI
Provides a mysql instance resource to create read-only database instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const mysqlDr = new tencentcloud.MysqlDrInstance("mysqlDr", {
autoRenewFlag: 0,
availabilityZone: "ap-shanghai-3",
chargeType: "POSTPAID",
cpu: 4,
deviceType: "UNIVERSAL",
firstSlaveZone: "ap-shanghai-4",
instanceName: "mysql-dr-test-up",
intranetPort: 3360,
masterInstanceId: "cdb-adjdu3t5",
masterRegion: "ap-guangzhou",
memSize: 8000,
prepaidPeriod: 1,
projectId: 0,
securityGroups: ["sg-q4d821qk"],
slaveDeployMode: 1,
slaveSyncMode: 0,
subnetId: "subnet-5vfntba5",
tags: {
test: "test-tf",
},
volumeSize: 100,
vpcId: "vpc-h6s1s3aa",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
mysql_dr = tencentcloud.MysqlDrInstance("mysqlDr",
auto_renew_flag=0,
availability_zone="ap-shanghai-3",
charge_type="POSTPAID",
cpu=4,
device_type="UNIVERSAL",
first_slave_zone="ap-shanghai-4",
instance_name="mysql-dr-test-up",
intranet_port=3360,
master_instance_id="cdb-adjdu3t5",
master_region="ap-guangzhou",
mem_size=8000,
prepaid_period=1,
project_id=0,
security_groups=["sg-q4d821qk"],
slave_deploy_mode=1,
slave_sync_mode=0,
subnet_id="subnet-5vfntba5",
tags={
"test": "test-tf",
},
volume_size=100,
vpc_id="vpc-h6s1s3aa")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewMysqlDrInstance(ctx, "mysqlDr", &tencentcloud.MysqlDrInstanceArgs{
AutoRenewFlag: pulumi.Float64(0),
AvailabilityZone: pulumi.String("ap-shanghai-3"),
ChargeType: pulumi.String("POSTPAID"),
Cpu: pulumi.Float64(4),
DeviceType: pulumi.String("UNIVERSAL"),
FirstSlaveZone: pulumi.String("ap-shanghai-4"),
InstanceName: pulumi.String("mysql-dr-test-up"),
IntranetPort: pulumi.Float64(3360),
MasterInstanceId: pulumi.String("cdb-adjdu3t5"),
MasterRegion: pulumi.String("ap-guangzhou"),
MemSize: pulumi.Float64(8000),
PrepaidPeriod: pulumi.Float64(1),
ProjectId: pulumi.Float64(0),
SecurityGroups: pulumi.StringArray{
pulumi.String("sg-q4d821qk"),
},
SlaveDeployMode: pulumi.Float64(1),
SlaveSyncMode: pulumi.Float64(0),
SubnetId: pulumi.String("subnet-5vfntba5"),
Tags: pulumi.StringMap{
"test": pulumi.String("test-tf"),
},
VolumeSize: pulumi.Float64(100),
VpcId: pulumi.String("vpc-h6s1s3aa"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var mysqlDr = new Tencentcloud.MysqlDrInstance("mysqlDr", new()
{
AutoRenewFlag = 0,
AvailabilityZone = "ap-shanghai-3",
ChargeType = "POSTPAID",
Cpu = 4,
DeviceType = "UNIVERSAL",
FirstSlaveZone = "ap-shanghai-4",
InstanceName = "mysql-dr-test-up",
IntranetPort = 3360,
MasterInstanceId = "cdb-adjdu3t5",
MasterRegion = "ap-guangzhou",
MemSize = 8000,
PrepaidPeriod = 1,
ProjectId = 0,
SecurityGroups = new[]
{
"sg-q4d821qk",
},
SlaveDeployMode = 1,
SlaveSyncMode = 0,
SubnetId = "subnet-5vfntba5",
Tags =
{
{ "test", "test-tf" },
},
VolumeSize = 100,
VpcId = "vpc-h6s1s3aa",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.MysqlDrInstance;
import com.pulumi.tencentcloud.MysqlDrInstanceArgs;
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) {
var mysqlDr = new MysqlDrInstance("mysqlDr", MysqlDrInstanceArgs.builder()
.autoRenewFlag(0)
.availabilityZone("ap-shanghai-3")
.chargeType("POSTPAID")
.cpu(4)
.deviceType("UNIVERSAL")
.firstSlaveZone("ap-shanghai-4")
.instanceName("mysql-dr-test-up")
.intranetPort(3360)
.masterInstanceId("cdb-adjdu3t5")
.masterRegion("ap-guangzhou")
.memSize(8000)
.prepaidPeriod(1)
.projectId(0)
.securityGroups("sg-q4d821qk")
.slaveDeployMode(1)
.slaveSyncMode(0)
.subnetId("subnet-5vfntba5")
.tags(Map.of("test", "test-tf"))
.volumeSize(100)
.vpcId("vpc-h6s1s3aa")
.build());
}
}
resources:
mysqlDr:
type: tencentcloud:MysqlDrInstance
properties:
autoRenewFlag: 0
availabilityZone: ap-shanghai-3
chargeType: POSTPAID
cpu: 4
deviceType: UNIVERSAL
firstSlaveZone: ap-shanghai-4
instanceName: mysql-dr-test-up
intranetPort: 3360
masterInstanceId: cdb-adjdu3t5
masterRegion: ap-guangzhou
memSize: 8000
prepaidPeriod: 1
projectId: 0
securityGroups:
- sg-q4d821qk
slaveDeployMode: 1
slaveSyncMode: 0
subnetId: subnet-5vfntba5
tags:
test: test-tf
volumeSize: 100
vpcId: vpc-h6s1s3aa
Create MysqlDrInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MysqlDrInstance(name: string, args: MysqlDrInstanceArgs, opts?: CustomResourceOptions);
@overload
def MysqlDrInstance(resource_name: str,
args: MysqlDrInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MysqlDrInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_name: Optional[str] = None,
volume_size: Optional[float] = None,
mem_size: Optional[float] = None,
master_region: Optional[str] = None,
master_instance_id: Optional[str] = None,
mysql_dr_instance_id: Optional[str] = None,
period: Optional[float] = None,
first_slave_zone: Optional[str] = None,
intranet_port: Optional[float] = None,
device_type: Optional[str] = None,
cpu: Optional[float] = None,
charge_type: Optional[str] = None,
auto_renew_flag: Optional[float] = None,
pay_type: Optional[float] = None,
force_delete: Optional[bool] = None,
prepaid_period: Optional[float] = None,
project_id: Optional[float] = None,
second_slave_zone: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
slave_deploy_mode: Optional[float] = None,
slave_sync_mode: Optional[float] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
availability_zone: Optional[str] = None,
vpc_id: Optional[str] = None)
func NewMysqlDrInstance(ctx *Context, name string, args MysqlDrInstanceArgs, opts ...ResourceOption) (*MysqlDrInstance, error)
public MysqlDrInstance(string name, MysqlDrInstanceArgs args, CustomResourceOptions? opts = null)
public MysqlDrInstance(String name, MysqlDrInstanceArgs args)
public MysqlDrInstance(String name, MysqlDrInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:MysqlDrInstance
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 MysqlDrInstanceArgs
- 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 MysqlDrInstanceArgs
- 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 MysqlDrInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MysqlDrInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MysqlDrInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MysqlDrInstance 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 MysqlDrInstance resource accepts the following input properties:
- Instance
Name string - The name of a mysql instance.
- Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Master
Region string - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- Mem
Size double - Memory size (in MB).
- Volume
Size double - Disk size (in GB).
- Auto
Renew doubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- Availability
Zone string - Indicates which availability zone will be used.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu double
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - First
Slave stringZone - Zone information about first slave instance.
- Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - Intranet
Port double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Mysql
Dr stringInstance Id - ID of the resource.
- Pay
Type double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period double - Period of instance. NOTES: Only supported prepaid instance.
- Project
Id double - Project ID, default value is 0.
- Second
Slave stringZone - Zone information about second slave instance.
- Security
Groups List<string> - Security groups to use.
- Slave
Deploy doubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Slave
Sync doubleMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - Dictionary<string, string>
- Instance tags.
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- Instance
Name string - The name of a mysql instance.
- Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Master
Region string - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- Mem
Size float64 - Memory size (in MB).
- Volume
Size float64 - Disk size (in GB).
- Auto
Renew float64Flag - Auto renew flag. NOTES: Only supported prepaid instance.
- Availability
Zone string - Indicates which availability zone will be used.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu float64
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - First
Slave stringZone - Zone information about first slave instance.
- Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - Intranet
Port float64 - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Mysql
Dr stringInstance Id - ID of the resource.
- Pay
Type float64 - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period float64
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period float64 - Period of instance. NOTES: Only supported prepaid instance.
- Project
Id float64 - Project ID, default value is 0.
- Second
Slave stringZone - Zone information about second slave instance.
- Security
Groups []string - Security groups to use.
- Slave
Deploy float64Mode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Slave
Sync float64Mode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - map[string]string
- Instance tags.
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- instance
Name String - The name of a mysql instance.
- master
Instance StringId - Indicates the master instance ID of recovery instances.
- master
Region String - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem
Size Double - Memory size (in MB).
- volume
Size Double - Disk size (in GB).
- auto
Renew DoubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability
Zone String - Indicates which availability zone will be used.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Double
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first
Slave StringZone - Zone information about first slave instance.
- force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - intranet
Port Double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - mysql
Dr StringInstance Id - ID of the resource.
- pay
Type Double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Double - Period of instance. NOTES: Only supported prepaid instance.
- project
Id Double - Project ID, default value is 0.
- second
Slave StringZone - Zone information about second slave instance.
- security
Groups List<String> - Security groups to use.
- slave
Deploy DoubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave
Sync DoubleMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String,String>
- Instance tags.
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
- instance
Name string - The name of a mysql instance.
- master
Instance stringId - Indicates the master instance ID of recovery instances.
- master
Region string - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem
Size number - Memory size (in MB).
- volume
Size number - Disk size (in GB).
- auto
Renew numberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability
Zone string - Indicates which availability zone will be used.
- charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu number
- CPU cores.
- device
Type string - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first
Slave stringZone - Zone information about first slave instance.
- force
Delete boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - intranet
Port number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - mysql
Dr stringInstance Id - ID of the resource.
- pay
Type number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period number - Period of instance. NOTES: Only supported prepaid instance.
- project
Id number - Project ID, default value is 0.
- second
Slave stringZone - Zone information about second slave instance.
- security
Groups string[] - Security groups to use.
- slave
Deploy numberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave
Sync numberMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - {[key: string]: string}
- Instance tags.
- vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- instance_
name str - The name of a mysql instance.
- master_
instance_ strid - Indicates the master instance ID of recovery instances.
- master_
region str - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem_
size float - Memory size (in MB).
- volume_
size float - Disk size (in GB).
- auto_
renew_ floatflag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability_
zone str - Indicates which availability zone will be used.
- charge_
type str - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu float
- CPU cores.
- device_
type str - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first_
slave_ strzone - Zone information about first slave instance.
- force_
delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - intranet_
port float - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - mysql_
dr_ strinstance_ id - ID of the resource.
- pay_
type float - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period float
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid_
period float - Period of instance. NOTES: Only supported prepaid instance.
- project_
id float - Project ID, default value is 0.
- second_
slave_ strzone - Zone information about second slave instance.
- security_
groups Sequence[str] - Security groups to use.
- slave_
deploy_ floatmode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave_
sync_ floatmode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet_
id str - Private network ID. If
vpc_id
is set, this value is required. - Mapping[str, str]
- Instance tags.
- vpc_
id str - ID of VPC, which can be modified once every 24 hours and can't be removed.
- instance
Name String - The name of a mysql instance.
- master
Instance StringId - Indicates the master instance ID of recovery instances.
- master
Region String - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem
Size Number - Memory size (in MB).
- volume
Size Number - Disk size (in GB).
- auto
Renew NumberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability
Zone String - Indicates which availability zone will be used.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Number
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first
Slave StringZone - Zone information about first slave instance.
- force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - intranet
Port Number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - mysql
Dr StringInstance Id - ID of the resource.
- pay
Type Number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Number - Period of instance. NOTES: Only supported prepaid instance.
- project
Id Number - Project ID, default value is 0.
- second
Slave StringZone - Zone information about second slave instance.
- security
Groups List<String> - Security groups to use.
- slave
Deploy NumberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave
Sync NumberMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String>
- Instance tags.
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
Outputs
All input properties are implicitly available as output properties. Additionally, the MysqlDrInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Intranet
Ip string - instance intranet IP.
- Id string
- The provider-assigned unique ID for this managed resource.
- Intranet
Ip string - instance intranet IP.
- id String
- The provider-assigned unique ID for this managed resource.
- intranet
Ip String - instance intranet IP.
- id string
- The provider-assigned unique ID for this managed resource.
- intranet
Ip string - instance intranet IP.
- id str
- The provider-assigned unique ID for this managed resource.
- intranet_
ip str - instance intranet IP.
- id String
- The provider-assigned unique ID for this managed resource.
- intranet
Ip String - instance intranet IP.
Look up Existing MysqlDrInstance Resource
Get an existing MysqlDrInstance 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?: MysqlDrInstanceState, opts?: CustomResourceOptions): MysqlDrInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_renew_flag: Optional[float] = None,
availability_zone: Optional[str] = None,
charge_type: Optional[str] = None,
cpu: Optional[float] = None,
device_type: Optional[str] = None,
first_slave_zone: Optional[str] = None,
force_delete: Optional[bool] = None,
instance_name: Optional[str] = None,
intranet_ip: Optional[str] = None,
intranet_port: Optional[float] = None,
master_instance_id: Optional[str] = None,
master_region: Optional[str] = None,
mem_size: Optional[float] = None,
mysql_dr_instance_id: Optional[str] = None,
pay_type: Optional[float] = None,
period: Optional[float] = None,
prepaid_period: Optional[float] = None,
project_id: Optional[float] = None,
second_slave_zone: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
slave_deploy_mode: Optional[float] = None,
slave_sync_mode: Optional[float] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
volume_size: Optional[float] = None,
vpc_id: Optional[str] = None) -> MysqlDrInstance
func GetMysqlDrInstance(ctx *Context, name string, id IDInput, state *MysqlDrInstanceState, opts ...ResourceOption) (*MysqlDrInstance, error)
public static MysqlDrInstance Get(string name, Input<string> id, MysqlDrInstanceState? state, CustomResourceOptions? opts = null)
public static MysqlDrInstance get(String name, Output<String> id, MysqlDrInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MysqlDrInstance get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Auto
Renew doubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- Availability
Zone string - Indicates which availability zone will be used.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu double
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - First
Slave stringZone - Zone information about first slave instance.
- Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - Instance
Name string - The name of a mysql instance.
- Intranet
Ip string - instance intranet IP.
- Intranet
Port double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Master
Region string - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- Mem
Size double - Memory size (in MB).
- Mysql
Dr stringInstance Id - ID of the resource.
- Pay
Type double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period double - Period of instance. NOTES: Only supported prepaid instance.
- Project
Id double - Project ID, default value is 0.
- Second
Slave stringZone - Zone information about second slave instance.
- Security
Groups List<string> - Security groups to use.
- Slave
Deploy doubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Slave
Sync doubleMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - Dictionary<string, string>
- Instance tags.
- Volume
Size double - Disk size (in GB).
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- Auto
Renew float64Flag - Auto renew flag. NOTES: Only supported prepaid instance.
- Availability
Zone string - Indicates which availability zone will be used.
- Charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - Cpu float64
- CPU cores.
- Device
Type string - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - First
Slave stringZone - Zone information about first slave instance.
- Force
Delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - Instance
Name string - The name of a mysql instance.
- Intranet
Ip string - instance intranet IP.
- Intranet
Port float64 - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - Master
Instance stringId - Indicates the master instance ID of recovery instances.
- Master
Region string - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- Mem
Size float64 - Memory size (in MB).
- Mysql
Dr stringInstance Id - ID of the resource.
- Pay
Type float64 - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - Period float64
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - Prepaid
Period float64 - Period of instance. NOTES: Only supported prepaid instance.
- Project
Id float64 - Project ID, default value is 0.
- Second
Slave stringZone - Zone information about second slave instance.
- Security
Groups []string - Security groups to use.
- Slave
Deploy float64Mode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- Slave
Sync float64Mode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- Subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - map[string]string
- Instance tags.
- Volume
Size float64 - Disk size (in GB).
- Vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- auto
Renew DoubleFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability
Zone String - Indicates which availability zone will be used.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Double
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first
Slave StringZone - Zone information about first slave instance.
- force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - instance
Name String - The name of a mysql instance.
- intranet
Ip String - instance intranet IP.
- intranet
Port Double - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master
Instance StringId - Indicates the master instance ID of recovery instances.
- master
Region String - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem
Size Double - Memory size (in MB).
- mysql
Dr StringInstance Id - ID of the resource.
- pay
Type Double - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Double
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Double - Period of instance. NOTES: Only supported prepaid instance.
- project
Id Double - Project ID, default value is 0.
- second
Slave StringZone - Zone information about second slave instance.
- security
Groups List<String> - Security groups to use.
- slave
Deploy DoubleMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave
Sync DoubleMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String,String>
- Instance tags.
- volume
Size Double - Disk size (in GB).
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
- auto
Renew numberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability
Zone string - Indicates which availability zone will be used.
- charge
Type string - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu number
- CPU cores.
- device
Type string - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first
Slave stringZone - Zone information about first slave instance.
- force
Delete boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - instance
Name string - The name of a mysql instance.
- intranet
Ip string - instance intranet IP.
- intranet
Port number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master
Instance stringId - Indicates the master instance ID of recovery instances.
- master
Region string - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem
Size number - Memory size (in MB).
- mysql
Dr stringInstance Id - ID of the resource.
- pay
Type number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period number - Period of instance. NOTES: Only supported prepaid instance.
- project
Id number - Project ID, default value is 0.
- second
Slave stringZone - Zone information about second slave instance.
- security
Groups string[] - Security groups to use.
- slave
Deploy numberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave
Sync numberMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet
Id string - Private network ID. If
vpc_id
is set, this value is required. - {[key: string]: string}
- Instance tags.
- volume
Size number - Disk size (in GB).
- vpc
Id string - ID of VPC, which can be modified once every 24 hours and can't be removed.
- auto_
renew_ floatflag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability_
zone str - Indicates which availability zone will be used.
- charge_
type str - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu float
- CPU cores.
- device_
type str - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first_
slave_ strzone - Zone information about first slave instance.
- force_
delete bool - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - instance_
name str - The name of a mysql instance.
- intranet_
ip str - instance intranet IP.
- intranet_
port float - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master_
instance_ strid - Indicates the master instance ID of recovery instances.
- master_
region str - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem_
size float - Memory size (in MB).
- mysql_
dr_ strinstance_ id - ID of the resource.
- pay_
type float - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period float
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid_
period float - Period of instance. NOTES: Only supported prepaid instance.
- project_
id float - Project ID, default value is 0.
- second_
slave_ strzone - Zone information about second slave instance.
- security_
groups Sequence[str] - Security groups to use.
- slave_
deploy_ floatmode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave_
sync_ floatmode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet_
id str - Private network ID. If
vpc_id
is set, this value is required. - Mapping[str, str]
- Instance tags.
- volume_
size float - Disk size (in GB).
- vpc_
id str - ID of VPC, which can be modified once every 24 hours and can't be removed.
- auto
Renew NumberFlag - Auto renew flag. NOTES: Only supported prepaid instance.
- availability
Zone String - Indicates which availability zone will be used.
- charge
Type String - Pay type of instance. Valid values:
PREPAID
,POSTPAID
. Default isPOSTPAID
. - cpu Number
- CPU cores.
- device
Type String - Specify device type, available values:
UNIVERSAL
(default),EXCLUSIVE
,BASIC
. - first
Slave StringZone - Zone information about first slave instance.
- force
Delete Boolean - Indicate whether to delete instance directly or not. Default is
false
. If set true, the instance will be deleted instead of staying recycle bin. Note: only works forPREPAID
instance. - instance
Name String - The name of a mysql instance.
- intranet
Ip String - instance intranet IP.
- intranet
Port Number - Public access port. Valid value ranges: [1024~65535]. The default value is
3306
. - master
Instance StringId - Indicates the master instance ID of recovery instances.
- master
Region String - The zone information of the primary instance is required when you purchase a disaster recovery instance.
- mem
Size Number - Memory size (in MB).
- mysql
Dr StringInstance Id - ID of the resource.
- pay
Type Number - It has been deprecated from version 1.36.0. Please use
charge_type
instead. Pay type of instance. Valid values:0
,1
.0
: prepaid,1
: postpaid. - period Number
- It has been deprecated from version 1.36.0. Please use
prepaid_period
instead. Period of instance. NOTES: Only supported prepaid instance. - prepaid
Period Number - Period of instance. NOTES: Only supported prepaid instance.
- project
Id Number - Project ID, default value is 0.
- second
Slave StringZone - Zone information about second slave instance.
- security
Groups List<String> - Security groups to use.
- slave
Deploy NumberMode - Availability zone deployment method. Available values: 0 - Single availability zone; 1 - Multiple availability zones.
- slave
Sync NumberMode - Data replication mode. 0 - Async replication; 1 - Semisync replication; 2 - Strongsync replication.
- subnet
Id String - Private network ID. If
vpc_id
is set, this value is required. - Map<String>
- Instance tags.
- volume
Size Number - Disk size (in GB).
- vpc
Id String - ID of VPC, which can be modified once every 24 hours and can't be removed.
Import
mysql dr database instances can be imported using the id, e.g.
$ pulumi import tencentcloud:index/mysqlDrInstance:MysqlDrInstance mysql_dr cdb-bcet7sdb
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.