tencentcloud.DtsMigrateService
Explore with Pulumi AI
Provides a resource to create a DTS migrate service
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.DtsMigrateService("example", {
dstDatabaseType: "cynosdbmysql",
dstRegion: "ap-guangzhou",
instanceClass: "small",
jobName: "tf-example",
srcDatabaseType: "mysql",
srcRegion: "ap-guangzhou",
tags: [{
tagKey: "createBy",
tagValue: "Terraform",
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.DtsMigrateService("example",
dst_database_type="cynosdbmysql",
dst_region="ap-guangzhou",
instance_class="small",
job_name="tf-example",
src_database_type="mysql",
src_region="ap-guangzhou",
tags=[{
"tag_key": "createBy",
"tag_value": "Terraform",
}])
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.NewDtsMigrateService(ctx, "example", &tencentcloud.DtsMigrateServiceArgs{
DstDatabaseType: pulumi.String("cynosdbmysql"),
DstRegion: pulumi.String("ap-guangzhou"),
InstanceClass: pulumi.String("small"),
JobName: pulumi.String("tf-example"),
SrcDatabaseType: pulumi.String("mysql"),
SrcRegion: pulumi.String("ap-guangzhou"),
Tags: tencentcloud.DtsMigrateServiceTagArray{
&tencentcloud.DtsMigrateServiceTagArgs{
TagKey: pulumi.String("createBy"),
TagValue: pulumi.String("Terraform"),
},
},
})
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 example = new Tencentcloud.DtsMigrateService("example", new()
{
DstDatabaseType = "cynosdbmysql",
DstRegion = "ap-guangzhou",
InstanceClass = "small",
JobName = "tf-example",
SrcDatabaseType = "mysql",
SrcRegion = "ap-guangzhou",
Tags = new[]
{
new Tencentcloud.Inputs.DtsMigrateServiceTagArgs
{
TagKey = "createBy",
TagValue = "Terraform",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.DtsMigrateService;
import com.pulumi.tencentcloud.DtsMigrateServiceArgs;
import com.pulumi.tencentcloud.inputs.DtsMigrateServiceTagArgs;
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 example = new DtsMigrateService("example", DtsMigrateServiceArgs.builder()
.dstDatabaseType("cynosdbmysql")
.dstRegion("ap-guangzhou")
.instanceClass("small")
.jobName("tf-example")
.srcDatabaseType("mysql")
.srcRegion("ap-guangzhou")
.tags(DtsMigrateServiceTagArgs.builder()
.tagKey("createBy")
.tagValue("Terraform")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:DtsMigrateService
properties:
dstDatabaseType: cynosdbmysql
dstRegion: ap-guangzhou
instanceClass: small
jobName: tf-example
srcDatabaseType: mysql
srcRegion: ap-guangzhou
tags:
- tagKey: createBy
tagValue: Terraform
Create DtsMigrateService Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DtsMigrateService(name: string, args: DtsMigrateServiceArgs, opts?: CustomResourceOptions);
@overload
def DtsMigrateService(resource_name: str,
args: DtsMigrateServiceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DtsMigrateService(resource_name: str,
opts: Optional[ResourceOptions] = None,
dst_database_type: Optional[str] = None,
dst_region: Optional[str] = None,
instance_class: Optional[str] = None,
src_database_type: Optional[str] = None,
src_region: Optional[str] = None,
dts_migrate_service_id: Optional[str] = None,
job_name: Optional[str] = None,
tags: Optional[Sequence[DtsMigrateServiceTagArgs]] = None)
func NewDtsMigrateService(ctx *Context, name string, args DtsMigrateServiceArgs, opts ...ResourceOption) (*DtsMigrateService, error)
public DtsMigrateService(string name, DtsMigrateServiceArgs args, CustomResourceOptions? opts = null)
public DtsMigrateService(String name, DtsMigrateServiceArgs args)
public DtsMigrateService(String name, DtsMigrateServiceArgs args, CustomResourceOptions options)
type: tencentcloud:DtsMigrateService
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 DtsMigrateServiceArgs
- 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 DtsMigrateServiceArgs
- 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 DtsMigrateServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DtsMigrateServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DtsMigrateServiceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DtsMigrateService 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 DtsMigrateService resource accepts the following input properties:
- Dst
Database stringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Dst
Region string - destination region.
- Instance
Class string - instance class, optional value is small/medium/large/xlarge/2xlarge.
- Src
Database stringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Src
Region string - source region.
- Dts
Migrate stringService Id - ID of the resource.
- Job
Name string - job name.
- List<Dts
Migrate Service Tag> - tags.
- Dst
Database stringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Dst
Region string - destination region.
- Instance
Class string - instance class, optional value is small/medium/large/xlarge/2xlarge.
- Src
Database stringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Src
Region string - source region.
- Dts
Migrate stringService Id - ID of the resource.
- Job
Name string - job name.
- []Dts
Migrate Service Tag Args - tags.
- dst
Database StringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst
Region String - destination region.
- instance
Class String - instance class, optional value is small/medium/large/xlarge/2xlarge.
- src
Database StringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src
Region String - source region.
- dts
Migrate StringService Id - ID of the resource.
- job
Name String - job name.
- List<Dts
Migrate Service Tag> - tags.
- dst
Database stringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst
Region string - destination region.
- instance
Class string - instance class, optional value is small/medium/large/xlarge/2xlarge.
- src
Database stringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src
Region string - source region.
- dts
Migrate stringService Id - ID of the resource.
- job
Name string - job name.
- Dts
Migrate Service Tag[] - tags.
- dst_
database_ strtype - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst_
region str - destination region.
- instance_
class str - instance class, optional value is small/medium/large/xlarge/2xlarge.
- src_
database_ strtype - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src_
region str - source region.
- dts_
migrate_ strservice_ id - ID of the resource.
- job_
name str - job name.
- Sequence[Dts
Migrate Service Tag Args] - tags.
- dst
Database StringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst
Region String - destination region.
- instance
Class String - instance class, optional value is small/medium/large/xlarge/2xlarge.
- src
Database StringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src
Region String - source region.
- dts
Migrate StringService Id - ID of the resource.
- job
Name String - job name.
- List<Property Map>
- tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the DtsMigrateService resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DtsMigrateService Resource
Get an existing DtsMigrateService 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?: DtsMigrateServiceState, opts?: CustomResourceOptions): DtsMigrateService
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dst_database_type: Optional[str] = None,
dst_region: Optional[str] = None,
dts_migrate_service_id: Optional[str] = None,
instance_class: Optional[str] = None,
job_name: Optional[str] = None,
src_database_type: Optional[str] = None,
src_region: Optional[str] = None,
tags: Optional[Sequence[DtsMigrateServiceTagArgs]] = None) -> DtsMigrateService
func GetDtsMigrateService(ctx *Context, name string, id IDInput, state *DtsMigrateServiceState, opts ...ResourceOption) (*DtsMigrateService, error)
public static DtsMigrateService Get(string name, Input<string> id, DtsMigrateServiceState? state, CustomResourceOptions? opts = null)
public static DtsMigrateService get(String name, Output<String> id, DtsMigrateServiceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:DtsMigrateService 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.
- Dst
Database stringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Dst
Region string - destination region.
- Dts
Migrate stringService Id - ID of the resource.
- Instance
Class string - instance class, optional value is small/medium/large/xlarge/2xlarge.
- Job
Name string - job name.
- Src
Database stringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Src
Region string - source region.
- List<Dts
Migrate Service Tag> - tags.
- Dst
Database stringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Dst
Region string - destination region.
- Dts
Migrate stringService Id - ID of the resource.
- Instance
Class string - instance class, optional value is small/medium/large/xlarge/2xlarge.
- Job
Name string - job name.
- Src
Database stringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- Src
Region string - source region.
- []Dts
Migrate Service Tag Args - tags.
- dst
Database StringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst
Region String - destination region.
- dts
Migrate StringService Id - ID of the resource.
- instance
Class String - instance class, optional value is small/medium/large/xlarge/2xlarge.
- job
Name String - job name.
- src
Database StringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src
Region String - source region.
- List<Dts
Migrate Service Tag> - tags.
- dst
Database stringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst
Region string - destination region.
- dts
Migrate stringService Id - ID of the resource.
- instance
Class string - instance class, optional value is small/medium/large/xlarge/2xlarge.
- job
Name string - job name.
- src
Database stringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src
Region string - source region.
- Dts
Migrate Service Tag[] - tags.
- dst_
database_ strtype - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst_
region str - destination region.
- dts_
migrate_ strservice_ id - ID of the resource.
- instance_
class str - instance class, optional value is small/medium/large/xlarge/2xlarge.
- job_
name str - job name.
- src_
database_ strtype - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src_
region str - source region.
- Sequence[Dts
Migrate Service Tag Args] - tags.
- dst
Database StringType - destination database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- dst
Region String - destination region.
- dts
Migrate StringService Id - ID of the resource.
- instance
Class String - instance class, optional value is small/medium/large/xlarge/2xlarge.
- job
Name String - job name.
- src
Database StringType - source database type, optional value is mysql/redis/percona/mongodb/postgresql/sqlserver/mariadb.
- src
Region String - source region.
- List<Property Map>
- tags.
Supporting Types
DtsMigrateServiceTag, DtsMigrateServiceTagArgs
Import
DTS migrate service can be imported using the id, e.g.
$ pulumi import tencentcloud:index/dtsMigrateService:DtsMigrateService example dts-iy98oxba
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.