ReplicationTask

Provides a DMS (Data Migration Service) replication task resource. DMS replication tasks can be created, updated, deleted, and imported.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new replication task
        var test = new Aws.Dms.ReplicationTask("test", new Aws.Dms.ReplicationTaskArgs
        {
            CdcStartTime = "1484346880",
            MigrationType = "full-load",
            ReplicationInstanceArn = aws_dms_replication_instance.Test_dms_replication_instance_tf.Replication_instance_arn,
            ReplicationTaskId = "test-dms-replication-task-tf",
            ReplicationTaskSettings = "...",
            SourceEndpointArn = aws_dms_endpoint.Test_dms_source_endpoint_tf.Endpoint_arn,
            TableMappings = "{\"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"object-locator\":{\"schema-name\":\"%\",\"table-name\":\"%\"},\"rule-action\":\"include\"}]}",
            Tags = 
            {
                { "Name", "test" },
            },
            TargetEndpointArn = aws_dms_endpoint.Test_dms_target_endpoint_tf.Endpoint_arn,
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/dms"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := dms.NewReplicationTask(ctx, "test", &dms.ReplicationTaskArgs{
            CdcStartTime:            pulumi.String("1484346880"),
            MigrationType:           pulumi.String("full-load"),
            ReplicationInstanceArn:  pulumi.String(aws_dms_replication_instance.Test - dms - replication - instance - tf.Replication_instance_arn),
            ReplicationTaskId:       pulumi.String("test-dms-replication-task-tf"),
            ReplicationTaskSettings: pulumi.String("..."),
            SourceEndpointArn:       pulumi.String(aws_dms_endpoint.Test - dms - source - endpoint - tf.Endpoint_arn),
            TableMappings:           pulumi.String(fmt.Sprintf("%v%v%v%v%v", "{\"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"object-locator\":{\"schema-name\":\"", "%", "\",\"table-name\":\"", "%", "\"},\"rule-action\":\"include\"}]}")),
            Tags: pulumi.StringMap{
                "Name": pulumi.String("test"),
            },
            TargetEndpointArn: pulumi.String(aws_dms_endpoint.Test - dms - target - endpoint - tf.Endpoint_arn),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

# Create a new replication task
test = aws.dms.ReplicationTask("test",
    cdc_start_time=1484346880,
    migration_type="full-load",
    replication_instance_arn=aws_dms_replication_instance["test-dms-replication-instance-tf"]["replication_instance_arn"],
    replication_task_id="test-dms-replication-task-tf",
    replication_task_settings="...",
    source_endpoint_arn=aws_dms_endpoint["test-dms-source-endpoint-tf"]["endpoint_arn"],
    table_mappings="{\"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"object-locator\":{\"schema-name\":\"%\",\"table-name\":\"%\"},\"rule-action\":\"include\"}]}",
    tags={
        "Name": "test",
    },
    target_endpoint_arn=aws_dms_endpoint["test-dms-target-endpoint-tf"]["endpoint_arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Create a new replication task
const test = new aws.dms.ReplicationTask("test", {
    cdcStartTime: "1.48434688e+09",
    migrationType: "full-load",
    replicationInstanceArn: aws_dms_replication_instance_test_dms_replication_instance_tf.replicationInstanceArn,
    replicationTaskId: "test-dms-replication-task-tf",
    replicationTaskSettings: "...",
    sourceEndpointArn: aws_dms_endpoint_test_dms_source_endpoint_tf.endpointArn,
    tableMappings: "{\"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"object-locator\":{\"schema-name\":\"%\",\"table-name\":\"%\"},\"rule-action\":\"include\"}]}",
    tags: {
        Name: "test",
    },
    targetEndpointArn: aws_dms_endpoint_test_dms_target_endpoint_tf.endpointArn,
});

Create a ReplicationTask Resource

def ReplicationTask(resource_name, opts=None, cdc_start_time=None, migration_type=None, replication_instance_arn=None, replication_task_id=None, replication_task_settings=None, source_endpoint_arn=None, table_mappings=None, tags=None, target_endpoint_arn=None, __props__=None);
name string
The unique name of the resource.
args ReplicationTaskArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ReplicationTaskArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ReplicationTaskArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ReplicationTask Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ReplicationTask resource accepts the following input properties:

MigrationType string

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

ReplicationInstanceArn string

The Amazon Resource Name (ARN) of the replication instance.

ReplicationTaskId string

The replication task identifier.

SourceEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

TableMappings string

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

TargetEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

CdcStartTime string

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

ReplicationTaskSettings string

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

MigrationType string

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

ReplicationInstanceArn string

The Amazon Resource Name (ARN) of the replication instance.

ReplicationTaskId string

The replication task identifier.

SourceEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

TableMappings string

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

TargetEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

CdcStartTime string

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

ReplicationTaskSettings string

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

Tags map[string]string

A map of tags to assign to the resource.

migrationType string

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

replicationInstanceArn string

The Amazon Resource Name (ARN) of the replication instance.

replicationTaskId string

The replication task identifier.

sourceEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

tableMappings string

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

targetEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

cdcStartTime string

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

replicationTaskSettings string

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

tags {[key: string]: string}

A map of tags to assign to the resource.

migration_type str

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

replication_instance_arn str

The Amazon Resource Name (ARN) of the replication instance.

replication_task_id str

The replication task identifier.

source_endpoint_arn str

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

table_mappings str

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

target_endpoint_arn str

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

cdc_start_time str

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

replication_task_settings str

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

tags Dict[str, str]

A map of tags to assign to the resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
ReplicationTaskArn string

The Amazon Resource Name (ARN) for the replication task.

Id string
The provider-assigned unique ID for this managed resource.
ReplicationTaskArn string

The Amazon Resource Name (ARN) for the replication task.

id string
The provider-assigned unique ID for this managed resource.
replicationTaskArn string

The Amazon Resource Name (ARN) for the replication task.

id str
The provider-assigned unique ID for this managed resource.
replication_task_arn str

The Amazon Resource Name (ARN) for the replication task.

Look up an Existing ReplicationTask Resource

Get an existing ReplicationTask 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?: ReplicationTaskState, opts?: CustomResourceOptions): ReplicationTask
static get(resource_name, id, opts=None, cdc_start_time=None, migration_type=None, replication_instance_arn=None, replication_task_arn=None, replication_task_id=None, replication_task_settings=None, source_endpoint_arn=None, table_mappings=None, tags=None, target_endpoint_arn=None, __props__=None);
func GetReplicationTask(ctx *Context, name string, id IDInput, state *ReplicationTaskState, opts ...ResourceOption) (*ReplicationTask, error)
public static ReplicationTask Get(string name, Input<string> id, ReplicationTaskState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CdcStartTime string

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

MigrationType string

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

ReplicationInstanceArn string

The Amazon Resource Name (ARN) of the replication instance.

ReplicationTaskArn string

The Amazon Resource Name (ARN) for the replication task.

ReplicationTaskId string

The replication task identifier.

ReplicationTaskSettings string

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

SourceEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

TableMappings string

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

Tags Dictionary<string, string>

A map of tags to assign to the resource.

TargetEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

CdcStartTime string

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

MigrationType string

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

ReplicationInstanceArn string

The Amazon Resource Name (ARN) of the replication instance.

ReplicationTaskArn string

The Amazon Resource Name (ARN) for the replication task.

ReplicationTaskId string

The replication task identifier.

ReplicationTaskSettings string

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

SourceEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

TableMappings string

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

Tags map[string]string

A map of tags to assign to the resource.

TargetEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

cdcStartTime string

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

migrationType string

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

replicationInstanceArn string

The Amazon Resource Name (ARN) of the replication instance.

replicationTaskArn string

The Amazon Resource Name (ARN) for the replication task.

replicationTaskId string

The replication task identifier.

replicationTaskSettings string

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

sourceEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

tableMappings string

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

tags {[key: string]: string}

A map of tags to assign to the resource.

targetEndpointArn string

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

cdc_start_time str

The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.

migration_type str

The migration type. Can be one of full-load | cdc | full-load-and-cdc.

replication_instance_arn str

The Amazon Resource Name (ARN) of the replication instance.

replication_task_arn str

The Amazon Resource Name (ARN) for the replication task.

replication_task_id str

The replication task identifier.

replication_task_settings str

An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks.

source_endpoint_arn str

The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.

table_mappings str

An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data

tags Dict[str, str]

A map of tags to assign to the resource.

target_endpoint_arn str

The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.