ReplicationTask class
Provides a DMS (Data Migration Service) replication task resource. DMS replication tasks can be created, updated, deleted, and imported.
> NOTE: Changing most arguments will stop the task if it is running. You can set startReplicationTask to resume the task afterwards.
Example Usage
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: "1993-05-21T05:50:00Z",
migrationType: "full-load",
replicationInstanceArn: test_dms_replication_instance_tf.replicationInstanceArn,
replicationTaskId: "test-dms-replication-task-tf",
replicationTaskSettings: "...",
sourceEndpointArn: 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: test_dms_target_endpoint_tf.endpointArn,
});
import pulumi
import pulumi_aws as aws
# Create a new replication task
test = aws.dms.ReplicationTask("test",
cdc_start_time="1993-05-21T05:50:00Z",
migration_type="full-load",
replication_instance_arn=test_dms_replication_instance_tf["replicationInstanceArn"],
replication_task_id="test-dms-replication-task-tf",
replication_task_settings="...",
source_endpoint_arn=test_dms_source_endpoint_tf["endpointArn"],
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=test_dms_target_endpoint_tf["endpointArn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
// Create a new replication task
var test = new Aws.Dms.ReplicationTask("test", new()
{
CdcStartTime = "1993-05-21T05:50:00Z",
MigrationType = "full-load",
ReplicationInstanceArn = test_dms_replication_instance_tf.ReplicationInstanceArn,
ReplicationTaskId = "test-dms-replication-task-tf",
ReplicationTaskSettings = "...",
SourceEndpointArn = 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 = test_dms_target_endpoint_tf.EndpointArn,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/dms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new replication task
_, err := dms.NewReplicationTask(ctx, "test", &dms.ReplicationTaskArgs{
CdcStartTime: pulumi.String("1993-05-21T05:50:00Z"),
MigrationType: pulumi.String("full-load"),
ReplicationInstanceArn: pulumi.Any(test_dms_replication_instance_tf.ReplicationInstanceArn),
ReplicationTaskId: pulumi.String("test-dms-replication-task-tf"),
ReplicationTaskSettings: pulumi.String("..."),
SourceEndpointArn: pulumi.Any(test_dms_source_endpoint_tf.EndpointArn),
TableMappings: pulumi.String("{\"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.Any(test_dms_target_endpoint_tf.EndpointArn),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
# Create a new replication task
resource "aws_dms_replicationtask" "test" {
cdc_start_time = "1993-05-21T05:50:00Z"
migration_type = "full-load"
replication_instance_arn = test-dms-replication-instance-tf.replicationInstanceArn
replication_task_id = "test-dms-replication-task-tf"
replication_task_settings = "..."
source_endpoint_arn = test-dms-source-endpoint-tf.endpointArn
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 = test-dms-target-endpoint-tf.endpointArn
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dms.ReplicationTask;
import com.pulumi.aws.dms.ReplicationTaskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
// Create a new replication task
var test = new ReplicationTask("test", ReplicationTaskArgs.builder()
.cdcStartTime("1993-05-21T05:50:00Z")
.migrationType("full-load")
.replicationInstanceArn(test_dms_replication_instance_tf.replicationInstanceArn())
.replicationTaskId("test-dms-replication-task-tf")
.replicationTaskSettings("...")
.sourceEndpointArn(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(Map.of("Name", "test"))
.targetEndpointArn(test_dms_target_endpoint_tf.endpointArn())
.build());
}
}
resources:
# Create a new replication task
test:
type: aws:dms:ReplicationTask
properties:
cdcStartTime: 1993-05-21T05:50:00Z
migrationType: full-load
replicationInstanceArn: ${["test-dms-replication-instance-tf"].replicationInstanceArn}
replicationTaskId: test-dms-replication-task-tf
replicationTaskSettings: '...'
sourceEndpointArn: ${["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: ${["test-dms-target-endpoint-tf"].endpointArn}
Import
Using pulumi import, import replication tasks using the replicationTaskId. For example:
$ pulumi import aws:dms/replicationTask:ReplicationTask test test-dms-replication-task-tf
Constructors
- ReplicationTask(String name, {ReplicationTaskArgs? args, CustomResourceOptions? options})
-
Creates a new ReplicationTask.
nameThe Pulumi resource name.argsArguments used to configure this ReplicationTask. The set of arguments for ReplicationTask.optionsResource options controlling this resource's behavior. - ReplicationTask.reference(String urn)
- Creates a typed reference to an existing ReplicationTask resource.
Properties
-
cdcStartPosition
↔ Output<
String> -
Indicates when you want a change data capture (CDC) operation to start. The value can be a RFC3339 formatted date, a checkpoint, or a LSN/SCN format depending on the source engine. For more information see Determining a CDC native start point.
latefinal
-
cdcStartTime
↔ Output<
String?> -
RFC3339 formatted date string or UNIX timestamp for the start of the Change Data Capture (CDC) operation.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
migrationType
↔ Output<
String> -
Migration type. Can be one of
full-load | cdc | full-load-and-cdc.latefinal -
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
replicationInstanceArn
↔ Output<
String> -
ARN of the replication instance.
latefinal
-
replicationTaskArn
↔ Output<
String> -
ARN for the replication task.
latefinal
-
replicationTaskId
↔ Output<
String> -
Replication task identifier which must contain from 1 to 255 alphanumeric characters or hyphens, first character must be a letter, cannot end with a hyphen, and cannot contain two consecutive hyphens.
latefinal
-
replicationTaskSettings
↔ Output<
String> -
Escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks. Note that
Logging.CloudWatchLogGroupandLogging.CloudWatchLogStreamare read only and should not be defined, even asnull, in the configuration since AWS provides a value for these settings.latefinal -
resourceIdentifier
↔ Output<
String?> -
A friendly name for the resource identifier at the end of the EndpointArn response parameter that is returned in the created Endpoint object.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sourceEndpointArn
↔ Output<
String> -
ARN that uniquely identifies the source endpoint.
latefinal
-
startReplicationTask
↔ Output<
bool?> -
Whether to run or stop the replication task.
latefinal
-
status
↔ Output<
String> -
Replication Task status.
latefinal
-
tableMappings
↔ Output<
String> -
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
latefinal
-
A map of tags to assign to the resource. .If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
targetEndpointArn
↔ Output<
String> -
ARN that uniquely identifies the target endpoint.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {ReplicationTaskState? state, CustomResourceOptions? options}) → ReplicationTask -
Gets an existing ReplicationTask resource's state with the given
nameandid.