ReplicationConfig class

Provides a DMS Serverless replication config resource.

> NOTE: Changing most arguments will stop the replication if it is running. You can set startReplication to resume the replication afterwards.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const name = new aws.dms.ReplicationConfig("name", {
    computeConfig: {
        replicationSubnetGroupId: _default.replicationSubnetGroupId,
        maxCapacityUnits: 64,
        minCapacityUnits: 2,
        preferredMaintenanceWindow: "sun:23:45-mon:00:30",
    },
    replicationConfigIdentifier: "test-dms-serverless-replication-tf",
    resourceIdentifier: "test-dms-serverless-replication-tf",
    replicationType: "cdc",
    sourceEndpointArn: source.endpointArn,
    targetEndpointArn: target.endpointArn,
    tableMappings: `  {
    \\"rules\\":[{\\"rule-type\\":\\"selection\\",\\"rule-id\\":\\"1\\",\\"rule-name\\":\\"1\\",\\"rule-action\\":\\"include\\",\\"object-locator\\":{\\"schema-name\\":\\"%%\\",\\"table-name\\":\\"%%\\"}}]
  }
`,
    startReplication: true,
});
import pulumi
import pulumi_aws as aws

name = aws.dms.ReplicationConfig("name",
    compute_config={
        "replication_subnet_group_id": default["replicationSubnetGroupId"],
        "max_capacity_units": 64,
        "min_capacity_units": 2,
        "preferred_maintenance_window": "sun:23:45-mon:00:30",
    },
    replication_config_identifier="test-dms-serverless-replication-tf",
    resource_identifier="test-dms-serverless-replication-tf",
    replication_type="cdc",
    source_endpoint_arn=source["endpointArn"],
    target_endpoint_arn=target["endpointArn"],
    table_mappings="""  {
    \"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-action\":\"include\",\"object-locator\":{\"schema-name\":\"%%\",\"table-name\":\"%%\"}}]
  }
""",
    start_replication=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var name = new Aws.Dms.ReplicationConfig("name", new()
    {
        ComputeConfig = new Aws.Dms.Inputs.ReplicationConfigComputeConfigArgs
        {
            ReplicationSubnetGroupId = @default.ReplicationSubnetGroupId,
            MaxCapacityUnits = 64,
            MinCapacityUnits = 2,
            PreferredMaintenanceWindow = "sun:23:45-mon:00:30",
        },
        ReplicationConfigIdentifier = "test-dms-serverless-replication-tf",
        ResourceIdentifier = "test-dms-serverless-replication-tf",
        ReplicationType = "cdc",
        SourceEndpointArn = source.EndpointArn,
        TargetEndpointArn = target.EndpointArn,
        TableMappings = @"  {
    \""rules\"":[{\""rule-type\"":\""selection\"",\""rule-id\"":\""1\"",\""rule-name\"":\""1\"",\""rule-action\"":\""include\"",\""object-locator\"":{\""schema-name\"":\""%%\"",\""table-name\"":\""%%\""}}]
  }
",
        StartReplication = true,
    });

});
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 {
		_, err := dms.NewReplicationConfig(ctx, "name", &dms.ReplicationConfigArgs{
			ComputeConfig: &dms.ReplicationConfigComputeConfigArgs{
				ReplicationSubnetGroupId:   pulumi.Any(_default.ReplicationSubnetGroupId),
				MaxCapacityUnits:           pulumi.Int(64),
				MinCapacityUnits:           pulumi.Int(2),
				PreferredMaintenanceWindow: pulumi.String("sun:23:45-mon:00:30"),
			},
			ReplicationConfigIdentifier: pulumi.String("test-dms-serverless-replication-tf"),
			ResourceIdentifier:          pulumi.String("test-dms-serverless-replication-tf"),
			ReplicationType:             pulumi.String("cdc"),
			SourceEndpointArn:           pulumi.Any(source.EndpointArn),
			TargetEndpointArn:           pulumi.Any(target.EndpointArn),
			TableMappings:               pulumi.String("  {\n    \\\"rules\\\":[{\\\"rule-type\\\":\\\"selection\\\",\\\"rule-id\\\":\\\"1\\\",\\\"rule-name\\\":\\\"1\\\",\\\"rule-action\\\":\\\"include\\\",\\\"object-locator\\\":{\\\"schema-name\\\":\\\"%%\\\",\\\"table-name\\\":\\\"%%\\\"}}]\n  }\n"),
			StartReplication:            pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_dms_replicationconfig" "name" {
  compute_config = {
    replication_subnet_group_id  = default.replicationSubnetGroupId
    max_capacity_units           = "64"
    min_capacity_units           = "2"
    preferred_maintenance_window = "sun:23:45-mon:00:30"
  }
  replication_config_identifier = "test-dms-serverless-replication-tf"
  resource_identifier           = "test-dms-serverless-replication-tf"
  replication_type              = "cdc"
  source_endpoint_arn           = source.endpointArn
  target_endpoint_arn           = target.endpointArn
  table_mappings                = "  {\n    \\\"rules\\\":[{\\\"rule-type\\\":\\\"selection\\\",\\\"rule-id\\\":\\\"1\\\",\\\"rule-name\\\":\\\"1\\\",\\\"rule-action\\\":\\\"include\\\",\\\"object-locator\\\":{\\\"schema-name\\\":\\\"%%\\\",\\\"table-name\\\":\\\"%%\\\"}}]\n  }\n"
  start_replication             = true
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dms.ReplicationConfig;
import com.pulumi.aws.dms.ReplicationConfigArgs;
import com.pulumi.aws.dms.inputs.ReplicationConfigComputeConfigArgs;
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) {
        var name = new ReplicationConfig("name", ReplicationConfigArgs.builder()
            .computeConfig(ReplicationConfigComputeConfigArgs.builder()
                .replicationSubnetGroupId(default_.replicationSubnetGroupId())
                .maxCapacityUnits(64)
                .minCapacityUnits(2)
                .preferredMaintenanceWindow("sun:23:45-mon:00:30")
                .build())
            .replicationConfigIdentifier("test-dms-serverless-replication-tf")
            .resourceIdentifier("test-dms-serverless-replication-tf")
            .replicationType("cdc")
            .sourceEndpointArn(source.endpointArn())
            .targetEndpointArn(target.endpointArn())
            .tableMappings("""
  {
    \"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-action\":\"include\",\"object-locator\":{\"schema-name\":\"%%\",\"table-name\":\"%%\"}}]
  }
            """)
            .startReplication(true)
            .build());

    }
}
resources:
  name:
    type: aws:dms:ReplicationConfig
    properties:
      computeConfig:
        replicationSubnetGroupId: ${default.replicationSubnetGroupId}
        maxCapacityUnits: '64'
        minCapacityUnits: '2'
        preferredMaintenanceWindow: sun:23:45-mon:00:30
      replicationConfigIdentifier: test-dms-serverless-replication-tf
      resourceIdentifier: test-dms-serverless-replication-tf
      replicationType: cdc
      sourceEndpointArn: ${source.endpointArn}
      targetEndpointArn: ${target.endpointArn}
      tableMappings: |2
          {
            \"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-action\":\"include\",\"object-locator\":{\"schema-name\":\"%%\",\"table-name\":\"%%\"}}]
          }
      startReplication: true

Import

Identity Schema

Required

  • arn (String) ARN of the DMS replication configuration.

Using pulumi import, import a replication config using the arn. For example:

$ pulumi import aws:dms/replicationConfig:ReplicationConfig example arn:aws:dms:us-east-1:123456789012:replication-config:UX6OL6MHMMJKFFOXE3H7LLJCMEKBDUG4ZV7DRSI

Constructors

ReplicationConfig(String name, {ReplicationConfigArgs? args, CustomResourceOptions? options})
Creates a new ReplicationConfig. name The Pulumi resource name. args Arguments used to configure this ReplicationConfig. The set of arguments for ReplicationConfig. options Resource options controlling this resource's behavior.
ReplicationConfig.reference(String urn)
Creates a typed reference to an existing ReplicationConfig resource.

Properties

arn ↔ Output<String>
ARN for the serverless replication config.
latefinal
childResources Set<Resource>
finalinherited
completionSources Map<String, IOutputCompletionSource>
latefinalinherited
computeConfig ↔ Output<ReplicationConfigComputeConfig>
Configuration block for provisioning an DMS Serverless replication.
latefinal
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
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
replicationConfigIdentifier ↔ Output<String>
Unique identifier that you want to use to create the config.
latefinal
replicationSettings ↔ Output<String>
An escaped JSON string that are used to provision this replication configuration. For example, Change processing tuning settings
latefinal
replicationType ↔ Output<String>
The migration type. Can be one of full-load | cdc | full-load-and-cdc.
latefinal
resourceIdentifier ↔ Output<String>
Unique value or name that you set for a given resource that can be used to construct an ARN for that resource. For more information, see Fine-grained access control using resource names and tags
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 string that uniquely identifies the source endpoint.
latefinal
startReplication ↔ Output<bool?>
Whether to run or stop the serverless replication, default is false.
latefinal
supplementalSettings ↔ Output<String?>
JSON settings for specifying supplemental data. For more information see Specifying supplemental data for task settings
latefinal
tableMappings ↔ Output<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
latefinal
tags ↔ Output<Map<String, String>?>
A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
targetEndpointArn ↔ Output<String>
ARN string 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, {ReplicationConfigState? state, CustomResourceOptions? options}) ReplicationConfig
Gets an existing ReplicationConfig resource's state with the given name and id.