Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.dms.kotlin.ReplicationInstanceArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.dms.kotlin
import com.pulumi.aws.dms.ReplicationInstanceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a DMS (Data Migration Service) replication instance resource. DMS replication instances can be created, updated, deleted, and imported.
* ## Example Usage
* Create required roles and then create a DMS instance, setting the depends_on to the required role policy attachments.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* // Database Migration Service requires the below IAM Roles to be created before
* // replication instances can be created. See the DMS Documentation for
* // additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
* // * dms-vpc-role
* // * dms-cloudwatch-logs-role
* // * dms-access-for-endpoint
* const dmsAssumeRole = aws.iam.getPolicyDocument({
* statements: [{
* actions: ["sts:AssumeRole"],
* principals: [{
* identifiers: ["dms.amazonaws.com"],
* type: "Service",
* }],
* }],
* });
* const dms_access_for_endpoint = new aws.iam.Role("dms-access-for-endpoint", {
* assumeRolePolicy: dmsAssumeRole.then(dmsAssumeRole => dmsAssumeRole.json),
* name: "dms-access-for-endpoint",
* });
* const dms_access_for_endpoint_AmazonDMSRedshiftS3Role = new aws.iam.RolePolicyAttachment("dms-access-for-endpoint-AmazonDMSRedshiftS3Role", {
* policyArn: "arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role",
* role: dms_access_for_endpoint.name,
* });
* const dms_cloudwatch_logs_role = new aws.iam.Role("dms-cloudwatch-logs-role", {
* assumeRolePolicy: dmsAssumeRole.then(dmsAssumeRole => dmsAssumeRole.json),
* name: "dms-cloudwatch-logs-role",
* });
* const dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole = new aws.iam.RolePolicyAttachment("dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", {
* policyArn: "arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole",
* role: dms_cloudwatch_logs_role.name,
* });
* const dms_vpc_role = new aws.iam.Role("dms-vpc-role", {
* assumeRolePolicy: dmsAssumeRole.then(dmsAssumeRole => dmsAssumeRole.json),
* name: "dms-vpc-role",
* });
* const dms_vpc_role_AmazonDMSVPCManagementRole = new aws.iam.RolePolicyAttachment("dms-vpc-role-AmazonDMSVPCManagementRole", {
* policyArn: "arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole",
* role: dms_vpc_role.name,
* });
* // Create a new replication instance
* const test = new aws.dms.ReplicationInstance("test", {
* 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: test_dms_replication_subnet_group_tf.id,
* tags: {
* Name: "test",
* },
* vpcSecurityGroupIds: ["sg-12345678"],
* }, {
* dependsOn: [
* dms_access_for_endpoint_AmazonDMSRedshiftS3Role,
* dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole,
* dms_vpc_role_AmazonDMSVPCManagementRole,
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* # Database Migration Service requires the below IAM Roles to be created before
* # replication instances can be created. See the DMS Documentation for
* # additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
* # * dms-vpc-role
* # * dms-cloudwatch-logs-role
* # * dms-access-for-endpoint
* dms_assume_role = aws.iam.get_policy_document(statements=[{
* "actions": ["sts:AssumeRole"],
* "principals": [{
* "identifiers": ["dms.amazonaws.com"],
* "type": "Service",
* }],
* }])
* dms_access_for_endpoint = aws.iam.Role("dms-access-for-endpoint",
* assume_role_policy=dms_assume_role.json,
* name="dms-access-for-endpoint")
* dms_access_for_endpoint__amazon_dms_redshift_s3_role = aws.iam.RolePolicyAttachment("dms-access-for-endpoint-AmazonDMSRedshiftS3Role",
* policy_arn="arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role",
* role=dms_access_for_endpoint.name)
* dms_cloudwatch_logs_role = aws.iam.Role("dms-cloudwatch-logs-role",
* assume_role_policy=dms_assume_role.json,
* name="dms-cloudwatch-logs-role")
* dms_cloudwatch_logs_role__amazon_dms_cloud_watch_logs_role = aws.iam.RolePolicyAttachment("dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole",
* policy_arn="arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole",
* role=dms_cloudwatch_logs_role.name)
* dms_vpc_role = aws.iam.Role("dms-vpc-role",
* assume_role_policy=dms_assume_role.json,
* name="dms-vpc-role")
* dms_vpc_role__amazon_dmsvpc_management_role = aws.iam.RolePolicyAttachment("dms-vpc-role-AmazonDMSVPCManagementRole",
* policy_arn="arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole",
* role=dms_vpc_role.name)
* # Create a new replication instance
* test = aws.dms.ReplicationInstance("test",
* allocated_storage=20,
* apply_immediately=True,
* auto_minor_version_upgrade=True,
* availability_zone="us-west-2c",
* engine_version="3.1.4",
* kms_key_arn="arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012",
* multi_az=False,
* preferred_maintenance_window="sun:10:30-sun:14:30",
* publicly_accessible=True,
* replication_instance_class="dms.t2.micro",
* replication_instance_id="test-dms-replication-instance-tf",
* replication_subnet_group_id=test_dms_replication_subnet_group_tf["id"],
* tags={
* "Name": "test",
* },
* vpc_security_group_ids=["sg-12345678"],
* opts = pulumi.ResourceOptions(depends_on=[
* dms_access_for_endpoint__amazon_dms_redshift_s3_role,
* dms_cloudwatch_logs_role__amazon_dms_cloud_watch_logs_role,
* dms_vpc_role__amazon_dmsvpc_management_role,
* ]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* // Database Migration Service requires the below IAM Roles to be created before
* // replication instances can be created. See the DMS Documentation for
* // additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
* // * dms-vpc-role
* // * dms-cloudwatch-logs-role
* // * dms-access-for-endpoint
* var dmsAssumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
* {
* Statements = new[]
* {
* new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
* {
* Actions = new[]
* {
* "sts:AssumeRole",
* },
* Principals = new[]
* {
* new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
* {
* Identifiers = new[]
* {
* "dms.amazonaws.com",
* },
* Type = "Service",
* },
* },
* },
* },
* });
* var dms_access_for_endpoint = new Aws.Iam.Role("dms-access-for-endpoint", new()
* {
* AssumeRolePolicy = dmsAssumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
* Name = "dms-access-for-endpoint",
* });
* var dms_access_for_endpoint_AmazonDMSRedshiftS3Role = new Aws.Iam.RolePolicyAttachment("dms-access-for-endpoint-AmazonDMSRedshiftS3Role", new()
* {
* 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()
* {
* AssumeRolePolicy = dmsAssumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
* Name = "dms-cloudwatch-logs-role",
* });
* var dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole = new Aws.Iam.RolePolicyAttachment("dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", new()
* {
* 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()
* {
* AssumeRolePolicy = dmsAssumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
* Name = "dms-vpc-role",
* });
* var dms_vpc_role_AmazonDMSVPCManagementRole = new Aws.Iam.RolePolicyAttachment("dms-vpc-role-AmazonDMSVPCManagementRole", new()
* {
* 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()
* {
* 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 = test_dms_replication_subnet_group_tf.Id,
* Tags =
* {
* { "Name", "test" },
* },
* VpcSecurityGroupIds = new[]
* {
* "sg-12345678",
* },
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* dms_access_for_endpoint_AmazonDMSRedshiftS3Role,
* dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole,
* dms_vpc_role_AmazonDMSVPCManagementRole,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dms"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* // Database Migration Service requires the below IAM Roles to be created before
* // replication instances can be created. See the DMS Documentation for
* // additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
* // - dms-vpc-role
* // - dms-cloudwatch-logs-role
* // - dms-access-for-endpoint
* dmsAssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
* Statements: []iam.GetPolicyDocumentStatement{
* {
* Actions: []string{
* "sts:AssumeRole",
* },
* Principals: []iam.GetPolicyDocumentStatementPrincipal{
* {
* Identifiers: []string{
* "dms.amazonaws.com",
* },
* Type: "Service",
* },
* },
* },
* },
* }, nil)
* if err != nil {
* return err
* }
* _, err = iam.NewRole(ctx, "dms-access-for-endpoint", &iam.RoleArgs{
* AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
* Name: pulumi.String("dms-access-for-endpoint"),
* })
* if err != nil {
* return err
* }
* _, err = iam.NewRolePolicyAttachment(ctx, "dms-access-for-endpoint-AmazonDMSRedshiftS3Role", &iam.RolePolicyAttachmentArgs{
* PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role"),
* Role: dms_access_for_endpoint.Name,
* })
* if err != nil {
* return err
* }
* _, err = iam.NewRole(ctx, "dms-cloudwatch-logs-role", &iam.RoleArgs{
* AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
* Name: pulumi.String("dms-cloudwatch-logs-role"),
* })
* if err != nil {
* return err
* }
* _, err = iam.NewRolePolicyAttachment(ctx, "dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", &iam.RolePolicyAttachmentArgs{
* PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole"),
* Role: dms_cloudwatch_logs_role.Name,
* })
* if err != nil {
* return err
* }
* _, err = iam.NewRole(ctx, "dms-vpc-role", &iam.RoleArgs{
* AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
* Name: pulumi.String("dms-vpc-role"),
* })
* if err != nil {
* return err
* }
* _, err = iam.NewRolePolicyAttachment(ctx, "dms-vpc-role-AmazonDMSVPCManagementRole", &iam.RolePolicyAttachmentArgs{
* PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole"),
* Role: dms_vpc_role.Name,
* })
* if err != nil {
* return err
* }
* // Create a new replication instance
* _, err = dms.NewReplicationInstance(ctx, "test", &dms.ReplicationInstanceArgs{
* AllocatedStorage: pulumi.Int(20),
* ApplyImmediately: pulumi.Bool(true),
* AutoMinorVersionUpgrade: pulumi.Bool(true),
* AvailabilityZone: pulumi.String("us-west-2c"),
* EngineVersion: pulumi.String("3.1.4"),
* KmsKeyArn: pulumi.String("arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012"),
* MultiAz: pulumi.Bool(false),
* PreferredMaintenanceWindow: pulumi.String("sun:10:30-sun:14:30"),
* PubliclyAccessible: pulumi.Bool(true),
* ReplicationInstanceClass: pulumi.String("dms.t2.micro"),
* ReplicationInstanceId: pulumi.String("test-dms-replication-instance-tf"),
* ReplicationSubnetGroupId: pulumi.Any(test_dms_replication_subnet_group_tf.Id),
* Tags: pulumi.StringMap{
* "Name": pulumi.String("test"),
* },
* VpcSecurityGroupIds: pulumi.StringArray{
* pulumi.String("sg-12345678"),
* },
* }, pulumi.DependsOn([]pulumi.Resource{
* dms_access_for_endpoint_AmazonDMSRedshiftS3Role,
* dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole,
* dms_vpc_role_AmazonDMSVPCManagementRole,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.iam.IamFunctions;
* import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
* import com.pulumi.aws.iam.Role;
* import com.pulumi.aws.iam.RoleArgs;
* import com.pulumi.aws.iam.RolePolicyAttachment;
* import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
* import com.pulumi.aws.dms.ReplicationInstance;
* import com.pulumi.aws.dms.ReplicationInstanceArgs;
* import com.pulumi.resources.CustomResourceOptions;
* 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) {
* // Database Migration Service requires the below IAM Roles to be created before
* // replication instances can be created. See the DMS Documentation for
* // additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
* // * dms-vpc-role
* // * dms-cloudwatch-logs-role
* // * dms-access-for-endpoint
* final var dmsAssumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
* .statements(GetPolicyDocumentStatementArgs.builder()
* .actions("sts:AssumeRole")
* .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
* .identifiers("dms.amazonaws.com")
* .type("Service")
* .build())
* .build())
* .build());
* var dms_access_for_endpoint = new Role("dms-access-for-endpoint", RoleArgs.builder()
* .assumeRolePolicy(dmsAssumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
* .name("dms-access-for-endpoint")
* .build());
* var dms_access_for_endpoint_AmazonDMSRedshiftS3Role = new RolePolicyAttachment("dms-access-for-endpoint-AmazonDMSRedshiftS3Role", RolePolicyAttachmentArgs.builder()
* .policyArn("arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role")
* .role(dms_access_for_endpoint.name())
* .build());
* var dms_cloudwatch_logs_role = new Role("dms-cloudwatch-logs-role", RoleArgs.builder()
* .assumeRolePolicy(dmsAssumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
* .name("dms-cloudwatch-logs-role")
* .build());
* var dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole = new RolePolicyAttachment("dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", RolePolicyAttachmentArgs.builder()
* .policyArn("arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole")
* .role(dms_cloudwatch_logs_role.name())
* .build());
* var dms_vpc_role = new Role("dms-vpc-role", RoleArgs.builder()
* .assumeRolePolicy(dmsAssumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
* .name("dms-vpc-role")
* .build());
* var dms_vpc_role_AmazonDMSVPCManagementRole = new RolePolicyAttachment("dms-vpc-role-AmazonDMSVPCManagementRole", RolePolicyAttachmentArgs.builder()
* .policyArn("arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole")
* .role(dms_vpc_role.name())
* .build());
* // Create a new replication instance
* var test = new ReplicationInstance("test", ReplicationInstanceArgs.builder()
* .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(test_dms_replication_subnet_group_tf.id())
* .tags(Map.of("Name", "test"))
* .vpcSecurityGroupIds("sg-12345678")
* .build(), CustomResourceOptions.builder()
* .dependsOn(
* dms_access_for_endpoint_AmazonDMSRedshiftS3Role,
* dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole,
* dms_vpc_role_AmazonDMSVPCManagementRole)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* dms-access-for-endpoint:
* type: aws:iam:Role
* properties:
* assumeRolePolicy: ${dmsAssumeRole.json}
* name: dms-access-for-endpoint
* dms-access-for-endpoint-AmazonDMSRedshiftS3Role:
* type: aws:iam:RolePolicyAttachment
* properties:
* policyArn: arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role
* role: ${["dms-access-for-endpoint"].name}
* dms-cloudwatch-logs-role:
* type: aws:iam:Role
* properties:
* assumeRolePolicy: ${dmsAssumeRole.json}
* name: dms-cloudwatch-logs-role
* dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole:
* type: aws:iam:RolePolicyAttachment
* properties:
* policyArn: arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole
* role: ${["dms-cloudwatch-logs-role"].name}
* dms-vpc-role:
* type: aws:iam:Role
* properties:
* assumeRolePolicy: ${dmsAssumeRole.json}
* name: dms-vpc-role
* dms-vpc-role-AmazonDMSVPCManagementRole:
* type: aws:iam:RolePolicyAttachment
* properties:
* policyArn: arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole
* role: ${["dms-vpc-role"].name}
* # Create a new replication instance
* test:
* type: aws:dms:ReplicationInstance
* properties:
* 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: ${["test-dms-replication-subnet-group-tf"].id}
* tags:
* Name: test
* vpcSecurityGroupIds:
* - sg-12345678
* options:
* dependson:
* - ${["dms-access-for-endpoint-AmazonDMSRedshiftS3Role"]}
* - ${["dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole"]}
* - ${["dms-vpc-role-AmazonDMSVPCManagementRole"]}
* variables:
* # Database Migration Service requires the below IAM Roles to be created before
* # replication instances can be created. See the DMS Documentation for
* # additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
* # * dms-vpc-role
* # * dms-cloudwatch-logs-role
* # * dms-access-for-endpoint
* dmsAssumeRole:
* fn::invoke:
* Function: aws:iam:getPolicyDocument
* Arguments:
* statements:
* - actions:
* - sts:AssumeRole
* principals:
* - identifiers:
* - dms.amazonaws.com
* type: Service
* ```
*
* ## Import
* Using `pulumi import`, import replication instances using the `replication_instance_id`. For example:
* ```sh
* $ pulumi import aws:dms/replicationInstance:ReplicationInstance test test-dms-replication-instance-tf
* ```
* @property allocatedStorage The amount of storage (in gigabytes) to be initially allocated for the replication instance.
* @property allowMajorVersionUpgrade Indicates that major version upgrades are allowed.
* @property applyImmediately Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
* @property autoMinorVersionUpgrade Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
* @property availabilityZone The EC2 Availability Zone that the replication instance will be created in.
* @property engineVersion The engine version number of the replication instance.
* @property 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.
* @property 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`.
* @property networkType The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
* @property preferredMaintenanceWindow The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
* - Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week.
* - Format: `ddd:hh24:mi-ddd:hh24:mi`
* - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
* - Constraints: Minimum 30-minute window.
* @property 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.
* @property replicationInstanceClass The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
* @property replicationInstanceId The replication instance identifier. This parameter is stored as a lowercase string.
* - Must contain from 1 to 63 alphanumeric characters or hyphens.
* - First character must be a letter.
* - Cannot end with a hyphen
* - Cannot contain two consecutive hyphens.
* @property replicationSubnetGroupId A subnet group to associate with the replication instance.
* @property tags 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.
* @property 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.
*/
public data class ReplicationInstanceArgs(
public val allocatedStorage: Output? = null,
public val allowMajorVersionUpgrade: Output? = null,
public val applyImmediately: Output? = null,
public val autoMinorVersionUpgrade: Output? = null,
public val availabilityZone: Output? = null,
public val engineVersion: Output? = null,
public val kmsKeyArn: Output? = null,
public val multiAz: Output? = null,
public val networkType: Output? = null,
public val preferredMaintenanceWindow: Output? = null,
public val publiclyAccessible: Output? = null,
public val replicationInstanceClass: Output? = null,
public val replicationInstanceId: Output? = null,
public val replicationSubnetGroupId: Output? = null,
public val tags: Output>? = null,
public val vpcSecurityGroupIds: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.dms.ReplicationInstanceArgs =
com.pulumi.aws.dms.ReplicationInstanceArgs.builder()
.allocatedStorage(allocatedStorage?.applyValue({ args0 -> args0 }))
.allowMajorVersionUpgrade(allowMajorVersionUpgrade?.applyValue({ args0 -> args0 }))
.applyImmediately(applyImmediately?.applyValue({ args0 -> args0 }))
.autoMinorVersionUpgrade(autoMinorVersionUpgrade?.applyValue({ args0 -> args0 }))
.availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
.engineVersion(engineVersion?.applyValue({ args0 -> args0 }))
.kmsKeyArn(kmsKeyArn?.applyValue({ args0 -> args0 }))
.multiAz(multiAz?.applyValue({ args0 -> args0 }))
.networkType(networkType?.applyValue({ args0 -> args0 }))
.preferredMaintenanceWindow(preferredMaintenanceWindow?.applyValue({ args0 -> args0 }))
.publiclyAccessible(publiclyAccessible?.applyValue({ args0 -> args0 }))
.replicationInstanceClass(replicationInstanceClass?.applyValue({ args0 -> args0 }))
.replicationInstanceId(replicationInstanceId?.applyValue({ args0 -> args0 }))
.replicationSubnetGroupId(replicationSubnetGroupId?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.vpcSecurityGroupIds(
vpcSecurityGroupIds?.applyValue({ args0 ->
args0.map({ args0 ->
args0
})
}),
).build()
}
/**
* Builder for [ReplicationInstanceArgs].
*/
@PulumiTagMarker
public class ReplicationInstanceArgsBuilder internal constructor() {
private var allocatedStorage: Output? = null
private var allowMajorVersionUpgrade: Output? = null
private var applyImmediately: Output? = null
private var autoMinorVersionUpgrade: Output? = null
private var availabilityZone: Output? = null
private var engineVersion: Output? = null
private var kmsKeyArn: Output? = null
private var multiAz: Output? = null
private var networkType: Output? = null
private var preferredMaintenanceWindow: Output? = null
private var publiclyAccessible: Output? = null
private var replicationInstanceClass: Output? = null
private var replicationInstanceId: Output? = null
private var replicationSubnetGroupId: Output? = null
private var tags: Output>? = null
private var vpcSecurityGroupIds: Output>? = null
/**
* @param value The amount of storage (in gigabytes) to be initially allocated for the replication instance.
*/
@JvmName("bmqmodyhjrtkuitg")
public suspend fun allocatedStorage(`value`: Output) {
this.allocatedStorage = value
}
/**
* @param value Indicates that major version upgrades are allowed.
*/
@JvmName("uergttvbivmjlsxw")
public suspend fun allowMajorVersionUpgrade(`value`: Output) {
this.allowMajorVersionUpgrade = value
}
/**
* @param value Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
*/
@JvmName("uhobnddkrlfsuukk")
public suspend fun applyImmediately(`value`: Output) {
this.applyImmediately = value
}
/**
* @param value Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
*/
@JvmName("sacmrnrrpisyskik")
public suspend fun autoMinorVersionUpgrade(`value`: Output) {
this.autoMinorVersionUpgrade = value
}
/**
* @param value The EC2 Availability Zone that the replication instance will be created in.
*/
@JvmName("ekgkuchjmcibmskp")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value The engine version number of the replication instance.
*/
@JvmName("hebcvwmrillhfmym")
public suspend fun engineVersion(`value`: Output) {
this.engineVersion = value
}
/**
* @param value 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.
*/
@JvmName("ehicoiagrxyuilsk")
public suspend fun kmsKeyArn(`value`: Output) {
this.kmsKeyArn = value
}
/**
* @param value 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`.
*/
@JvmName("jgpferfliybvmhac")
public suspend fun multiAz(`value`: Output) {
this.multiAz = value
}
/**
* @param value The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
*/
@JvmName("rvacavxixxboauyg")
public suspend fun networkType(`value`: Output) {
this.networkType = value
}
/**
* @param value The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
* - Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week.
* - Format: `ddd:hh24:mi-ddd:hh24:mi`
* - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
* - Constraints: Minimum 30-minute window.
*/
@JvmName("kbiinritnyutajfe")
public suspend fun preferredMaintenanceWindow(`value`: Output) {
this.preferredMaintenanceWindow = value
}
/**
* @param value 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.
*/
@JvmName("imlnrsfcwrupyweq")
public suspend fun publiclyAccessible(`value`: Output) {
this.publiclyAccessible = value
}
/**
* @param value The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
*/
@JvmName("aajcwjdrrkyqlqjd")
public suspend fun replicationInstanceClass(`value`: Output) {
this.replicationInstanceClass = value
}
/**
* @param value The replication instance identifier. This parameter is stored as a lowercase string.
* - Must contain from 1 to 63 alphanumeric characters or hyphens.
* - First character must be a letter.
* - Cannot end with a hyphen
* - Cannot contain two consecutive hyphens.
*/
@JvmName("xgyrgneyomkmrcoc")
public suspend fun replicationInstanceId(`value`: Output) {
this.replicationInstanceId = value
}
/**
* @param value A subnet group to associate with the replication instance.
*/
@JvmName("trriiwkceswuyykl")
public suspend fun replicationSubnetGroupId(`value`: Output) {
this.replicationSubnetGroupId = value
}
/**
* @param value 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.
*/
@JvmName("sgsapfpvnbhfqtks")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value 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.
*/
@JvmName("gfeerbvjdlviydsa")
public suspend fun vpcSecurityGroupIds(`value`: Output>) {
this.vpcSecurityGroupIds = value
}
@JvmName("xbgpfrbfsqtxnlvs")
public suspend fun vpcSecurityGroupIds(vararg values: Output) {
this.vpcSecurityGroupIds = Output.all(values.asList())
}
/**
* @param values 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.
*/
@JvmName("iskmjiaescbyumti")
public suspend fun vpcSecurityGroupIds(values: List>) {
this.vpcSecurityGroupIds = Output.all(values)
}
/**
* @param value The amount of storage (in gigabytes) to be initially allocated for the replication instance.
*/
@JvmName("uoysveabjysyxkeu")
public suspend fun allocatedStorage(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allocatedStorage = mapped
}
/**
* @param value Indicates that major version upgrades are allowed.
*/
@JvmName("xifxuhuhakvyfwov")
public suspend fun allowMajorVersionUpgrade(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allowMajorVersionUpgrade = mapped
}
/**
* @param value Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
*/
@JvmName("wiatsvaifojumtre")
public suspend fun applyImmediately(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.applyImmediately = mapped
}
/**
* @param value Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
*/
@JvmName("fnsufsdtacxicxoq")
public suspend fun autoMinorVersionUpgrade(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.autoMinorVersionUpgrade = mapped
}
/**
* @param value The EC2 Availability Zone that the replication instance will be created in.
*/
@JvmName("ltyvopqamabkwora")
public suspend fun availabilityZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.availabilityZone = mapped
}
/**
* @param value The engine version number of the replication instance.
*/
@JvmName("asbervwhcqngolgc")
public suspend fun engineVersion(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.engineVersion = mapped
}
/**
* @param value 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.
*/
@JvmName("xxptdlnlsdigxnrc")
public suspend fun kmsKeyArn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kmsKeyArn = mapped
}
/**
* @param value 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`.
*/
@JvmName("mstvibtgbsnfbybg")
public suspend fun multiAz(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.multiAz = mapped
}
/**
* @param value The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
*/
@JvmName("ddsouarphwyoerel")
public suspend fun networkType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkType = mapped
}
/**
* @param value The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
* - Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week.
* - Format: `ddd:hh24:mi-ddd:hh24:mi`
* - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
* - Constraints: Minimum 30-minute window.
*/
@JvmName("qefickqjamiwyjmp")
public suspend fun preferredMaintenanceWindow(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.preferredMaintenanceWindow = mapped
}
/**
* @param value 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.
*/
@JvmName("vcykvlpynmofbwqf")
public suspend fun publiclyAccessible(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publiclyAccessible = mapped
}
/**
* @param value The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
*/
@JvmName("hxlqokncxaimoxcr")
public suspend fun replicationInstanceClass(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.replicationInstanceClass = mapped
}
/**
* @param value The replication instance identifier. This parameter is stored as a lowercase string.
* - Must contain from 1 to 63 alphanumeric characters or hyphens.
* - First character must be a letter.
* - Cannot end with a hyphen
* - Cannot contain two consecutive hyphens.
*/
@JvmName("ajqdntvifagyoxsa")
public suspend fun replicationInstanceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.replicationInstanceId = mapped
}
/**
* @param value A subnet group to associate with the replication instance.
*/
@JvmName("oolitovpumssfygq")
public suspend fun replicationSubnetGroupId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.replicationSubnetGroupId = mapped
}
/**
* @param value 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.
*/
@JvmName("mbkcoboydickojky")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values 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.
*/
@JvmName("tehapsopnjuaopnu")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value 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.
*/
@JvmName("dtiemssggswsahgd")
public suspend fun vpcSecurityGroupIds(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vpcSecurityGroupIds = mapped
}
/**
* @param values 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.
*/
@JvmName("tlnruomkgcawqjny")
public suspend fun vpcSecurityGroupIds(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.vpcSecurityGroupIds = mapped
}
internal fun build(): ReplicationInstanceArgs = ReplicationInstanceArgs(
allocatedStorage = allocatedStorage,
allowMajorVersionUpgrade = allowMajorVersionUpgrade,
applyImmediately = applyImmediately,
autoMinorVersionUpgrade = autoMinorVersionUpgrade,
availabilityZone = availabilityZone,
engineVersion = engineVersion,
kmsKeyArn = kmsKeyArn,
multiAz = multiAz,
networkType = networkType,
preferredMaintenanceWindow = preferredMaintenanceWindow,
publiclyAccessible = publiclyAccessible,
replicationInstanceClass = replicationInstanceClass,
replicationInstanceId = replicationInstanceId,
replicationSubnetGroupId = replicationSubnetGroupId,
tags = tags,
vpcSecurityGroupIds = vpcSecurityGroupIds,
)
}