alicloud.dts.SubscriptionJob
Explore with Pulumi AI
Provides a DTS Subscription Job resource.
For information about DTS Subscription Job and how to use it, see What is Subscription Job.
NOTE: Available since v1.138.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const example = alicloud.getRegions({
current: true,
});
const exampleGetZones = alicloud.rds.getZones({
engine: "MySQL",
engineVersion: "8.0",
instanceChargeType: "PostPaid",
category: "Basic",
dbInstanceStorageType: "cloud_essd",
});
const exampleGetInstanceClasses = exampleGetZones.then(exampleGetZones => alicloud.rds.getInstanceClasses({
zoneId: exampleGetZones.zones?.[0]?.id,
engine: "MySQL",
engineVersion: "8.0",
instanceChargeType: "PostPaid",
category: "Basic",
dbInstanceStorageType: "cloud_essd",
}));
const exampleNetwork = new alicloud.vpc.Network("example", {
vpcName: name,
cidrBlock: "172.16.0.0/16",
});
const exampleSwitch = new alicloud.vpc.Switch("example", {
vpcId: exampleNetwork.id,
cidrBlock: "172.16.0.0/24",
zoneId: exampleGetZones.then(exampleGetZones => exampleGetZones.zones?.[0]?.id),
vswitchName: name,
});
const exampleSecurityGroup = new alicloud.ecs.SecurityGroup("example", {
name: name,
vpcId: exampleNetwork.id,
});
const exampleInstance = new alicloud.rds.Instance("example", {
engine: "MySQL",
engineVersion: "8.0",
instanceType: exampleGetInstanceClasses.then(exampleGetInstanceClasses => exampleGetInstanceClasses.instanceClasses?.[0]?.instanceClass),
instanceStorage: exampleGetInstanceClasses.then(exampleGetInstanceClasses => exampleGetInstanceClasses.instanceClasses?.[0]?.storageRange?.min),
instanceChargeType: "Postpaid",
instanceName: name,
vswitchId: exampleSwitch.id,
monitoringPeriod: 60,
dbInstanceStorageType: "cloud_essd",
securityGroupIds: [exampleSecurityGroup.id],
});
const exampleRdsAccount = new alicloud.rds.RdsAccount("example", {
dbInstanceId: exampleInstance.id,
accountName: "test_mysql",
accountPassword: "N1cetest",
});
const exampleDatabase = new alicloud.rds.Database("example", {
instanceId: exampleInstance.id,
name: name,
});
const exampleAccountPrivilege = new alicloud.rds.AccountPrivilege("example", {
instanceId: exampleInstance.id,
accountName: exampleRdsAccount.accountName,
privilege: "ReadWrite",
dbNames: [exampleDatabase.name],
});
const exampleSubscriptionJob = new alicloud.dts.SubscriptionJob("example", {
dtsJobName: name,
paymentType: "PayAsYouGo",
sourceEndpointEngineName: "MySQL",
sourceEndpointRegion: example.then(example => example.regions?.[0]?.id),
sourceEndpointInstanceType: "RDS",
sourceEndpointInstanceId: exampleInstance.id,
sourceEndpointDatabaseName: exampleDatabase.name,
sourceEndpointUserName: exampleRdsAccount.accountName,
sourceEndpointPassword: exampleRdsAccount.accountPassword,
dbList: pulumi.jsonStringify(pulumi.all([exampleDatabase.name, exampleDatabase.name]).apply(([exampleDatabaseName, exampleDatabaseName1]) => {
[exampleDatabaseName]: {
name: exampleDatabaseName1,
all: true,
},
})),
subscriptionInstanceNetworkType: "vpc",
subscriptionInstanceVpcId: exampleNetwork.id,
subscriptionInstanceVswitchId: exampleSwitch.id,
status: "Normal",
});
import pulumi
import json
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
example = alicloud.get_regions(current=True)
example_get_zones = alicloud.rds.get_zones(engine="MySQL",
engine_version="8.0",
instance_charge_type="PostPaid",
category="Basic",
db_instance_storage_type="cloud_essd")
example_get_instance_classes = alicloud.rds.get_instance_classes(zone_id=example_get_zones.zones[0].id,
engine="MySQL",
engine_version="8.0",
instance_charge_type="PostPaid",
category="Basic",
db_instance_storage_type="cloud_essd")
example_network = alicloud.vpc.Network("example",
vpc_name=name,
cidr_block="172.16.0.0/16")
example_switch = alicloud.vpc.Switch("example",
vpc_id=example_network.id,
cidr_block="172.16.0.0/24",
zone_id=example_get_zones.zones[0].id,
vswitch_name=name)
example_security_group = alicloud.ecs.SecurityGroup("example",
name=name,
vpc_id=example_network.id)
example_instance = alicloud.rds.Instance("example",
engine="MySQL",
engine_version="8.0",
instance_type=example_get_instance_classes.instance_classes[0].instance_class,
instance_storage=example_get_instance_classes.instance_classes[0].storage_range.min,
instance_charge_type="Postpaid",
instance_name=name,
vswitch_id=example_switch.id,
monitoring_period=60,
db_instance_storage_type="cloud_essd",
security_group_ids=[example_security_group.id])
example_rds_account = alicloud.rds.RdsAccount("example",
db_instance_id=example_instance.id,
account_name="test_mysql",
account_password="N1cetest")
example_database = alicloud.rds.Database("example",
instance_id=example_instance.id,
name=name)
example_account_privilege = alicloud.rds.AccountPrivilege("example",
instance_id=example_instance.id,
account_name=example_rds_account.account_name,
privilege="ReadWrite",
db_names=[example_database.name])
example_subscription_job = alicloud.dts.SubscriptionJob("example",
dts_job_name=name,
payment_type="PayAsYouGo",
source_endpoint_engine_name="MySQL",
source_endpoint_region=example.regions[0].id,
source_endpoint_instance_type="RDS",
source_endpoint_instance_id=example_instance.id,
source_endpoint_database_name=example_database.name,
source_endpoint_user_name=example_rds_account.account_name,
source_endpoint_password=example_rds_account.account_password,
db_list=pulumi.Output.json_dumps(pulumi.Output.all(
exampleDatabaseName=example_database.name,
exampleDatabaseName1=example_database.name
).apply(lambda resolved_outputs: {
resolved_outputs['exampleDatabaseName']: {
"name": resolved_outputs['exampleDatabaseName1'],
"all": True,
},
})
),
subscription_instance_network_type="vpc",
subscription_instance_vpc_id=example_network.id,
subscription_instance_vswitch_id=example_switch.id,
status="Normal")
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dts"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
example, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
Current: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
exampleGetZones, err := rds.GetZones(ctx, &rds.GetZonesArgs{
Engine: pulumi.StringRef("MySQL"),
EngineVersion: pulumi.StringRef("8.0"),
InstanceChargeType: pulumi.StringRef("PostPaid"),
Category: pulumi.StringRef("Basic"),
DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
}, nil)
if err != nil {
return err
}
exampleGetInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
ZoneId: pulumi.StringRef(exampleGetZones.Zones[0].Id),
Engine: pulumi.StringRef("MySQL"),
EngineVersion: pulumi.StringRef("8.0"),
InstanceChargeType: pulumi.StringRef("PostPaid"),
Category: pulumi.StringRef("Basic"),
DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
}, nil)
if err != nil {
return err
}
exampleNetwork, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
exampleSwitch, err := vpc.NewSwitch(ctx, "example", &vpc.SwitchArgs{
VpcId: exampleNetwork.ID(),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(exampleGetZones.Zones[0].Id),
VswitchName: pulumi.String(name),
})
if err != nil {
return err
}
exampleSecurityGroup, err := ecs.NewSecurityGroup(ctx, "example", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
VpcId: exampleNetwork.ID(),
})
if err != nil {
return err
}
exampleInstance, err := rds.NewInstance(ctx, "example", &rds.InstanceArgs{
Engine: pulumi.String("MySQL"),
EngineVersion: pulumi.String("8.0"),
InstanceType: pulumi.String(exampleGetInstanceClasses.InstanceClasses[0].InstanceClass),
InstanceStorage: pulumi.String(exampleGetInstanceClasses.InstanceClasses[0].StorageRange.Min),
InstanceChargeType: pulumi.String("Postpaid"),
InstanceName: pulumi.String(name),
VswitchId: exampleSwitch.ID(),
MonitoringPeriod: pulumi.Int(60),
DbInstanceStorageType: pulumi.String("cloud_essd"),
SecurityGroupIds: pulumi.StringArray{
exampleSecurityGroup.ID(),
},
})
if err != nil {
return err
}
exampleRdsAccount, err := rds.NewRdsAccount(ctx, "example", &rds.RdsAccountArgs{
DbInstanceId: exampleInstance.ID(),
AccountName: pulumi.String("test_mysql"),
AccountPassword: pulumi.String("N1cetest"),
})
if err != nil {
return err
}
exampleDatabase, err := rds.NewDatabase(ctx, "example", &rds.DatabaseArgs{
InstanceId: exampleInstance.ID(),
Name: pulumi.String(name),
})
if err != nil {
return err
}
_, err = rds.NewAccountPrivilege(ctx, "example", &rds.AccountPrivilegeArgs{
InstanceId: exampleInstance.ID(),
AccountName: exampleRdsAccount.AccountName,
Privilege: pulumi.String("ReadWrite"),
DbNames: pulumi.StringArray{
exampleDatabase.Name,
},
})
if err != nil {
return err
}
_, err = dts.NewSubscriptionJob(ctx, "example", &dts.SubscriptionJobArgs{
DtsJobName: pulumi.String(name),
PaymentType: pulumi.String("PayAsYouGo"),
SourceEndpointEngineName: pulumi.String("MySQL"),
SourceEndpointRegion: pulumi.String(example.Regions[0].Id),
SourceEndpointInstanceType: pulumi.String("RDS"),
SourceEndpointInstanceId: exampleInstance.ID(),
SourceEndpointDatabaseName: exampleDatabase.Name,
SourceEndpointUserName: exampleRdsAccount.AccountName,
SourceEndpointPassword: exampleRdsAccount.AccountPassword,
DbList: pulumi.All(exampleDatabase.Name, exampleDatabase.Name).ApplyT(func(_args []interface{}) (string, error) {
exampleDatabaseName := _args[0].(string)
exampleDatabaseName1 := _args[1].(string)
var _zero string
tmpJSON0, err := json.Marshal(map[string]map[string]interface{}{
exampleDatabaseName: map[string]interface{}{
"name": exampleDatabaseName1,
"all": true,
},
})
if err != nil {
return _zero, err
}
json0 := string(tmpJSON0)
return json0, nil
}).(pulumi.StringOutput),
SubscriptionInstanceNetworkType: pulumi.String("vpc"),
SubscriptionInstanceVpcId: exampleNetwork.ID(),
SubscriptionInstanceVswitchId: exampleSwitch.ID(),
Status: pulumi.String("Normal"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var example = AliCloud.GetRegions.Invoke(new()
{
Current = true,
});
var exampleGetZones = AliCloud.Rds.GetZones.Invoke(new()
{
Engine = "MySQL",
EngineVersion = "8.0",
InstanceChargeType = "PostPaid",
Category = "Basic",
DbInstanceStorageType = "cloud_essd",
});
var exampleGetInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
{
ZoneId = exampleGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
Engine = "MySQL",
EngineVersion = "8.0",
InstanceChargeType = "PostPaid",
Category = "Basic",
DbInstanceStorageType = "cloud_essd",
});
var exampleNetwork = new AliCloud.Vpc.Network("example", new()
{
VpcName = name,
CidrBlock = "172.16.0.0/16",
});
var exampleSwitch = new AliCloud.Vpc.Switch("example", new()
{
VpcId = exampleNetwork.Id,
CidrBlock = "172.16.0.0/24",
ZoneId = exampleGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
VswitchName = name,
});
var exampleSecurityGroup = new AliCloud.Ecs.SecurityGroup("example", new()
{
Name = name,
VpcId = exampleNetwork.Id,
});
var exampleInstance = new AliCloud.Rds.Instance("example", new()
{
Engine = "MySQL",
EngineVersion = "8.0",
InstanceType = exampleGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.InstanceClass),
InstanceStorage = exampleGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.StorageRange?.Min),
InstanceChargeType = "Postpaid",
InstanceName = name,
VswitchId = exampleSwitch.Id,
MonitoringPeriod = 60,
DbInstanceStorageType = "cloud_essd",
SecurityGroupIds = new[]
{
exampleSecurityGroup.Id,
},
});
var exampleRdsAccount = new AliCloud.Rds.RdsAccount("example", new()
{
DbInstanceId = exampleInstance.Id,
AccountName = "test_mysql",
AccountPassword = "N1cetest",
});
var exampleDatabase = new AliCloud.Rds.Database("example", new()
{
InstanceId = exampleInstance.Id,
Name = name,
});
var exampleAccountPrivilege = new AliCloud.Rds.AccountPrivilege("example", new()
{
InstanceId = exampleInstance.Id,
AccountName = exampleRdsAccount.AccountName,
Privilege = "ReadWrite",
DbNames = new[]
{
exampleDatabase.Name,
},
});
var exampleSubscriptionJob = new AliCloud.Dts.SubscriptionJob("example", new()
{
DtsJobName = name,
PaymentType = "PayAsYouGo",
SourceEndpointEngineName = "MySQL",
SourceEndpointRegion = example.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id),
SourceEndpointInstanceType = "RDS",
SourceEndpointInstanceId = exampleInstance.Id,
SourceEndpointDatabaseName = exampleDatabase.Name,
SourceEndpointUserName = exampleRdsAccount.AccountName,
SourceEndpointPassword = exampleRdsAccount.AccountPassword,
DbList = Output.JsonSerialize(Output.Create(Output.Tuple(exampleDatabase.Name, exampleDatabase.Name).Apply(values =>
{
var exampleDatabaseName = values.Item1;
var exampleDatabaseName1 = values.Item2;
return
{
{ exampleDatabaseName,
{
{ "name", exampleDatabaseName1 },
{ "all", true },
} },
};
}))),
SubscriptionInstanceNetworkType = "vpc",
SubscriptionInstanceVpcId = exampleNetwork.Id,
SubscriptionInstanceVswitchId = exampleSwitch.Id,
Status = "Normal",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.alicloud.rds.RdsFunctions;
import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
import com.pulumi.alicloud.rds.inputs.GetInstanceClassesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.rds.Instance;
import com.pulumi.alicloud.rds.InstanceArgs;
import com.pulumi.alicloud.rds.RdsAccount;
import com.pulumi.alicloud.rds.RdsAccountArgs;
import com.pulumi.alicloud.rds.Database;
import com.pulumi.alicloud.rds.DatabaseArgs;
import com.pulumi.alicloud.rds.AccountPrivilege;
import com.pulumi.alicloud.rds.AccountPrivilegeArgs;
import com.pulumi.alicloud.dts.SubscriptionJob;
import com.pulumi.alicloud.dts.SubscriptionJobArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var example = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
final var exampleGetZones = RdsFunctions.getZones(GetZonesArgs.builder()
.engine("MySQL")
.engineVersion("8.0")
.instanceChargeType("PostPaid")
.category("Basic")
.dbInstanceStorageType("cloud_essd")
.build());
final var exampleGetInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
.zoneId(exampleGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.engine("MySQL")
.engineVersion("8.0")
.instanceChargeType("PostPaid")
.category("Basic")
.dbInstanceStorageType("cloud_essd")
.build());
var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.16.0.0/16")
.build());
var exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()
.vpcId(exampleNetwork.id())
.cidrBlock("172.16.0.0/24")
.zoneId(exampleGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vswitchName(name)
.build());
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.vpcId(exampleNetwork.id())
.build());
var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
.engine("MySQL")
.engineVersion("8.0")
.instanceType(exampleGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].instanceClass()))
.instanceStorage(exampleGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].storageRange().min()))
.instanceChargeType("Postpaid")
.instanceName(name)
.vswitchId(exampleSwitch.id())
.monitoringPeriod("60")
.dbInstanceStorageType("cloud_essd")
.securityGroupIds(exampleSecurityGroup.id())
.build());
var exampleRdsAccount = new RdsAccount("exampleRdsAccount", RdsAccountArgs.builder()
.dbInstanceId(exampleInstance.id())
.accountName("test_mysql")
.accountPassword("N1cetest")
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.instanceId(exampleInstance.id())
.name(name)
.build());
var exampleAccountPrivilege = new AccountPrivilege("exampleAccountPrivilege", AccountPrivilegeArgs.builder()
.instanceId(exampleInstance.id())
.accountName(exampleRdsAccount.accountName())
.privilege("ReadWrite")
.dbNames(exampleDatabase.name())
.build());
var exampleSubscriptionJob = new SubscriptionJob("exampleSubscriptionJob", SubscriptionJobArgs.builder()
.dtsJobName(name)
.paymentType("PayAsYouGo")
.sourceEndpointEngineName("MySQL")
.sourceEndpointRegion(example.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()))
.sourceEndpointInstanceType("RDS")
.sourceEndpointInstanceId(exampleInstance.id())
.sourceEndpointDatabaseName(exampleDatabase.name())
.sourceEndpointUserName(exampleRdsAccount.accountName())
.sourceEndpointPassword(exampleRdsAccount.accountPassword())
.dbList(Output.tuple(exampleDatabase.name(), exampleDatabase.name()).applyValue(values -> {
var exampleDatabaseName = values.t1;
var exampleDatabaseName1 = values.t2;
return serializeJson(
jsonObject(
jsonProperty(exampleDatabaseName, jsonObject(
jsonProperty("name", exampleDatabaseName1),
jsonProperty("all", true)
))
));
}))
.subscriptionInstanceNetworkType("vpc")
.subscriptionInstanceVpcId(exampleNetwork.id())
.subscriptionInstanceVswitchId(exampleSwitch.id())
.status("Normal")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
exampleNetwork:
type: alicloud:vpc:Network
name: example
properties:
vpcName: ${name}
cidrBlock: 172.16.0.0/16
exampleSwitch:
type: alicloud:vpc:Switch
name: example
properties:
vpcId: ${exampleNetwork.id}
cidrBlock: 172.16.0.0/24
zoneId: ${exampleGetZones.zones[0].id}
vswitchName: ${name}
exampleSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: example
properties:
name: ${name}
vpcId: ${exampleNetwork.id}
exampleInstance:
type: alicloud:rds:Instance
name: example
properties:
engine: MySQL
engineVersion: '8.0'
instanceType: ${exampleGetInstanceClasses.instanceClasses[0].instanceClass}
instanceStorage: ${exampleGetInstanceClasses.instanceClasses[0].storageRange.min}
instanceChargeType: Postpaid
instanceName: ${name}
vswitchId: ${exampleSwitch.id}
monitoringPeriod: '60'
dbInstanceStorageType: cloud_essd
securityGroupIds:
- ${exampleSecurityGroup.id}
exampleRdsAccount:
type: alicloud:rds:RdsAccount
name: example
properties:
dbInstanceId: ${exampleInstance.id}
accountName: test_mysql
accountPassword: N1cetest
exampleDatabase:
type: alicloud:rds:Database
name: example
properties:
instanceId: ${exampleInstance.id}
name: ${name}
exampleAccountPrivilege:
type: alicloud:rds:AccountPrivilege
name: example
properties:
instanceId: ${exampleInstance.id}
accountName: ${exampleRdsAccount.accountName}
privilege: ReadWrite
dbNames:
- ${exampleDatabase.name}
exampleSubscriptionJob:
type: alicloud:dts:SubscriptionJob
name: example
properties:
dtsJobName: ${name}
paymentType: PayAsYouGo
sourceEndpointEngineName: MySQL
sourceEndpointRegion: ${example.regions[0].id}
sourceEndpointInstanceType: RDS
sourceEndpointInstanceId: ${exampleInstance.id}
sourceEndpointDatabaseName: ${exampleDatabase.name}
sourceEndpointUserName: ${exampleRdsAccount.accountName}
sourceEndpointPassword: ${exampleRdsAccount.accountPassword}
dbList:
fn::toJSON:
${exampleDatabase.name}:
name: ${exampleDatabase.name}
all: true
subscriptionInstanceNetworkType: vpc
subscriptionInstanceVpcId: ${exampleNetwork.id}
subscriptionInstanceVswitchId: ${exampleSwitch.id}
status: Normal
variables:
example:
fn::invoke:
Function: alicloud:getRegions
Arguments:
current: true
exampleGetZones:
fn::invoke:
Function: alicloud:rds:getZones
Arguments:
engine: MySQL
engineVersion: '8.0'
instanceChargeType: PostPaid
category: Basic
dbInstanceStorageType: cloud_essd
exampleGetInstanceClasses:
fn::invoke:
Function: alicloud:rds:getInstanceClasses
Arguments:
zoneId: ${exampleGetZones.zones[0].id}
engine: MySQL
engineVersion: '8.0'
instanceChargeType: PostPaid
category: Basic
dbInstanceStorageType: cloud_essd
Create SubscriptionJob Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SubscriptionJob(name: string, args: SubscriptionJobArgs, opts?: CustomResourceOptions);
@overload
def SubscriptionJob(resource_name: str,
args: SubscriptionJobArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SubscriptionJob(resource_name: str,
opts: Optional[ResourceOptions] = None,
payment_type: Optional[str] = None,
source_endpoint_region: Optional[str] = None,
source_endpoint_instance_type: Optional[str] = None,
source_endpoint_engine_name: Optional[str] = None,
dts_instance_id: Optional[str] = None,
database_count: Optional[int] = None,
delay_rule_time: Optional[str] = None,
destination_endpoint_engine_name: Optional[str] = None,
destination_region: Optional[str] = None,
checkpoint: Optional[str] = None,
dts_job_name: Optional[str] = None,
error_notice: Optional[bool] = None,
error_phone: Optional[str] = None,
instance_class: Optional[str] = None,
payment_duration: Optional[int] = None,
payment_duration_unit: Optional[str] = None,
delay_notice: Optional[bool] = None,
reserve: Optional[str] = None,
source_endpoint_database_name: Optional[str] = None,
db_list: Optional[str] = None,
source_endpoint_instance_id: Optional[str] = None,
delay_phone: Optional[str] = None,
source_endpoint_ip: Optional[str] = None,
source_endpoint_oracle_sid: Optional[str] = None,
source_endpoint_owner_id: Optional[str] = None,
source_endpoint_password: Optional[str] = None,
source_endpoint_port: Optional[str] = None,
compute_unit: Optional[int] = None,
source_endpoint_role: Optional[str] = None,
source_endpoint_user_name: Optional[str] = None,
status: Optional[str] = None,
subscription_data_type_ddl: Optional[bool] = None,
subscription_data_type_dml: Optional[bool] = None,
subscription_instance_network_type: Optional[str] = None,
subscription_instance_vpc_id: Optional[str] = None,
subscription_instance_vswitch_id: Optional[str] = None,
sync_architecture: Optional[str] = None,
synchronization_direction: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewSubscriptionJob(ctx *Context, name string, args SubscriptionJobArgs, opts ...ResourceOption) (*SubscriptionJob, error)
public SubscriptionJob(string name, SubscriptionJobArgs args, CustomResourceOptions? opts = null)
public SubscriptionJob(String name, SubscriptionJobArgs args)
public SubscriptionJob(String name, SubscriptionJobArgs args, CustomResourceOptions options)
type: alicloud:dts:SubscriptionJob
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 SubscriptionJobArgs
- 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 SubscriptionJobArgs
- 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 SubscriptionJobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubscriptionJobArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var subscriptionJobResource = new AliCloud.Dts.SubscriptionJob("subscriptionJobResource", new()
{
PaymentType = "string",
SourceEndpointRegion = "string",
SourceEndpointInstanceType = "string",
SourceEndpointEngineName = "string",
DtsInstanceId = "string",
DatabaseCount = 0,
DelayRuleTime = "string",
DestinationEndpointEngineName = "string",
DestinationRegion = "string",
Checkpoint = "string",
DtsJobName = "string",
ErrorNotice = false,
ErrorPhone = "string",
InstanceClass = "string",
PaymentDuration = 0,
PaymentDurationUnit = "string",
DelayNotice = false,
Reserve = "string",
SourceEndpointDatabaseName = "string",
DbList = "string",
SourceEndpointInstanceId = "string",
DelayPhone = "string",
SourceEndpointIp = "string",
SourceEndpointOracleSid = "string",
SourceEndpointOwnerId = "string",
SourceEndpointPassword = "string",
SourceEndpointPort = "string",
ComputeUnit = 0,
SourceEndpointRole = "string",
SourceEndpointUserName = "string",
Status = "string",
SubscriptionDataTypeDdl = false,
SubscriptionDataTypeDml = false,
SubscriptionInstanceNetworkType = "string",
SubscriptionInstanceVpcId = "string",
SubscriptionInstanceVswitchId = "string",
SyncArchitecture = "string",
SynchronizationDirection = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := dts.NewSubscriptionJob(ctx, "subscriptionJobResource", &dts.SubscriptionJobArgs{
PaymentType: pulumi.String("string"),
SourceEndpointRegion: pulumi.String("string"),
SourceEndpointInstanceType: pulumi.String("string"),
SourceEndpointEngineName: pulumi.String("string"),
DtsInstanceId: pulumi.String("string"),
DatabaseCount: pulumi.Int(0),
DelayRuleTime: pulumi.String("string"),
DestinationEndpointEngineName: pulumi.String("string"),
DestinationRegion: pulumi.String("string"),
Checkpoint: pulumi.String("string"),
DtsJobName: pulumi.String("string"),
ErrorNotice: pulumi.Bool(false),
ErrorPhone: pulumi.String("string"),
InstanceClass: pulumi.String("string"),
PaymentDuration: pulumi.Int(0),
PaymentDurationUnit: pulumi.String("string"),
DelayNotice: pulumi.Bool(false),
Reserve: pulumi.String("string"),
SourceEndpointDatabaseName: pulumi.String("string"),
DbList: pulumi.String("string"),
SourceEndpointInstanceId: pulumi.String("string"),
DelayPhone: pulumi.String("string"),
SourceEndpointIp: pulumi.String("string"),
SourceEndpointOracleSid: pulumi.String("string"),
SourceEndpointOwnerId: pulumi.String("string"),
SourceEndpointPassword: pulumi.String("string"),
SourceEndpointPort: pulumi.String("string"),
ComputeUnit: pulumi.Int(0),
SourceEndpointRole: pulumi.String("string"),
SourceEndpointUserName: pulumi.String("string"),
Status: pulumi.String("string"),
SubscriptionDataTypeDdl: pulumi.Bool(false),
SubscriptionDataTypeDml: pulumi.Bool(false),
SubscriptionInstanceNetworkType: pulumi.String("string"),
SubscriptionInstanceVpcId: pulumi.String("string"),
SubscriptionInstanceVswitchId: pulumi.String("string"),
SyncArchitecture: pulumi.String("string"),
SynchronizationDirection: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var subscriptionJobResource = new SubscriptionJob("subscriptionJobResource", SubscriptionJobArgs.builder()
.paymentType("string")
.sourceEndpointRegion("string")
.sourceEndpointInstanceType("string")
.sourceEndpointEngineName("string")
.dtsInstanceId("string")
.databaseCount(0)
.delayRuleTime("string")
.destinationEndpointEngineName("string")
.destinationRegion("string")
.checkpoint("string")
.dtsJobName("string")
.errorNotice(false)
.errorPhone("string")
.instanceClass("string")
.paymentDuration(0)
.paymentDurationUnit("string")
.delayNotice(false)
.reserve("string")
.sourceEndpointDatabaseName("string")
.dbList("string")
.sourceEndpointInstanceId("string")
.delayPhone("string")
.sourceEndpointIp("string")
.sourceEndpointOracleSid("string")
.sourceEndpointOwnerId("string")
.sourceEndpointPassword("string")
.sourceEndpointPort("string")
.computeUnit(0)
.sourceEndpointRole("string")
.sourceEndpointUserName("string")
.status("string")
.subscriptionDataTypeDdl(false)
.subscriptionDataTypeDml(false)
.subscriptionInstanceNetworkType("string")
.subscriptionInstanceVpcId("string")
.subscriptionInstanceVswitchId("string")
.syncArchitecture("string")
.synchronizationDirection("string")
.tags(Map.of("string", "string"))
.build());
subscription_job_resource = alicloud.dts.SubscriptionJob("subscriptionJobResource",
payment_type="string",
source_endpoint_region="string",
source_endpoint_instance_type="string",
source_endpoint_engine_name="string",
dts_instance_id="string",
database_count=0,
delay_rule_time="string",
destination_endpoint_engine_name="string",
destination_region="string",
checkpoint="string",
dts_job_name="string",
error_notice=False,
error_phone="string",
instance_class="string",
payment_duration=0,
payment_duration_unit="string",
delay_notice=False,
reserve="string",
source_endpoint_database_name="string",
db_list="string",
source_endpoint_instance_id="string",
delay_phone="string",
source_endpoint_ip="string",
source_endpoint_oracle_sid="string",
source_endpoint_owner_id="string",
source_endpoint_password="string",
source_endpoint_port="string",
compute_unit=0,
source_endpoint_role="string",
source_endpoint_user_name="string",
status="string",
subscription_data_type_ddl=False,
subscription_data_type_dml=False,
subscription_instance_network_type="string",
subscription_instance_vpc_id="string",
subscription_instance_vswitch_id="string",
sync_architecture="string",
synchronization_direction="string",
tags={
"string": "string",
})
const subscriptionJobResource = new alicloud.dts.SubscriptionJob("subscriptionJobResource", {
paymentType: "string",
sourceEndpointRegion: "string",
sourceEndpointInstanceType: "string",
sourceEndpointEngineName: "string",
dtsInstanceId: "string",
databaseCount: 0,
delayRuleTime: "string",
destinationEndpointEngineName: "string",
destinationRegion: "string",
checkpoint: "string",
dtsJobName: "string",
errorNotice: false,
errorPhone: "string",
instanceClass: "string",
paymentDuration: 0,
paymentDurationUnit: "string",
delayNotice: false,
reserve: "string",
sourceEndpointDatabaseName: "string",
dbList: "string",
sourceEndpointInstanceId: "string",
delayPhone: "string",
sourceEndpointIp: "string",
sourceEndpointOracleSid: "string",
sourceEndpointOwnerId: "string",
sourceEndpointPassword: "string",
sourceEndpointPort: "string",
computeUnit: 0,
sourceEndpointRole: "string",
sourceEndpointUserName: "string",
status: "string",
subscriptionDataTypeDdl: false,
subscriptionDataTypeDml: false,
subscriptionInstanceNetworkType: "string",
subscriptionInstanceVpcId: "string",
subscriptionInstanceVswitchId: "string",
syncArchitecture: "string",
synchronizationDirection: "string",
tags: {
string: "string",
},
});
type: alicloud:dts:SubscriptionJob
properties:
checkpoint: string
computeUnit: 0
databaseCount: 0
dbList: string
delayNotice: false
delayPhone: string
delayRuleTime: string
destinationEndpointEngineName: string
destinationRegion: string
dtsInstanceId: string
dtsJobName: string
errorNotice: false
errorPhone: string
instanceClass: string
paymentDuration: 0
paymentDurationUnit: string
paymentType: string
reserve: string
sourceEndpointDatabaseName: string
sourceEndpointEngineName: string
sourceEndpointInstanceId: string
sourceEndpointInstanceType: string
sourceEndpointIp: string
sourceEndpointOracleSid: string
sourceEndpointOwnerId: string
sourceEndpointPassword: string
sourceEndpointPort: string
sourceEndpointRegion: string
sourceEndpointRole: string
sourceEndpointUserName: string
status: string
subscriptionDataTypeDdl: false
subscriptionDataTypeDml: false
subscriptionInstanceNetworkType: string
subscriptionInstanceVpcId: string
subscriptionInstanceVswitchId: string
syncArchitecture: string
synchronizationDirection: string
tags:
string: string
SubscriptionJob 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 SubscriptionJob resource accepts the following input properties:
- Payment
Type string - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - Source
Endpoint stringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - Source
Endpoint stringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - Source
Endpoint stringRegion - The region of source database.
- Checkpoint string
- Subscription start time in Unix timestamp format.
- Compute
Unit int - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- Database
Count int - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - Db
List string - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- Delay
Notice bool - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - Delay
Phone string - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Delay
Rule stringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - Destination
Endpoint stringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - Destination
Region string - The destination region. List of supported regions.
- Dts
Instance stringId - The ID of subscription instance.
- Dts
Job stringName - The name of subscription task.
- Error
Notice bool - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - Error
Phone string - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Instance
Class string - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - Payment
Duration int - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - Payment
Duration stringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - Reserve string
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- Source
Endpoint stringDatabase Name - To subscribe to the name of the database.
- Source
Endpoint stringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- Source
Endpoint stringIp - The IP of source endpoint.
- Source
Endpoint stringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- Source
Endpoint stringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- Source
Endpoint stringPassword - The password of source database instance account.
- Source
Endpoint stringPort - The port of source database.
- Source
Endpoint stringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- Source
Endpoint stringUser Name - The username of source database instance account.
- Status string
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - Subscription
Data boolType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - Subscription
Data boolType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - Subscription
Instance stringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - Subscription
Instance stringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Subscription
Instance stringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Sync
Architecture string - The sync architecture. Valid values:
bidirectional
,oneway
. - Synchronization
Direction string - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Payment
Type string - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - Source
Endpoint stringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - Source
Endpoint stringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - Source
Endpoint stringRegion - The region of source database.
- Checkpoint string
- Subscription start time in Unix timestamp format.
- Compute
Unit int - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- Database
Count int - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - Db
List string - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- Delay
Notice bool - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - Delay
Phone string - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Delay
Rule stringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - Destination
Endpoint stringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - Destination
Region string - The destination region. List of supported regions.
- Dts
Instance stringId - The ID of subscription instance.
- Dts
Job stringName - The name of subscription task.
- Error
Notice bool - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - Error
Phone string - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Instance
Class string - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - Payment
Duration int - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - Payment
Duration stringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - Reserve string
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- Source
Endpoint stringDatabase Name - To subscribe to the name of the database.
- Source
Endpoint stringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- Source
Endpoint stringIp - The IP of source endpoint.
- Source
Endpoint stringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- Source
Endpoint stringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- Source
Endpoint stringPassword - The password of source database instance account.
- Source
Endpoint stringPort - The port of source database.
- Source
Endpoint stringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- Source
Endpoint stringUser Name - The username of source database instance account.
- Status string
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - Subscription
Data boolType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - Subscription
Data boolType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - Subscription
Instance stringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - Subscription
Instance stringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Subscription
Instance stringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Sync
Architecture string - The sync architecture. Valid values:
bidirectional
,oneway
. - Synchronization
Direction string - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - map[string]string
- A mapping of tags to assign to the resource.
- payment
Type String - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - source
Endpoint StringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source
Endpoint StringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source
Endpoint StringRegion - The region of source database.
- checkpoint String
- Subscription start time in Unix timestamp format.
- compute
Unit Integer - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database
Count Integer - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db
List String - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay
Notice Boolean - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay
Phone String - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay
Rule StringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination
Endpoint StringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination
Region String - The destination region. List of supported regions.
- dts
Instance StringId - The ID of subscription instance.
- dts
Job StringName - The name of subscription task.
- error
Notice Boolean - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error
Phone String - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance
Class String - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment
Duration Integer - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Duration StringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - reserve String
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source
Endpoint StringDatabase Name - To subscribe to the name of the database.
- source
Endpoint StringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source
Endpoint StringIp - The IP of source endpoint.
- source
Endpoint StringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source
Endpoint StringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source
Endpoint StringPassword - The password of source database instance account.
- source
Endpoint StringPort - The port of source database.
- source
Endpoint StringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source
Endpoint StringUser Name - The username of source database instance account.
- status String
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription
Data BooleanType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription
Data BooleanType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription
Instance StringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription
Instance StringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription
Instance StringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync
Architecture String - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization
Direction String - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Map<String,String>
- A mapping of tags to assign to the resource.
- payment
Type string - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - source
Endpoint stringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source
Endpoint stringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source
Endpoint stringRegion - The region of source database.
- checkpoint string
- Subscription start time in Unix timestamp format.
- compute
Unit number - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database
Count number - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db
List string - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay
Notice boolean - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay
Phone string - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay
Rule stringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination
Endpoint stringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination
Region string - The destination region. List of supported regions.
- dts
Instance stringId - The ID of subscription instance.
- dts
Job stringName - The name of subscription task.
- error
Notice boolean - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error
Phone string - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance
Class string - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment
Duration number - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Duration stringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - reserve string
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source
Endpoint stringDatabase Name - To subscribe to the name of the database.
- source
Endpoint stringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source
Endpoint stringIp - The IP of source endpoint.
- source
Endpoint stringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source
Endpoint stringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source
Endpoint stringPassword - The password of source database instance account.
- source
Endpoint stringPort - The port of source database.
- source
Endpoint stringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source
Endpoint stringUser Name - The username of source database instance account.
- status string
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription
Data booleanType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription
Data booleanType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription
Instance stringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription
Instance stringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription
Instance stringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync
Architecture string - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization
Direction string - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- payment_
type str - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - source_
endpoint_ strengine_ name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source_
endpoint_ strinstance_ type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source_
endpoint_ strregion - The region of source database.
- checkpoint str
- Subscription start time in Unix timestamp format.
- compute_
unit int - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database_
count int - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db_
list str - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay_
notice bool - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay_
phone str - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay_
rule_ strtime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination_
endpoint_ strengine_ name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination_
region str - The destination region. List of supported regions.
- dts_
instance_ strid - The ID of subscription instance.
- dts_
job_ strname - The name of subscription task.
- error_
notice bool - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error_
phone str - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance_
class str - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment_
duration int - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment_
duration_ strunit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - reserve str
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source_
endpoint_ strdatabase_ name - To subscribe to the name of the database.
- source_
endpoint_ strinstance_ id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source_
endpoint_ strip - The IP of source endpoint.
- source_
endpoint_ stroracle_ sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source_
endpoint_ strowner_ id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source_
endpoint_ strpassword - The password of source database instance account.
- source_
endpoint_ strport - The port of source database.
- source_
endpoint_ strrole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source_
endpoint_ struser_ name - The username of source database instance account.
- status str
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription_
data_ booltype_ ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription_
data_ booltype_ dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription_
instance_ strnetwork_ type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription_
instance_ strvpc_ id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription_
instance_ strvswitch_ id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync_
architecture str - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization_
direction str - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- payment
Type String - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - source
Endpoint StringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source
Endpoint StringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source
Endpoint StringRegion - The region of source database.
- checkpoint String
- Subscription start time in Unix timestamp format.
- compute
Unit Number - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database
Count Number - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db
List String - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay
Notice Boolean - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay
Phone String - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay
Rule StringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination
Endpoint StringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination
Region String - The destination region. List of supported regions.
- dts
Instance StringId - The ID of subscription instance.
- dts
Job StringName - The name of subscription task.
- error
Notice Boolean - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error
Phone String - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance
Class String - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment
Duration Number - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Duration StringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - reserve String
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source
Endpoint StringDatabase Name - To subscribe to the name of the database.
- source
Endpoint StringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source
Endpoint StringIp - The IP of source endpoint.
- source
Endpoint StringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source
Endpoint StringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source
Endpoint StringPassword - The password of source database instance account.
- source
Endpoint StringPort - The port of source database.
- source
Endpoint StringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source
Endpoint StringUser Name - The username of source database instance account.
- status String
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription
Data BooleanType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription
Data BooleanType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription
Instance StringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription
Instance StringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription
Instance StringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync
Architecture String - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization
Direction String - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the SubscriptionJob 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 SubscriptionJob Resource
Get an existing SubscriptionJob 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?: SubscriptionJobState, opts?: CustomResourceOptions): SubscriptionJob
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
checkpoint: Optional[str] = None,
compute_unit: Optional[int] = None,
database_count: Optional[int] = None,
db_list: Optional[str] = None,
delay_notice: Optional[bool] = None,
delay_phone: Optional[str] = None,
delay_rule_time: Optional[str] = None,
destination_endpoint_engine_name: Optional[str] = None,
destination_region: Optional[str] = None,
dts_instance_id: Optional[str] = None,
dts_job_name: Optional[str] = None,
error_notice: Optional[bool] = None,
error_phone: Optional[str] = None,
instance_class: Optional[str] = None,
payment_duration: Optional[int] = None,
payment_duration_unit: Optional[str] = None,
payment_type: Optional[str] = None,
reserve: Optional[str] = None,
source_endpoint_database_name: Optional[str] = None,
source_endpoint_engine_name: Optional[str] = None,
source_endpoint_instance_id: Optional[str] = None,
source_endpoint_instance_type: Optional[str] = None,
source_endpoint_ip: Optional[str] = None,
source_endpoint_oracle_sid: Optional[str] = None,
source_endpoint_owner_id: Optional[str] = None,
source_endpoint_password: Optional[str] = None,
source_endpoint_port: Optional[str] = None,
source_endpoint_region: Optional[str] = None,
source_endpoint_role: Optional[str] = None,
source_endpoint_user_name: Optional[str] = None,
status: Optional[str] = None,
subscription_data_type_ddl: Optional[bool] = None,
subscription_data_type_dml: Optional[bool] = None,
subscription_instance_network_type: Optional[str] = None,
subscription_instance_vpc_id: Optional[str] = None,
subscription_instance_vswitch_id: Optional[str] = None,
sync_architecture: Optional[str] = None,
synchronization_direction: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> SubscriptionJob
func GetSubscriptionJob(ctx *Context, name string, id IDInput, state *SubscriptionJobState, opts ...ResourceOption) (*SubscriptionJob, error)
public static SubscriptionJob Get(string name, Input<string> id, SubscriptionJobState? state, CustomResourceOptions? opts = null)
public static SubscriptionJob get(String name, Output<String> id, SubscriptionJobState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Checkpoint string
- Subscription start time in Unix timestamp format.
- Compute
Unit int - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- Database
Count int - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - Db
List string - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- Delay
Notice bool - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - Delay
Phone string - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Delay
Rule stringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - Destination
Endpoint stringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - Destination
Region string - The destination region. List of supported regions.
- Dts
Instance stringId - The ID of subscription instance.
- Dts
Job stringName - The name of subscription task.
- Error
Notice bool - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - Error
Phone string - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Instance
Class string - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - Payment
Duration int - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - Payment
Duration stringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - Payment
Type string - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - Reserve string
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- Source
Endpoint stringDatabase Name - To subscribe to the name of the database.
- Source
Endpoint stringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - Source
Endpoint stringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- Source
Endpoint stringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - Source
Endpoint stringIp - The IP of source endpoint.
- Source
Endpoint stringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- Source
Endpoint stringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- Source
Endpoint stringPassword - The password of source database instance account.
- Source
Endpoint stringPort - The port of source database.
- Source
Endpoint stringRegion - The region of source database.
- Source
Endpoint stringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- Source
Endpoint stringUser Name - The username of source database instance account.
- Status string
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - Subscription
Data boolType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - Subscription
Data boolType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - Subscription
Instance stringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - Subscription
Instance stringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Subscription
Instance stringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Sync
Architecture string - The sync architecture. Valid values:
bidirectional
,oneway
. - Synchronization
Direction string - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Checkpoint string
- Subscription start time in Unix timestamp format.
- Compute
Unit int - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- Database
Count int - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - Db
List string - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- Delay
Notice bool - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - Delay
Phone string - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Delay
Rule stringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - Destination
Endpoint stringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - Destination
Region string - The destination region. List of supported regions.
- Dts
Instance stringId - The ID of subscription instance.
- Dts
Job stringName - The name of subscription task.
- Error
Notice bool - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - Error
Phone string - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - Instance
Class string - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - Payment
Duration int - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - Payment
Duration stringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - Payment
Type string - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - Reserve string
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- Source
Endpoint stringDatabase Name - To subscribe to the name of the database.
- Source
Endpoint stringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - Source
Endpoint stringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- Source
Endpoint stringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - Source
Endpoint stringIp - The IP of source endpoint.
- Source
Endpoint stringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- Source
Endpoint stringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- Source
Endpoint stringPassword - The password of source database instance account.
- Source
Endpoint stringPort - The port of source database.
- Source
Endpoint stringRegion - The region of source database.
- Source
Endpoint stringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- Source
Endpoint stringUser Name - The username of source database instance account.
- Status string
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - Subscription
Data boolType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - Subscription
Data boolType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - Subscription
Instance stringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - Subscription
Instance stringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Subscription
Instance stringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - Sync
Architecture string - The sync architecture. Valid values:
bidirectional
,oneway
. - Synchronization
Direction string - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - map[string]string
- A mapping of tags to assign to the resource.
- checkpoint String
- Subscription start time in Unix timestamp format.
- compute
Unit Integer - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database
Count Integer - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db
List String - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay
Notice Boolean - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay
Phone String - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay
Rule StringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination
Endpoint StringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination
Region String - The destination region. List of supported regions.
- dts
Instance StringId - The ID of subscription instance.
- dts
Job StringName - The name of subscription task.
- error
Notice Boolean - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error
Phone String - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance
Class String - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment
Duration Integer - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Duration StringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Type String - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - reserve String
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source
Endpoint StringDatabase Name - To subscribe to the name of the database.
- source
Endpoint StringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source
Endpoint StringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source
Endpoint StringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source
Endpoint StringIp - The IP of source endpoint.
- source
Endpoint StringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source
Endpoint StringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source
Endpoint StringPassword - The password of source database instance account.
- source
Endpoint StringPort - The port of source database.
- source
Endpoint StringRegion - The region of source database.
- source
Endpoint StringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source
Endpoint StringUser Name - The username of source database instance account.
- status String
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription
Data BooleanType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription
Data BooleanType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription
Instance StringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription
Instance StringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription
Instance StringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync
Architecture String - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization
Direction String - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Map<String,String>
- A mapping of tags to assign to the resource.
- checkpoint string
- Subscription start time in Unix timestamp format.
- compute
Unit number - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database
Count number - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db
List string - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay
Notice boolean - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay
Phone string - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay
Rule stringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination
Endpoint stringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination
Region string - The destination region. List of supported regions.
- dts
Instance stringId - The ID of subscription instance.
- dts
Job stringName - The name of subscription task.
- error
Notice boolean - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error
Phone string - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance
Class string - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment
Duration number - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Duration stringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Type string - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - reserve string
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source
Endpoint stringDatabase Name - To subscribe to the name of the database.
- source
Endpoint stringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source
Endpoint stringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source
Endpoint stringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source
Endpoint stringIp - The IP of source endpoint.
- source
Endpoint stringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source
Endpoint stringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source
Endpoint stringPassword - The password of source database instance account.
- source
Endpoint stringPort - The port of source database.
- source
Endpoint stringRegion - The region of source database.
- source
Endpoint stringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source
Endpoint stringUser Name - The username of source database instance account.
- status string
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription
Data booleanType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription
Data booleanType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription
Instance stringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription
Instance stringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription
Instance stringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync
Architecture string - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization
Direction string - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- checkpoint str
- Subscription start time in Unix timestamp format.
- compute_
unit int - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database_
count int - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db_
list str - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay_
notice bool - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay_
phone str - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay_
rule_ strtime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination_
endpoint_ strengine_ name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination_
region str - The destination region. List of supported regions.
- dts_
instance_ strid - The ID of subscription instance.
- dts_
job_ strname - The name of subscription task.
- error_
notice bool - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error_
phone str - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance_
class str - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment_
duration int - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment_
duration_ strunit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - payment_
type str - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - reserve str
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source_
endpoint_ strdatabase_ name - To subscribe to the name of the database.
- source_
endpoint_ strengine_ name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source_
endpoint_ strinstance_ id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source_
endpoint_ strinstance_ type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source_
endpoint_ strip - The IP of source endpoint.
- source_
endpoint_ stroracle_ sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source_
endpoint_ strowner_ id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source_
endpoint_ strpassword - The password of source database instance account.
- source_
endpoint_ strport - The port of source database.
- source_
endpoint_ strregion - The region of source database.
- source_
endpoint_ strrole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source_
endpoint_ struser_ name - The username of source database instance account.
- status str
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription_
data_ booltype_ ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription_
data_ booltype_ dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription_
instance_ strnetwork_ type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription_
instance_ strvpc_ id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription_
instance_ strvswitch_ id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync_
architecture str - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization_
direction str - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- checkpoint String
- Subscription start time in Unix timestamp format.
- compute
Unit Number - ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
- database
Count Number - The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when
source_endpoint_engine_name
equalsdrds
. - db
List String - Subscription object, in the format of JSON strings. For detailed definitions, please refer to the description of migration, synchronization or subscription objects document.
- delay
Notice Boolean - This parameter decides whether to monitor the delay status. Valid values:
true
,false
. - delay
Phone String - The mobile phone number of the contact who delayed the alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - delay
Rule StringTime - When
delay_notice
is set totrue
, this parameter must be passed in. The threshold for triggering the delay alarm. The unit is second and needs to be an integer. The threshold can be set according to business needs. It is recommended to set it above 10 seconds to avoid delay fluctuations caused by network and database load. - destination
Endpoint StringEngine Name - The destination endpoint engine name. Valid values:
ADS
,DB2
,DRDS
,DataHub
,Greenplum
,MSSQL
,MySQL
,PolarDB
,PostgreSQL
,Redis
,Tablestore
,as400
,clickhouse
,kafka
,mongodb
,odps
,oracle
,polardb_o
,polardb_pg
,tidb
. - destination
Region String - The destination region. List of supported regions.
- dts
Instance StringId - The ID of subscription instance.
- dts
Job StringName - The name of subscription task.
- error
Notice Boolean - This parameter decides whether to monitor abnormal status. Valid values:
true
,false
. - error
Phone String - The mobile phone number of the contact for abnormal alarm. Multiple mobile phone numbers separated by English commas
,
. This parameter currently only supports China stations, and only supports mainland mobile phone numbers, and up to 10 mobile phone numbers can be passed in. - instance
Class String - The instance class. Valid values:
large
,medium
,micro
,small
,xlarge
,xxlarge
. - payment
Duration Number - The duration of prepaid instance purchase. When
payment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Duration StringUnit - The payment duration unit. Valid values:
Month
,Year
. Whenpayment_type
isSubscription
, this parameter is valid and must be passed in. - payment
Type String - The payment type of the resource. Valid values:
Subscription
,PayAsYouGo
. - reserve String
- DTS reserves parameters, the format is a JSON string, you can pass in this parameter to complete the source and target database information (such as the data storage format of the target Kafka database, the instance ID of the cloud enterprise network CEN). For more information, please refer to the parameter description of the Reserve parameter.
- source
Endpoint StringDatabase Name - To subscribe to the name of the database.
- source
Endpoint StringEngine Name - The source database type value is MySQL or Oracle. Valid values:
MySQL
,Oracle
. - source
Endpoint StringInstance Id - The ID of source instance. Only when the type of source database instance was RDS MySQL, PolarDB-X 1.0, PolarDB MySQL, this parameter can be available and must be set.
- source
Endpoint StringInstance Type - The type of source instance. Valid values:
RDS
,PolarDB
,DRDS
,LocalInstance
,ECS
,Express
,CEN
,dg
. - source
Endpoint StringIp - The IP of source endpoint.
- source
Endpoint StringOracle Sid - The SID of Oracle Database. When the source database is self-built Oracle and the Oracle database is a non-RAC instance, this parameter is available and must be passed in.
- source
Endpoint StringOwner Id - The Alibaba Cloud account ID to which the source instance belongs. This parameter is only available when configuring data subscriptions across Alibaba Cloud accounts and must be passed in.
- source
Endpoint StringPassword - The password of source database instance account.
- source
Endpoint StringPort - The port of source database.
- source
Endpoint StringRegion - The region of source database.
- source
Endpoint StringRole - Both the authorization roles. When the source instance and configure subscriptions task of the Alibaba Cloud account is not the same as the need to pass the parameter, to specify the source of the authorization roles, to allow configuration subscription task of the Alibaba Cloud account to access the source of the source instance information.
- source
Endpoint StringUser Name - The username of source database instance account.
- status String
- The status of the task. Valid values:
Normal
,Abnormal
. When a task created, it is in this state ofNotStarted
. You can specify this state toNormal
to start the job, and specify this state ofAbnormal
to stop the job. Note: We treat the stateStarting
as the state ofNormal
, and consider the two states to be consistent on the user side. - subscription
Data BooleanType Ddl - Whether to subscribe the DDL type of data. Valid values:
true
,false
. - subscription
Data BooleanType Dml - Whether to subscribe the DML type of data. Valid values:
true
,false
. - subscription
Instance StringNetwork Type - Subscription task type of network value: classic: classic Network. Virtual Private Cloud (vpc): a vpc. Valid values:
classic
,vpc
. - subscription
Instance StringVpc Id - The ID of subscription vpc instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - subscription
Instance StringVswitch Id - The ID of subscription VSwitch instance. When the value of
subscription_instance_network_type
is vpc, this parameter is available and must be passed in. - sync
Architecture String - The sync architecture. Valid values:
bidirectional
,oneway
. - synchronization
Direction String - The synchronization direction. Valid values:
Forward
,Reverse
. When the topology type of the data synchronization instance is bidirectional, it can be passed in to reverse to start the reverse synchronization link. - Map<String>
- A mapping of tags to assign to the resource.
Import
DTS Subscription Job can be imported using the id, e.g.
$ pulumi import alicloud:dts/subscriptionJob:SubscriptionJob example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.