tencentcloud.DtsSyncJob
Explore with Pulumi AI
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:
- Dst
Database stringType - destination database type.
- Dst
Region string - destination region.
- Pay
Mode string - pay mode, optional value is PrePay or PostPay.
- Src
Database stringType - source database type.
- Src
Region string - source region.
- Auto
Renew double - auto renew.
- Dts
Sync stringJob Id - ID of the resource.
- Existed
Job stringId - existed job id.
- Instance
Class string - instance class.
- Job
Name string - job name.
- Specification string
- specification.
- List<Dts
Sync Job Tag> - tags.
- Dst
Database stringType - destination database type.
- Dst
Region string - destination region.
- Pay
Mode string - pay mode, optional value is PrePay or PostPay.
- Src
Database stringType - source database type.
- Src
Region string - source region.
- Auto
Renew float64 - auto renew.
- Dts
Sync stringJob Id - ID of the resource.
- Existed
Job stringId - existed job id.
- Instance
Class string - instance class.
- Job
Name string - job name.
- Specification string
- specification.
- []Dts
Sync Job Tag Args - tags.
- dst
Database StringType - destination database type.
- dst
Region String - destination region.
- pay
Mode String - pay mode, optional value is PrePay or PostPay.
- src
Database StringType - source database type.
- src
Region String - source region.
- auto
Renew Double - auto renew.
- dts
Sync StringJob Id - ID of the resource.
- existed
Job StringId - existed job id.
- instance
Class String - instance class.
- job
Name String - job name.
- specification String
- specification.
- List<Dts
Sync Job Tag> - tags.
- dst
Database stringType - destination database type.
- dst
Region string - destination region.
- pay
Mode string - pay mode, optional value is PrePay or PostPay.
- src
Database stringType - source database type.
- src
Region string - source region.
- auto
Renew number - auto renew.
- dts
Sync stringJob Id - ID of the resource.
- existed
Job stringId - existed job id.
- instance
Class string - instance class.
- job
Name string - job name.
- specification string
- specification.
- Dts
Sync Job Tag[] - tags.
- dst_
database_ strtype - destination database type.
- dst_
region str - destination region.
- pay_
mode str - pay mode, optional value is PrePay or PostPay.
- src_
database_ strtype - source database type.
- src_
region str - source region.
- auto_
renew float - auto renew.
- dts_
sync_ strjob_ id - ID of the resource.
- existed_
job_ strid - existed job id.
- instance_
class str - instance class.
- job_
name str - job name.
- specification str
- specification.
- Sequence[Dts
Sync Job Tag Args] - tags.
- dst
Database StringType - destination database type.
- dst
Region String - destination region.
- pay
Mode String - pay mode, optional value is PrePay or PostPay.
- src
Database StringType - source database type.
- src
Region String - source region.
- auto
Renew Number - auto renew.
- dts
Sync StringJob Id - ID of the resource.
- existed
Job StringId - existed job id.
- instance
Class String - instance class.
- job
Name String - job name.
- specification String
- specification.
- List<Property Map>
- tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the DtsSyncJob resource produces the following output properties:
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.
- Auto
Renew double - auto renew.
- Dst
Database stringType - destination database type.
- Dst
Region string - destination region.
- Dts
Sync stringJob Id - ID of the resource.
- Existed
Job stringId - existed job id.
- Instance
Class string - instance class.
- Job
Id string - job id.
- Job
Name string - job name.
- Pay
Mode string - pay mode, optional value is PrePay or PostPay.
- Specification string
- specification.
- Src
Database stringType - source database type.
- Src
Region string - source region.
- List<Dts
Sync Job Tag> - tags.
- Auto
Renew float64 - auto renew.
- Dst
Database stringType - destination database type.
- Dst
Region string - destination region.
- Dts
Sync stringJob Id - ID of the resource.
- Existed
Job stringId - existed job id.
- Instance
Class string - instance class.
- Job
Id string - job id.
- Job
Name string - job name.
- Pay
Mode string - pay mode, optional value is PrePay or PostPay.
- Specification string
- specification.
- Src
Database stringType - source database type.
- Src
Region string - source region.
- []Dts
Sync Job Tag Args - tags.
- auto
Renew Double - auto renew.
- dst
Database StringType - destination database type.
- dst
Region String - destination region.
- dts
Sync StringJob Id - ID of the resource.
- existed
Job StringId - existed job id.
- instance
Class String - instance class.
- job
Id String - job id.
- job
Name String - job name.
- pay
Mode String - pay mode, optional value is PrePay or PostPay.
- specification String
- specification.
- src
Database StringType - source database type.
- src
Region String - source region.
- List<Dts
Sync Job Tag> - tags.
- auto
Renew number - auto renew.
- dst
Database stringType - destination database type.
- dst
Region string - destination region.
- dts
Sync stringJob Id - ID of the resource.
- existed
Job stringId - existed job id.
- instance
Class string - instance class.
- job
Id string - job id.
- job
Name string - job name.
- pay
Mode string - pay mode, optional value is PrePay or PostPay.
- specification string
- specification.
- src
Database stringType - source database type.
- src
Region string - source region.
- Dts
Sync Job Tag[] - tags.
- auto_
renew float - auto renew.
- dst_
database_ strtype - destination database type.
- dst_
region str - destination region.
- dts_
sync_ strjob_ id - ID of the resource.
- existed_
job_ strid - 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_ strtype - source database type.
- src_
region str - source region.
- Sequence[Dts
Sync Job Tag Args] - tags.
- auto
Renew Number - auto renew.
- dst
Database StringType - destination database type.
- dst
Region String - destination region.
- dts
Sync StringJob Id - ID of the resource.
- existed
Job StringId - existed job id.
- instance
Class String - instance class.
- job
Id String - job id.
- job
Name String - job name.
- pay
Mode String - pay mode, optional value is PrePay or PostPay.
- specification String
- specification.
- src
Database StringType - source database type.
- src
Region String - source region.
- List<Property Map>
- tags.
Supporting Types
DtsSyncJobTag, DtsSyncJobTagArgs
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.