All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.dms.ReplicationTask Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.72.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.dms;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.dms.ReplicationTaskArgs;
import com.pulumi.aws.dms.inputs.ReplicationTaskState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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 `start_replication_task` to resume the task afterwards.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.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) {
 *         // 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import replication tasks using the `replication_task_id`. For example: * * ```sh * $ pulumi import aws:dms/replicationTask:ReplicationTask test test-dms-replication-task-tf * ``` * */ @ResourceType(type="aws:dms/replicationTask:ReplicationTask") public class ReplicationTask extends com.pulumi.resources.CustomResource { /** * 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](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Task.CDC.html#CHAP_Task.CDC.StartPoint.Native). * */ @Export(name="cdcStartPosition", refs={String.class}, tree="[0]") private Output cdcStartPosition; /** * @return 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](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Task.CDC.html#CHAP_Task.CDC.StartPoint.Native). * */ public Output cdcStartPosition() { return this.cdcStartPosition; } /** * RFC3339 formatted date string or UNIX timestamp for the start of the Change Data Capture (CDC) operation. * */ @Export(name="cdcStartTime", refs={String.class}, tree="[0]") private Output cdcStartTime; /** * @return RFC3339 formatted date string or UNIX timestamp for the start of the Change Data Capture (CDC) operation. * */ public Output> cdcStartTime() { return Codegen.optional(this.cdcStartTime); } /** * Migration type. Can be one of `full-load | cdc | full-load-and-cdc`. * */ @Export(name="migrationType", refs={String.class}, tree="[0]") private Output migrationType; /** * @return Migration type. Can be one of `full-load | cdc | full-load-and-cdc`. * */ public Output migrationType() { return this.migrationType; } /** * ARN of the replication instance. * */ @Export(name="replicationInstanceArn", refs={String.class}, tree="[0]") private Output replicationInstanceArn; /** * @return ARN of the replication instance. * */ public Output replicationInstanceArn() { return this.replicationInstanceArn; } /** * ARN for the replication task. * */ @Export(name="replicationTaskArn", refs={String.class}, tree="[0]") private Output replicationTaskArn; /** * @return ARN for the replication task. * */ public Output replicationTaskArn() { return this.replicationTaskArn; } /** * 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. * */ @Export(name="replicationTaskId", refs={String.class}, tree="[0]") private Output replicationTaskId; /** * @return 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. * */ public Output replicationTaskId() { return this.replicationTaskId; } /** * Escaped JSON string that contains the task settings. For a complete list of task settings, see [Task Settings for AWS Database Migration Service Tasks](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html). Note that `Logging.CloudWatchLogGroup` and `Logging.CloudWatchLogStream` are read only and should not be defined, even as `null`, in the configuration since AWS provides a value for these settings. * */ @Export(name="replicationTaskSettings", refs={String.class}, tree="[0]") private Output replicationTaskSettings; /** * @return Escaped JSON string that contains the task settings. For a complete list of task settings, see [Task Settings for AWS Database Migration Service Tasks](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html). Note that `Logging.CloudWatchLogGroup` and `Logging.CloudWatchLogStream` are read only and should not be defined, even as `null`, in the configuration since AWS provides a value for these settings. * */ public Output replicationTaskSettings() { return this.replicationTaskSettings; } /** * A friendly name for the resource identifier at the end of the EndpointArn response parameter that is returned in the created Endpoint object. * */ @Export(name="resourceIdentifier", refs={String.class}, tree="[0]") private Output resourceIdentifier; /** * @return A friendly name for the resource identifier at the end of the EndpointArn response parameter that is returned in the created Endpoint object. * */ public Output> resourceIdentifier() { return Codegen.optional(this.resourceIdentifier); } /** * ARN that uniquely identifies the source endpoint. * */ @Export(name="sourceEndpointArn", refs={String.class}, tree="[0]") private Output sourceEndpointArn; /** * @return ARN that uniquely identifies the source endpoint. * */ public Output sourceEndpointArn() { return this.sourceEndpointArn; } /** * Whether to run or stop the replication task. * */ @Export(name="startReplicationTask", refs={Boolean.class}, tree="[0]") private Output startReplicationTask; /** * @return Whether to run or stop the replication task. * */ public Output> startReplicationTask() { return Codegen.optional(this.startReplicationTask); } /** * Replication Task status. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return Replication Task status. * */ public Output status() { return this.status; } /** * 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](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html) * */ @Export(name="tableMappings", refs={String.class}, tree="[0]") private Output tableMappings; /** * @return 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](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html) * */ public Output tableMappings() { return this.tableMappings; } /** * A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * * @deprecated * Please use `tags` instead. * */ @Deprecated /* Please use `tags` instead. */ @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tagsAll; /** * @return Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * */ public Output> tagsAll() { return this.tagsAll; } /** * ARN that uniquely identifies the target endpoint. * */ @Export(name="targetEndpointArn", refs={String.class}, tree="[0]") private Output targetEndpointArn; /** * @return ARN that uniquely identifies the target endpoint. * */ public Output targetEndpointArn() { return this.targetEndpointArn; } /** * * @param name The _unique_ name of the resulting resource. */ public ReplicationTask(java.lang.String name) { this(name, ReplicationTaskArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ReplicationTask(java.lang.String name, ReplicationTaskArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ReplicationTask(java.lang.String name, ReplicationTaskArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:dms/replicationTask:ReplicationTask", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ReplicationTask(java.lang.String name, Output id, @Nullable ReplicationTaskState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:dms/replicationTask:ReplicationTask", name, state, makeResourceOptions(options, id), false); } private static ReplicationTaskArgs makeArgs(ReplicationTaskArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ReplicationTaskArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ReplicationTask get(java.lang.String name, Output id, @Nullable ReplicationTaskState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ReplicationTask(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy