Class ReplicationInstance
Provides a DMS (Data Migration Service) replication instance resource. DMS replication instances can be created, updated, deleted, and imported.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var dmsAssumeRole = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
{
Statements =
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
{
Actions =
{
"sts:AssumeRole",
},
Principals =
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
{
Identifiers =
{
"dms.amazonaws.com",
},
Type = "Service",
},
},
},
},
}));
var dms_access_for_endpoint = new Aws.Iam.Role("dms-access-for-endpoint", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = dmsAssumeRole.Apply(dmsAssumeRole => dmsAssumeRole.Json),
});
var dms_access_for_endpoint_AmazonDMSRedshiftS3Role = new Aws.Iam.RolePolicyAttachment("dms-access-for-endpoint-AmazonDMSRedshiftS3Role", new Aws.Iam.RolePolicyAttachmentArgs
{
PolicyArn = "arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role",
Role = dms_access_for_endpoint.Name,
});
var dms_cloudwatch_logs_role = new Aws.Iam.Role("dms-cloudwatch-logs-role", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = dmsAssumeRole.Apply(dmsAssumeRole => dmsAssumeRole.Json),
});
var dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole = new Aws.Iam.RolePolicyAttachment("dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", new Aws.Iam.RolePolicyAttachmentArgs
{
PolicyArn = "arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole",
Role = dms_cloudwatch_logs_role.Name,
});
var dms_vpc_role = new Aws.Iam.Role("dms-vpc-role", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = dmsAssumeRole.Apply(dmsAssumeRole => dmsAssumeRole.Json),
});
var dms_vpc_role_AmazonDMSVPCManagementRole = new Aws.Iam.RolePolicyAttachment("dms-vpc-role-AmazonDMSVPCManagementRole", new Aws.Iam.RolePolicyAttachmentArgs
{
PolicyArn = "arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole",
Role = dms_vpc_role.Name,
});
// Create a new replication instance
var test = new Aws.Dms.ReplicationInstance("test", new Aws.Dms.ReplicationInstanceArgs
{
AllocatedStorage = 20,
ApplyImmediately = true,
AutoMinorVersionUpgrade = true,
AvailabilityZone = "us-west-2c",
EngineVersion = "3.1.4",
KmsKeyArn = "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012",
MultiAz = false,
PreferredMaintenanceWindow = "sun:10:30-sun:14:30",
PubliclyAccessible = true,
ReplicationInstanceClass = "dms.t2.micro",
ReplicationInstanceId = "test-dms-replication-instance-tf",
ReplicationSubnetGroupId = aws_dms_replication_subnet_group.Test_dms_replication_subnet_group_tf.Id,
Tags =
{
{ "Name", "test" },
},
VpcSecurityGroupIds =
{
"sg-12345678",
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Dms
Assembly: Pulumi.Aws.dll
Syntax
public class ReplicationInstance : CustomResource
Constructors
View SourceReplicationInstance(String, ReplicationInstanceArgs, CustomResourceOptions)
Create a ReplicationInstance resource with the given unique name, arguments, and options.
Declaration
public ReplicationInstance(string name, ReplicationInstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ReplicationInstanceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAllocatedStorage
The amount of storage (in gigabytes) to be initially allocated for the replication instance.
Declaration
public Output<int> AllocatedStorage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
ApplyImmediately
Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
Declaration
public Output<bool?> ApplyImmediately { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
AutoMinorVersionUpgrade
Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
Declaration
public Output<bool> AutoMinorVersionUpgrade { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
AvailabilityZone
The EC2 Availability Zone that the replication instance will be created in.
Declaration
public Output<string> AvailabilityZone { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EngineVersion
The engine version number of the replication instance.
Declaration
public Output<string> EngineVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
KmsKeyArn
The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for kms_key_arn, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
Declaration
public Output<string> KmsKeyArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MultiAz
Specifies if the replication instance is a multi-az deployment. You cannot set the availability_zone parameter if the multi_az parameter is set to true.
Declaration
public Output<bool> MultiAz { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
PreferredMaintenanceWindow
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Declaration
public Output<string> PreferredMaintenanceWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PubliclyAccessible
Specifies the accessibility options for the replication instance. A value of true represents an instance with a public IP address. A value of false represents an instance with a private IP address.
Declaration
public Output<bool> PubliclyAccessible { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
ReplicationInstanceArn
The Amazon Resource Name (ARN) of the replication instance.
Declaration
public Output<string> ReplicationInstanceArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ReplicationInstanceClass
The compute and memory capacity of the replication instance as specified by the replication instance class. Can be one of dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge
Declaration
public Output<string> ReplicationInstanceClass { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ReplicationInstanceId
The replication instance identifier. This parameter is stored as a lowercase string.
Declaration
public Output<string> ReplicationInstanceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ReplicationInstancePrivateIps
A list of the private IP addresses of the replication instance.
Declaration
public Output<ImmutableArray<string>> ReplicationInstancePrivateIps { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ReplicationInstancePublicIps
A list of the public IP addresses of the replication instance.
Declaration
public Output<ImmutableArray<string>> ReplicationInstancePublicIps { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ReplicationSubnetGroupId
A subnet group to associate with the replication instance.
Declaration
public Output<string> ReplicationSubnetGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
VpcSecurityGroupIds
A list of VPC security group IDs to be used with the replication instance. The VPC security groups must work with the VPC containing the replication instance.
Declaration
public Output<ImmutableArray<string>> VpcSecurityGroupIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, ReplicationInstanceState, CustomResourceOptions)
Get an existing ReplicationInstance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ReplicationInstance Get(string name, Input<string> id, ReplicationInstanceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ReplicationInstanceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ReplicationInstance |