1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. DtsSyncJob
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.DtsSyncJob

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a DTS sync job

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.DtsSyncJob("example", {
        autoRenew: 0,
        dstDatabaseType: "cynosdbmysql",
        dstRegion: "ap-guangzhou",
        instanceClass: "micro",
        payMode: "PostPay",
        srcDatabaseType: "mysql",
        srcRegion: "ap-guangzhou",
        tags: [{
            tagKey: "createBy",
            tagValue: "Terraform",
        }],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.DtsSyncJob("example",
        auto_renew=0,
        dst_database_type="cynosdbmysql",
        dst_region="ap-guangzhou",
        instance_class="micro",
        pay_mode="PostPay",
        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.NewDtsSyncJob(ctx, "example", &tencentcloud.DtsSyncJobArgs{
    			AutoRenew:       pulumi.Float64(0),
    			DstDatabaseType: pulumi.String("cynosdbmysql"),
    			DstRegion:       pulumi.String("ap-guangzhou"),
    			InstanceClass:   pulumi.String("micro"),
    			PayMode:         pulumi.String("PostPay"),
    			SrcDatabaseType: pulumi.String("mysql"),
    			SrcRegion:       pulumi.String("ap-guangzhou"),
    			Tags: tencentcloud.DtsSyncJobTagArray{
    				&tencentcloud.DtsSyncJobTagArgs{
    					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.DtsSyncJob("example", new()
        {
            AutoRenew = 0,
            DstDatabaseType = "cynosdbmysql",
            DstRegion = "ap-guangzhou",
            InstanceClass = "micro",
            PayMode = "PostPay",
            SrcDatabaseType = "mysql",
            SrcRegion = "ap-guangzhou",
            Tags = new[]
            {
                new Tencentcloud.Inputs.DtsSyncJobTagArgs
                {
                    TagKey = "createBy",
                    TagValue = "Terraform",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DtsSyncJob;
    import com.pulumi.tencentcloud.DtsSyncJobArgs;
    import com.pulumi.tencentcloud.inputs.DtsSyncJobTagArgs;
    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 DtsSyncJob("example", DtsSyncJobArgs.builder()
                .autoRenew(0)
                .dstDatabaseType("cynosdbmysql")
                .dstRegion("ap-guangzhou")
                .instanceClass("micro")
                .payMode("PostPay")
                .srcDatabaseType("mysql")
                .srcRegion("ap-guangzhou")
                .tags(DtsSyncJobTagArgs.builder()
                    .tagKey("createBy")
                    .tagValue("Terraform")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:DtsSyncJob
        properties:
          autoRenew: 0
          dstDatabaseType: cynosdbmysql
          dstRegion: ap-guangzhou
          instanceClass: micro
          payMode: PostPay
          srcDatabaseType: mysql
          srcRegion: ap-guangzhou
          tags:
            - tagKey: createBy
              tagValue: Terraform
    

    Create DtsSyncJob Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DtsSyncJob(name: string, args: DtsSyncJobArgs, opts?: CustomResourceOptions);
    @overload
    def DtsSyncJob(resource_name: str,
                   args: DtsSyncJobArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def DtsSyncJob(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   dst_database_type: Optional[str] = None,
                   dst_region: Optional[str] = None,
                   pay_mode: Optional[str] = None,
                   src_database_type: Optional[str] = None,
                   src_region: Optional[str] = None,
                   auto_renew: Optional[float] = None,
                   dts_sync_job_id: Optional[str] = None,
                   existed_job_id: Optional[str] = None,
                   instance_class: Optional[str] = None,
                   job_name: Optional[str] = None,
                   specification: Optional[str] = None,
                   tags: Optional[Sequence[DtsSyncJobTagArgs]] = None)
    func NewDtsSyncJob(ctx *Context, name string, args DtsSyncJobArgs, opts ...ResourceOption) (*DtsSyncJob, error)
    public DtsSyncJob(string name, DtsSyncJobArgs args, CustomResourceOptions? opts = null)
    public DtsSyncJob(String name, DtsSyncJobArgs args)
    public DtsSyncJob(String name, DtsSyncJobArgs args, CustomResourceOptions options)
    
    type: tencentcloud:DtsSyncJob
    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 DtsSyncJobArgs
    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 DtsSyncJobArgs
    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 DtsSyncJobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DtsSyncJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DtsSyncJobArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DtsSyncJob 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 DtsSyncJob resource accepts the following input properties:

    DstDatabaseType string
    destination database type.
    DstRegion string
    destination region.
    PayMode string
    pay mode, optional value is PrePay or PostPay.
    SrcDatabaseType string
    source database type.
    SrcRegion string
    source region.
    AutoRenew double
    auto renew.
    DtsSyncJobId string
    ID of the resource.
    ExistedJobId string
    existed job id.
    InstanceClass string
    instance class.
    JobName string
    job name.
    Specification string
    specification.
    Tags List<DtsSyncJobTag>
    tags.
    DstDatabaseType string
    destination database type.
    DstRegion string
    destination region.
    PayMode string
    pay mode, optional value is PrePay or PostPay.
    SrcDatabaseType string
    source database type.
    SrcRegion string
    source region.
    AutoRenew float64
    auto renew.
    DtsSyncJobId string
    ID of the resource.
    ExistedJobId string
    existed job id.
    InstanceClass string
    instance class.
    JobName string
    job name.
    Specification string
    specification.
    Tags []DtsSyncJobTagArgs
    tags.
    dstDatabaseType String
    destination database type.
    dstRegion String
    destination region.
    payMode String
    pay mode, optional value is PrePay or PostPay.
    srcDatabaseType String
    source database type.
    srcRegion String
    source region.
    autoRenew Double
    auto renew.
    dtsSyncJobId String
    ID of the resource.
    existedJobId String
    existed job id.
    instanceClass String
    instance class.
    jobName String
    job name.
    specification String
    specification.
    tags List<DtsSyncJobTag>
    tags.
    dstDatabaseType string
    destination database type.
    dstRegion string
    destination region.
    payMode string
    pay mode, optional value is PrePay or PostPay.
    srcDatabaseType string
    source database type.
    srcRegion string
    source region.
    autoRenew number
    auto renew.
    dtsSyncJobId string
    ID of the resource.
    existedJobId string
    existed job id.
    instanceClass string
    instance class.
    jobName string
    job name.
    specification string
    specification.
    tags DtsSyncJobTag[]
    tags.
    dst_database_type str
    destination database type.
    dst_region str
    destination region.
    pay_mode str
    pay mode, optional value is PrePay or PostPay.
    src_database_type str
    source database type.
    src_region str
    source region.
    auto_renew float
    auto renew.
    dts_sync_job_id str
    ID of the resource.
    existed_job_id str
    existed job id.
    instance_class str
    instance class.
    job_name str
    job name.
    specification str
    specification.
    tags Sequence[DtsSyncJobTagArgs]
    tags.
    dstDatabaseType String
    destination database type.
    dstRegion String
    destination region.
    payMode String
    pay mode, optional value is PrePay or PostPay.
    srcDatabaseType String
    source database type.
    srcRegion String
    source region.
    autoRenew Number
    auto renew.
    dtsSyncJobId String
    ID of the resource.
    existedJobId String
    existed job id.
    instanceClass String
    instance class.
    jobName String
    job name.
    specification String
    specification.
    tags List<Property Map>
    tags.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DtsSyncJob resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    JobId string
    job id.
    Id string
    The provider-assigned unique ID for this managed resource.
    JobId string
    job id.
    id String
    The provider-assigned unique ID for this managed resource.
    jobId String
    job id.
    id string
    The provider-assigned unique ID for this managed resource.
    jobId string
    job id.
    id str
    The provider-assigned unique ID for this managed resource.
    job_id str
    job id.
    id String
    The provider-assigned unique ID for this managed resource.
    jobId String
    job id.

    Look up Existing DtsSyncJob Resource

    Get an existing DtsSyncJob 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?: DtsSyncJobState, opts?: CustomResourceOptions): DtsSyncJob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_renew: Optional[float] = None,
            dst_database_type: Optional[str] = None,
            dst_region: Optional[str] = None,
            dts_sync_job_id: Optional[str] = None,
            existed_job_id: Optional[str] = None,
            instance_class: Optional[str] = None,
            job_id: Optional[str] = None,
            job_name: Optional[str] = None,
            pay_mode: Optional[str] = None,
            specification: Optional[str] = None,
            src_database_type: Optional[str] = None,
            src_region: Optional[str] = None,
            tags: Optional[Sequence[DtsSyncJobTagArgs]] = None) -> DtsSyncJob
    func GetDtsSyncJob(ctx *Context, name string, id IDInput, state *DtsSyncJobState, opts ...ResourceOption) (*DtsSyncJob, error)
    public static DtsSyncJob Get(string name, Input<string> id, DtsSyncJobState? state, CustomResourceOptions? opts = null)
    public static DtsSyncJob get(String name, Output<String> id, DtsSyncJobState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DtsSyncJob    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.
    The following state arguments are supported:
    AutoRenew double
    auto renew.
    DstDatabaseType string
    destination database type.
    DstRegion string
    destination region.
    DtsSyncJobId string
    ID of the resource.
    ExistedJobId string
    existed job id.
    InstanceClass string
    instance class.
    JobId string
    job id.
    JobName string
    job name.
    PayMode string
    pay mode, optional value is PrePay or PostPay.
    Specification string
    specification.
    SrcDatabaseType string
    source database type.
    SrcRegion string
    source region.
    Tags List<DtsSyncJobTag>
    tags.
    AutoRenew float64
    auto renew.
    DstDatabaseType string
    destination database type.
    DstRegion string
    destination region.
    DtsSyncJobId string
    ID of the resource.
    ExistedJobId string
    existed job id.
    InstanceClass string
    instance class.
    JobId string
    job id.
    JobName string
    job name.
    PayMode string
    pay mode, optional value is PrePay or PostPay.
    Specification string
    specification.
    SrcDatabaseType string
    source database type.
    SrcRegion string
    source region.
    Tags []DtsSyncJobTagArgs
    tags.
    autoRenew Double
    auto renew.
    dstDatabaseType String
    destination database type.
    dstRegion String
    destination region.
    dtsSyncJobId String
    ID of the resource.
    existedJobId String
    existed job id.
    instanceClass String
    instance class.
    jobId String
    job id.
    jobName String
    job name.
    payMode String
    pay mode, optional value is PrePay or PostPay.
    specification String
    specification.
    srcDatabaseType String
    source database type.
    srcRegion String
    source region.
    tags List<DtsSyncJobTag>
    tags.
    autoRenew number
    auto renew.
    dstDatabaseType string
    destination database type.
    dstRegion string
    destination region.
    dtsSyncJobId string
    ID of the resource.
    existedJobId string
    existed job id.
    instanceClass string
    instance class.
    jobId string
    job id.
    jobName string
    job name.
    payMode string
    pay mode, optional value is PrePay or PostPay.
    specification string
    specification.
    srcDatabaseType string
    source database type.
    srcRegion string
    source region.
    tags DtsSyncJobTag[]
    tags.
    auto_renew float
    auto renew.
    dst_database_type str
    destination database type.
    dst_region str
    destination region.
    dts_sync_job_id str
    ID of the resource.
    existed_job_id str
    existed job id.
    instance_class str
    instance class.
    job_id str
    job id.
    job_name str
    job name.
    pay_mode str
    pay mode, optional value is PrePay or PostPay.
    specification str
    specification.
    src_database_type str
    source database type.
    src_region str
    source region.
    tags Sequence[DtsSyncJobTagArgs]
    tags.
    autoRenew Number
    auto renew.
    dstDatabaseType String
    destination database type.
    dstRegion String
    destination region.
    dtsSyncJobId String
    ID of the resource.
    existedJobId String
    existed job id.
    instanceClass String
    instance class.
    jobId String
    job id.
    jobName String
    job name.
    payMode String
    pay mode, optional value is PrePay or PostPay.
    specification String
    specification.
    srcDatabaseType String
    source database type.
    srcRegion String
    source region.
    tags List<Property Map>
    tags.

    Supporting Types

    DtsSyncJobTag, DtsSyncJobTagArgs

    TagKey string
    tag key.
    TagValue string
    tag value.
    TagKey string
    tag key.
    TagValue string
    tag value.
    tagKey String
    tag key.
    tagValue String
    tag value.
    tagKey string
    tag key.
    tagValue string
    tag value.
    tag_key str
    tag key.
    tag_value str
    tag value.
    tagKey String
    tag key.
    tagValue String
    tag value.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack