github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/dms/replicationInstance.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package dms
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a DMS (Data Migration Service) replication instance resource. DMS replication instances can be created, updated, deleted, and imported.
    16  //
    17  // ## Example Usage
    18  //
    19  // Create required roles and then create a DMS instance, setting the dependsOn to the required role policy attachments.
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dms"
    28  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    29  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    30  //
    31  // )
    32  //
    33  //	func main() {
    34  //		pulumi.Run(func(ctx *pulumi.Context) error {
    35  //			// Database Migration Service requires the below IAM Roles to be created before
    36  //			// replication instances can be created. See the DMS Documentation for
    37  //			// additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
    38  //			//   - dms-vpc-role
    39  //			//   - dms-cloudwatch-logs-role
    40  //			//   - dms-access-for-endpoint
    41  //			dmsAssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    42  //				Statements: []iam.GetPolicyDocumentStatement{
    43  //					{
    44  //						Actions: []string{
    45  //							"sts:AssumeRole",
    46  //						},
    47  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
    48  //							{
    49  //								Identifiers: []string{
    50  //									"dms.amazonaws.com",
    51  //								},
    52  //								Type: "Service",
    53  //							},
    54  //						},
    55  //					},
    56  //				},
    57  //			}, nil)
    58  //			if err != nil {
    59  //				return err
    60  //			}
    61  //			_, err = iam.NewRole(ctx, "dms-access-for-endpoint", &iam.RoleArgs{
    62  //				AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
    63  //				Name:             pulumi.String("dms-access-for-endpoint"),
    64  //			})
    65  //			if err != nil {
    66  //				return err
    67  //			}
    68  //			_, err = iam.NewRolePolicyAttachment(ctx, "dms-access-for-endpoint-AmazonDMSRedshiftS3Role", &iam.RolePolicyAttachmentArgs{
    69  //				PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role"),
    70  //				Role:      dms_access_for_endpoint.Name,
    71  //			})
    72  //			if err != nil {
    73  //				return err
    74  //			}
    75  //			_, err = iam.NewRole(ctx, "dms-cloudwatch-logs-role", &iam.RoleArgs{
    76  //				AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
    77  //				Name:             pulumi.String("dms-cloudwatch-logs-role"),
    78  //			})
    79  //			if err != nil {
    80  //				return err
    81  //			}
    82  //			_, err = iam.NewRolePolicyAttachment(ctx, "dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", &iam.RolePolicyAttachmentArgs{
    83  //				PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole"),
    84  //				Role:      dms_cloudwatch_logs_role.Name,
    85  //			})
    86  //			if err != nil {
    87  //				return err
    88  //			}
    89  //			_, err = iam.NewRole(ctx, "dms-vpc-role", &iam.RoleArgs{
    90  //				AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
    91  //				Name:             pulumi.String("dms-vpc-role"),
    92  //			})
    93  //			if err != nil {
    94  //				return err
    95  //			}
    96  //			_, err = iam.NewRolePolicyAttachment(ctx, "dms-vpc-role-AmazonDMSVPCManagementRole", &iam.RolePolicyAttachmentArgs{
    97  //				PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole"),
    98  //				Role:      dms_vpc_role.Name,
    99  //			})
   100  //			if err != nil {
   101  //				return err
   102  //			}
   103  //			// Create a new replication instance
   104  //			_, err = dms.NewReplicationInstance(ctx, "test", &dms.ReplicationInstanceArgs{
   105  //				AllocatedStorage:           pulumi.Int(20),
   106  //				ApplyImmediately:           pulumi.Bool(true),
   107  //				AutoMinorVersionUpgrade:    pulumi.Bool(true),
   108  //				AvailabilityZone:           pulumi.String("us-west-2c"),
   109  //				EngineVersion:              pulumi.String("3.1.4"),
   110  //				KmsKeyArn:                  pulumi.String("arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012"),
   111  //				MultiAz:                    pulumi.Bool(false),
   112  //				PreferredMaintenanceWindow: pulumi.String("sun:10:30-sun:14:30"),
   113  //				PubliclyAccessible:         pulumi.Bool(true),
   114  //				ReplicationInstanceClass:   pulumi.String("dms.t2.micro"),
   115  //				ReplicationInstanceId:      pulumi.String("test-dms-replication-instance-tf"),
   116  //				ReplicationSubnetGroupId:   pulumi.Any(test_dms_replication_subnet_group_tf.Id),
   117  //				Tags: pulumi.StringMap{
   118  //					"Name": pulumi.String("test"),
   119  //				},
   120  //				VpcSecurityGroupIds: pulumi.StringArray{
   121  //					pulumi.String("sg-12345678"),
   122  //				},
   123  //			}, pulumi.DependsOn([]pulumi.Resource{
   124  //				dms_access_for_endpoint_AmazonDMSRedshiftS3Role,
   125  //				dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole,
   126  //				dms_vpc_role_AmazonDMSVPCManagementRole,
   127  //			}))
   128  //			if err != nil {
   129  //				return err
   130  //			}
   131  //			return nil
   132  //		})
   133  //	}
   134  //
   135  // ```
   136  // <!--End PulumiCodeChooser -->
   137  //
   138  // ## Import
   139  //
   140  // Using `pulumi import`, import replication instances using the `replication_instance_id`. For example:
   141  //
   142  // ```sh
   143  // $ pulumi import aws:dms/replicationInstance:ReplicationInstance test test-dms-replication-instance-tf
   144  // ```
   145  type ReplicationInstance struct {
   146  	pulumi.CustomResourceState
   147  
   148  	// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
   149  	AllocatedStorage pulumi.IntOutput `pulumi:"allocatedStorage"`
   150  	// Indicates that major version upgrades are allowed.
   151  	AllowMajorVersionUpgrade pulumi.BoolPtrOutput `pulumi:"allowMajorVersionUpgrade"`
   152  	// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
   153  	ApplyImmediately pulumi.BoolPtrOutput `pulumi:"applyImmediately"`
   154  	// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
   155  	AutoMinorVersionUpgrade pulumi.BoolOutput `pulumi:"autoMinorVersionUpgrade"`
   156  	// The EC2 Availability Zone that the replication instance will be created in.
   157  	AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
   158  	// The engine version number of the replication instance.
   159  	EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
   160  	// 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 `kmsKeyArn`, 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.
   161  	KmsKeyArn pulumi.StringOutput `pulumi:"kmsKeyArn"`
   162  	// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
   163  	MultiAz pulumi.BoolOutput `pulumi:"multiAz"`
   164  	// The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
   165  	NetworkType pulumi.StringOutput `pulumi:"networkType"`
   166  	// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
   167  	//
   168  	// - 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.
   169  	// - Format: `ddd:hh24:mi-ddd:hh24:mi`
   170  	// - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
   171  	// - Constraints: Minimum 30-minute window.
   172  	PreferredMaintenanceWindow pulumi.StringOutput `pulumi:"preferredMaintenanceWindow"`
   173  	// 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.
   174  	PubliclyAccessible pulumi.BoolOutput `pulumi:"publiclyAccessible"`
   175  	// The Amazon Resource Name (ARN) of the replication instance.
   176  	ReplicationInstanceArn pulumi.StringOutput `pulumi:"replicationInstanceArn"`
   177  	// 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.
   178  	ReplicationInstanceClass pulumi.StringOutput `pulumi:"replicationInstanceClass"`
   179  	// The replication instance identifier. This parameter is stored as a lowercase string.
   180  	//
   181  	// - Must contain from 1 to 63 alphanumeric characters or hyphens.
   182  	// - First character must be a letter.
   183  	// - Cannot end with a hyphen
   184  	// - Cannot contain two consecutive hyphens.
   185  	ReplicationInstanceId pulumi.StringOutput `pulumi:"replicationInstanceId"`
   186  	// A list of the private IP addresses of the replication instance.
   187  	ReplicationInstancePrivateIps pulumi.StringArrayOutput `pulumi:"replicationInstancePrivateIps"`
   188  	// A list of the public IP addresses of the replication instance.
   189  	ReplicationInstancePublicIps pulumi.StringArrayOutput `pulumi:"replicationInstancePublicIps"`
   190  	// A subnet group to associate with the replication instance.
   191  	ReplicationSubnetGroupId pulumi.StringOutput `pulumi:"replicationSubnetGroupId"`
   192  	// 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.
   193  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   194  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   195  	//
   196  	// Deprecated: Please use `tags` instead.
   197  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   198  	// 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.
   199  	VpcSecurityGroupIds pulumi.StringArrayOutput `pulumi:"vpcSecurityGroupIds"`
   200  }
   201  
   202  // NewReplicationInstance registers a new resource with the given unique name, arguments, and options.
   203  func NewReplicationInstance(ctx *pulumi.Context,
   204  	name string, args *ReplicationInstanceArgs, opts ...pulumi.ResourceOption) (*ReplicationInstance, error) {
   205  	if args == nil {
   206  		return nil, errors.New("missing one or more required arguments")
   207  	}
   208  
   209  	if args.ReplicationInstanceClass == nil {
   210  		return nil, errors.New("invalid value for required argument 'ReplicationInstanceClass'")
   211  	}
   212  	if args.ReplicationInstanceId == nil {
   213  		return nil, errors.New("invalid value for required argument 'ReplicationInstanceId'")
   214  	}
   215  	opts = internal.PkgResourceDefaultOpts(opts)
   216  	var resource ReplicationInstance
   217  	err := ctx.RegisterResource("aws:dms/replicationInstance:ReplicationInstance", name, args, &resource, opts...)
   218  	if err != nil {
   219  		return nil, err
   220  	}
   221  	return &resource, nil
   222  }
   223  
   224  // GetReplicationInstance gets an existing ReplicationInstance resource's state with the given name, ID, and optional
   225  // state properties that are used to uniquely qualify the lookup (nil if not required).
   226  func GetReplicationInstance(ctx *pulumi.Context,
   227  	name string, id pulumi.IDInput, state *ReplicationInstanceState, opts ...pulumi.ResourceOption) (*ReplicationInstance, error) {
   228  	var resource ReplicationInstance
   229  	err := ctx.ReadResource("aws:dms/replicationInstance:ReplicationInstance", name, id, state, &resource, opts...)
   230  	if err != nil {
   231  		return nil, err
   232  	}
   233  	return &resource, nil
   234  }
   235  
   236  // Input properties used for looking up and filtering ReplicationInstance resources.
   237  type replicationInstanceState struct {
   238  	// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
   239  	AllocatedStorage *int `pulumi:"allocatedStorage"`
   240  	// Indicates that major version upgrades are allowed.
   241  	AllowMajorVersionUpgrade *bool `pulumi:"allowMajorVersionUpgrade"`
   242  	// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
   243  	ApplyImmediately *bool `pulumi:"applyImmediately"`
   244  	// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
   245  	AutoMinorVersionUpgrade *bool `pulumi:"autoMinorVersionUpgrade"`
   246  	// The EC2 Availability Zone that the replication instance will be created in.
   247  	AvailabilityZone *string `pulumi:"availabilityZone"`
   248  	// The engine version number of the replication instance.
   249  	EngineVersion *string `pulumi:"engineVersion"`
   250  	// 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 `kmsKeyArn`, 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.
   251  	KmsKeyArn *string `pulumi:"kmsKeyArn"`
   252  	// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
   253  	MultiAz *bool `pulumi:"multiAz"`
   254  	// The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
   255  	NetworkType *string `pulumi:"networkType"`
   256  	// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
   257  	//
   258  	// - 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.
   259  	// - Format: `ddd:hh24:mi-ddd:hh24:mi`
   260  	// - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
   261  	// - Constraints: Minimum 30-minute window.
   262  	PreferredMaintenanceWindow *string `pulumi:"preferredMaintenanceWindow"`
   263  	// 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.
   264  	PubliclyAccessible *bool `pulumi:"publiclyAccessible"`
   265  	// The Amazon Resource Name (ARN) of the replication instance.
   266  	ReplicationInstanceArn *string `pulumi:"replicationInstanceArn"`
   267  	// 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.
   268  	ReplicationInstanceClass *string `pulumi:"replicationInstanceClass"`
   269  	// The replication instance identifier. This parameter is stored as a lowercase string.
   270  	//
   271  	// - Must contain from 1 to 63 alphanumeric characters or hyphens.
   272  	// - First character must be a letter.
   273  	// - Cannot end with a hyphen
   274  	// - Cannot contain two consecutive hyphens.
   275  	ReplicationInstanceId *string `pulumi:"replicationInstanceId"`
   276  	// A list of the private IP addresses of the replication instance.
   277  	ReplicationInstancePrivateIps []string `pulumi:"replicationInstancePrivateIps"`
   278  	// A list of the public IP addresses of the replication instance.
   279  	ReplicationInstancePublicIps []string `pulumi:"replicationInstancePublicIps"`
   280  	// A subnet group to associate with the replication instance.
   281  	ReplicationSubnetGroupId *string `pulumi:"replicationSubnetGroupId"`
   282  	// 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.
   283  	Tags map[string]string `pulumi:"tags"`
   284  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   285  	//
   286  	// Deprecated: Please use `tags` instead.
   287  	TagsAll map[string]string `pulumi:"tagsAll"`
   288  	// 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.
   289  	VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
   290  }
   291  
   292  type ReplicationInstanceState struct {
   293  	// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
   294  	AllocatedStorage pulumi.IntPtrInput
   295  	// Indicates that major version upgrades are allowed.
   296  	AllowMajorVersionUpgrade pulumi.BoolPtrInput
   297  	// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
   298  	ApplyImmediately pulumi.BoolPtrInput
   299  	// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
   300  	AutoMinorVersionUpgrade pulumi.BoolPtrInput
   301  	// The EC2 Availability Zone that the replication instance will be created in.
   302  	AvailabilityZone pulumi.StringPtrInput
   303  	// The engine version number of the replication instance.
   304  	EngineVersion pulumi.StringPtrInput
   305  	// 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 `kmsKeyArn`, 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.
   306  	KmsKeyArn pulumi.StringPtrInput
   307  	// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
   308  	MultiAz pulumi.BoolPtrInput
   309  	// The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
   310  	NetworkType pulumi.StringPtrInput
   311  	// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
   312  	//
   313  	// - 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.
   314  	// - Format: `ddd:hh24:mi-ddd:hh24:mi`
   315  	// - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
   316  	// - Constraints: Minimum 30-minute window.
   317  	PreferredMaintenanceWindow pulumi.StringPtrInput
   318  	// 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.
   319  	PubliclyAccessible pulumi.BoolPtrInput
   320  	// The Amazon Resource Name (ARN) of the replication instance.
   321  	ReplicationInstanceArn pulumi.StringPtrInput
   322  	// 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.
   323  	ReplicationInstanceClass pulumi.StringPtrInput
   324  	// The replication instance identifier. This parameter is stored as a lowercase string.
   325  	//
   326  	// - Must contain from 1 to 63 alphanumeric characters or hyphens.
   327  	// - First character must be a letter.
   328  	// - Cannot end with a hyphen
   329  	// - Cannot contain two consecutive hyphens.
   330  	ReplicationInstanceId pulumi.StringPtrInput
   331  	// A list of the private IP addresses of the replication instance.
   332  	ReplicationInstancePrivateIps pulumi.StringArrayInput
   333  	// A list of the public IP addresses of the replication instance.
   334  	ReplicationInstancePublicIps pulumi.StringArrayInput
   335  	// A subnet group to associate with the replication instance.
   336  	ReplicationSubnetGroupId pulumi.StringPtrInput
   337  	// 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.
   338  	Tags pulumi.StringMapInput
   339  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   340  	//
   341  	// Deprecated: Please use `tags` instead.
   342  	TagsAll pulumi.StringMapInput
   343  	// 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.
   344  	VpcSecurityGroupIds pulumi.StringArrayInput
   345  }
   346  
   347  func (ReplicationInstanceState) ElementType() reflect.Type {
   348  	return reflect.TypeOf((*replicationInstanceState)(nil)).Elem()
   349  }
   350  
   351  type replicationInstanceArgs struct {
   352  	// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
   353  	AllocatedStorage *int `pulumi:"allocatedStorage"`
   354  	// Indicates that major version upgrades are allowed.
   355  	AllowMajorVersionUpgrade *bool `pulumi:"allowMajorVersionUpgrade"`
   356  	// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
   357  	ApplyImmediately *bool `pulumi:"applyImmediately"`
   358  	// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
   359  	AutoMinorVersionUpgrade *bool `pulumi:"autoMinorVersionUpgrade"`
   360  	// The EC2 Availability Zone that the replication instance will be created in.
   361  	AvailabilityZone *string `pulumi:"availabilityZone"`
   362  	// The engine version number of the replication instance.
   363  	EngineVersion *string `pulumi:"engineVersion"`
   364  	// 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 `kmsKeyArn`, 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.
   365  	KmsKeyArn *string `pulumi:"kmsKeyArn"`
   366  	// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
   367  	MultiAz *bool `pulumi:"multiAz"`
   368  	// The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
   369  	NetworkType *string `pulumi:"networkType"`
   370  	// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
   371  	//
   372  	// - 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.
   373  	// - Format: `ddd:hh24:mi-ddd:hh24:mi`
   374  	// - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
   375  	// - Constraints: Minimum 30-minute window.
   376  	PreferredMaintenanceWindow *string `pulumi:"preferredMaintenanceWindow"`
   377  	// 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.
   378  	PubliclyAccessible *bool `pulumi:"publiclyAccessible"`
   379  	// 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.
   380  	ReplicationInstanceClass string `pulumi:"replicationInstanceClass"`
   381  	// The replication instance identifier. This parameter is stored as a lowercase string.
   382  	//
   383  	// - Must contain from 1 to 63 alphanumeric characters or hyphens.
   384  	// - First character must be a letter.
   385  	// - Cannot end with a hyphen
   386  	// - Cannot contain two consecutive hyphens.
   387  	ReplicationInstanceId string `pulumi:"replicationInstanceId"`
   388  	// A subnet group to associate with the replication instance.
   389  	ReplicationSubnetGroupId *string `pulumi:"replicationSubnetGroupId"`
   390  	// 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.
   391  	Tags map[string]string `pulumi:"tags"`
   392  	// 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.
   393  	VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
   394  }
   395  
   396  // The set of arguments for constructing a ReplicationInstance resource.
   397  type ReplicationInstanceArgs struct {
   398  	// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
   399  	AllocatedStorage pulumi.IntPtrInput
   400  	// Indicates that major version upgrades are allowed.
   401  	AllowMajorVersionUpgrade pulumi.BoolPtrInput
   402  	// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
   403  	ApplyImmediately pulumi.BoolPtrInput
   404  	// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
   405  	AutoMinorVersionUpgrade pulumi.BoolPtrInput
   406  	// The EC2 Availability Zone that the replication instance will be created in.
   407  	AvailabilityZone pulumi.StringPtrInput
   408  	// The engine version number of the replication instance.
   409  	EngineVersion pulumi.StringPtrInput
   410  	// 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 `kmsKeyArn`, 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.
   411  	KmsKeyArn pulumi.StringPtrInput
   412  	// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
   413  	MultiAz pulumi.BoolPtrInput
   414  	// The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
   415  	NetworkType pulumi.StringPtrInput
   416  	// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
   417  	//
   418  	// - 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.
   419  	// - Format: `ddd:hh24:mi-ddd:hh24:mi`
   420  	// - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
   421  	// - Constraints: Minimum 30-minute window.
   422  	PreferredMaintenanceWindow pulumi.StringPtrInput
   423  	// 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.
   424  	PubliclyAccessible pulumi.BoolPtrInput
   425  	// 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.
   426  	ReplicationInstanceClass pulumi.StringInput
   427  	// The replication instance identifier. This parameter is stored as a lowercase string.
   428  	//
   429  	// - Must contain from 1 to 63 alphanumeric characters or hyphens.
   430  	// - First character must be a letter.
   431  	// - Cannot end with a hyphen
   432  	// - Cannot contain two consecutive hyphens.
   433  	ReplicationInstanceId pulumi.StringInput
   434  	// A subnet group to associate with the replication instance.
   435  	ReplicationSubnetGroupId pulumi.StringPtrInput
   436  	// 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.
   437  	Tags pulumi.StringMapInput
   438  	// 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.
   439  	VpcSecurityGroupIds pulumi.StringArrayInput
   440  }
   441  
   442  func (ReplicationInstanceArgs) ElementType() reflect.Type {
   443  	return reflect.TypeOf((*replicationInstanceArgs)(nil)).Elem()
   444  }
   445  
   446  type ReplicationInstanceInput interface {
   447  	pulumi.Input
   448  
   449  	ToReplicationInstanceOutput() ReplicationInstanceOutput
   450  	ToReplicationInstanceOutputWithContext(ctx context.Context) ReplicationInstanceOutput
   451  }
   452  
   453  func (*ReplicationInstance) ElementType() reflect.Type {
   454  	return reflect.TypeOf((**ReplicationInstance)(nil)).Elem()
   455  }
   456  
   457  func (i *ReplicationInstance) ToReplicationInstanceOutput() ReplicationInstanceOutput {
   458  	return i.ToReplicationInstanceOutputWithContext(context.Background())
   459  }
   460  
   461  func (i *ReplicationInstance) ToReplicationInstanceOutputWithContext(ctx context.Context) ReplicationInstanceOutput {
   462  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationInstanceOutput)
   463  }
   464  
   465  // ReplicationInstanceArrayInput is an input type that accepts ReplicationInstanceArray and ReplicationInstanceArrayOutput values.
   466  // You can construct a concrete instance of `ReplicationInstanceArrayInput` via:
   467  //
   468  //	ReplicationInstanceArray{ ReplicationInstanceArgs{...} }
   469  type ReplicationInstanceArrayInput interface {
   470  	pulumi.Input
   471  
   472  	ToReplicationInstanceArrayOutput() ReplicationInstanceArrayOutput
   473  	ToReplicationInstanceArrayOutputWithContext(context.Context) ReplicationInstanceArrayOutput
   474  }
   475  
   476  type ReplicationInstanceArray []ReplicationInstanceInput
   477  
   478  func (ReplicationInstanceArray) ElementType() reflect.Type {
   479  	return reflect.TypeOf((*[]*ReplicationInstance)(nil)).Elem()
   480  }
   481  
   482  func (i ReplicationInstanceArray) ToReplicationInstanceArrayOutput() ReplicationInstanceArrayOutput {
   483  	return i.ToReplicationInstanceArrayOutputWithContext(context.Background())
   484  }
   485  
   486  func (i ReplicationInstanceArray) ToReplicationInstanceArrayOutputWithContext(ctx context.Context) ReplicationInstanceArrayOutput {
   487  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationInstanceArrayOutput)
   488  }
   489  
   490  // ReplicationInstanceMapInput is an input type that accepts ReplicationInstanceMap and ReplicationInstanceMapOutput values.
   491  // You can construct a concrete instance of `ReplicationInstanceMapInput` via:
   492  //
   493  //	ReplicationInstanceMap{ "key": ReplicationInstanceArgs{...} }
   494  type ReplicationInstanceMapInput interface {
   495  	pulumi.Input
   496  
   497  	ToReplicationInstanceMapOutput() ReplicationInstanceMapOutput
   498  	ToReplicationInstanceMapOutputWithContext(context.Context) ReplicationInstanceMapOutput
   499  }
   500  
   501  type ReplicationInstanceMap map[string]ReplicationInstanceInput
   502  
   503  func (ReplicationInstanceMap) ElementType() reflect.Type {
   504  	return reflect.TypeOf((*map[string]*ReplicationInstance)(nil)).Elem()
   505  }
   506  
   507  func (i ReplicationInstanceMap) ToReplicationInstanceMapOutput() ReplicationInstanceMapOutput {
   508  	return i.ToReplicationInstanceMapOutputWithContext(context.Background())
   509  }
   510  
   511  func (i ReplicationInstanceMap) ToReplicationInstanceMapOutputWithContext(ctx context.Context) ReplicationInstanceMapOutput {
   512  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationInstanceMapOutput)
   513  }
   514  
   515  type ReplicationInstanceOutput struct{ *pulumi.OutputState }
   516  
   517  func (ReplicationInstanceOutput) ElementType() reflect.Type {
   518  	return reflect.TypeOf((**ReplicationInstance)(nil)).Elem()
   519  }
   520  
   521  func (o ReplicationInstanceOutput) ToReplicationInstanceOutput() ReplicationInstanceOutput {
   522  	return o
   523  }
   524  
   525  func (o ReplicationInstanceOutput) ToReplicationInstanceOutputWithContext(ctx context.Context) ReplicationInstanceOutput {
   526  	return o
   527  }
   528  
   529  // The amount of storage (in gigabytes) to be initially allocated for the replication instance.
   530  func (o ReplicationInstanceOutput) AllocatedStorage() pulumi.IntOutput {
   531  	return o.ApplyT(func(v *ReplicationInstance) pulumi.IntOutput { return v.AllocatedStorage }).(pulumi.IntOutput)
   532  }
   533  
   534  // Indicates that major version upgrades are allowed.
   535  func (o ReplicationInstanceOutput) AllowMajorVersionUpgrade() pulumi.BoolPtrOutput {
   536  	return o.ApplyT(func(v *ReplicationInstance) pulumi.BoolPtrOutput { return v.AllowMajorVersionUpgrade }).(pulumi.BoolPtrOutput)
   537  }
   538  
   539  // Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
   540  func (o ReplicationInstanceOutput) ApplyImmediately() pulumi.BoolPtrOutput {
   541  	return o.ApplyT(func(v *ReplicationInstance) pulumi.BoolPtrOutput { return v.ApplyImmediately }).(pulumi.BoolPtrOutput)
   542  }
   543  
   544  // Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
   545  func (o ReplicationInstanceOutput) AutoMinorVersionUpgrade() pulumi.BoolOutput {
   546  	return o.ApplyT(func(v *ReplicationInstance) pulumi.BoolOutput { return v.AutoMinorVersionUpgrade }).(pulumi.BoolOutput)
   547  }
   548  
   549  // The EC2 Availability Zone that the replication instance will be created in.
   550  func (o ReplicationInstanceOutput) AvailabilityZone() pulumi.StringOutput {
   551  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.AvailabilityZone }).(pulumi.StringOutput)
   552  }
   553  
   554  // The engine version number of the replication instance.
   555  func (o ReplicationInstanceOutput) EngineVersion() pulumi.StringOutput {
   556  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput)
   557  }
   558  
   559  // 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 `kmsKeyArn`, 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.
   560  func (o ReplicationInstanceOutput) KmsKeyArn() pulumi.StringOutput {
   561  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.KmsKeyArn }).(pulumi.StringOutput)
   562  }
   563  
   564  // Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
   565  func (o ReplicationInstanceOutput) MultiAz() pulumi.BoolOutput {
   566  	return o.ApplyT(func(v *ReplicationInstance) pulumi.BoolOutput { return v.MultiAz }).(pulumi.BoolOutput)
   567  }
   568  
   569  // The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
   570  func (o ReplicationInstanceOutput) NetworkType() pulumi.StringOutput {
   571  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.NetworkType }).(pulumi.StringOutput)
   572  }
   573  
   574  // The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
   575  //
   576  // - 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.
   577  // - Format: `ddd:hh24:mi-ddd:hh24:mi`
   578  // - Valid Days: `mon, tue, wed, thu, fri, sat, sun`
   579  // - Constraints: Minimum 30-minute window.
   580  func (o ReplicationInstanceOutput) PreferredMaintenanceWindow() pulumi.StringOutput {
   581  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.PreferredMaintenanceWindow }).(pulumi.StringOutput)
   582  }
   583  
   584  // 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.
   585  func (o ReplicationInstanceOutput) PubliclyAccessible() pulumi.BoolOutput {
   586  	return o.ApplyT(func(v *ReplicationInstance) pulumi.BoolOutput { return v.PubliclyAccessible }).(pulumi.BoolOutput)
   587  }
   588  
   589  // The Amazon Resource Name (ARN) of the replication instance.
   590  func (o ReplicationInstanceOutput) ReplicationInstanceArn() pulumi.StringOutput {
   591  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.ReplicationInstanceArn }).(pulumi.StringOutput)
   592  }
   593  
   594  // 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.
   595  func (o ReplicationInstanceOutput) ReplicationInstanceClass() pulumi.StringOutput {
   596  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.ReplicationInstanceClass }).(pulumi.StringOutput)
   597  }
   598  
   599  // The replication instance identifier. This parameter is stored as a lowercase string.
   600  //
   601  // - Must contain from 1 to 63 alphanumeric characters or hyphens.
   602  // - First character must be a letter.
   603  // - Cannot end with a hyphen
   604  // - Cannot contain two consecutive hyphens.
   605  func (o ReplicationInstanceOutput) ReplicationInstanceId() pulumi.StringOutput {
   606  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.ReplicationInstanceId }).(pulumi.StringOutput)
   607  }
   608  
   609  // A list of the private IP addresses of the replication instance.
   610  func (o ReplicationInstanceOutput) ReplicationInstancePrivateIps() pulumi.StringArrayOutput {
   611  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringArrayOutput { return v.ReplicationInstancePrivateIps }).(pulumi.StringArrayOutput)
   612  }
   613  
   614  // A list of the public IP addresses of the replication instance.
   615  func (o ReplicationInstanceOutput) ReplicationInstancePublicIps() pulumi.StringArrayOutput {
   616  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringArrayOutput { return v.ReplicationInstancePublicIps }).(pulumi.StringArrayOutput)
   617  }
   618  
   619  // A subnet group to associate with the replication instance.
   620  func (o ReplicationInstanceOutput) ReplicationSubnetGroupId() pulumi.StringOutput {
   621  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringOutput { return v.ReplicationSubnetGroupId }).(pulumi.StringOutput)
   622  }
   623  
   624  // 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.
   625  func (o ReplicationInstanceOutput) Tags() pulumi.StringMapOutput {
   626  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   627  }
   628  
   629  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   630  //
   631  // Deprecated: Please use `tags` instead.
   632  func (o ReplicationInstanceOutput) TagsAll() pulumi.StringMapOutput {
   633  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   634  }
   635  
   636  // 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.
   637  func (o ReplicationInstanceOutput) VpcSecurityGroupIds() pulumi.StringArrayOutput {
   638  	return o.ApplyT(func(v *ReplicationInstance) pulumi.StringArrayOutput { return v.VpcSecurityGroupIds }).(pulumi.StringArrayOutput)
   639  }
   640  
   641  type ReplicationInstanceArrayOutput struct{ *pulumi.OutputState }
   642  
   643  func (ReplicationInstanceArrayOutput) ElementType() reflect.Type {
   644  	return reflect.TypeOf((*[]*ReplicationInstance)(nil)).Elem()
   645  }
   646  
   647  func (o ReplicationInstanceArrayOutput) ToReplicationInstanceArrayOutput() ReplicationInstanceArrayOutput {
   648  	return o
   649  }
   650  
   651  func (o ReplicationInstanceArrayOutput) ToReplicationInstanceArrayOutputWithContext(ctx context.Context) ReplicationInstanceArrayOutput {
   652  	return o
   653  }
   654  
   655  func (o ReplicationInstanceArrayOutput) Index(i pulumi.IntInput) ReplicationInstanceOutput {
   656  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicationInstance {
   657  		return vs[0].([]*ReplicationInstance)[vs[1].(int)]
   658  	}).(ReplicationInstanceOutput)
   659  }
   660  
   661  type ReplicationInstanceMapOutput struct{ *pulumi.OutputState }
   662  
   663  func (ReplicationInstanceMapOutput) ElementType() reflect.Type {
   664  	return reflect.TypeOf((*map[string]*ReplicationInstance)(nil)).Elem()
   665  }
   666  
   667  func (o ReplicationInstanceMapOutput) ToReplicationInstanceMapOutput() ReplicationInstanceMapOutput {
   668  	return o
   669  }
   670  
   671  func (o ReplicationInstanceMapOutput) ToReplicationInstanceMapOutputWithContext(ctx context.Context) ReplicationInstanceMapOutput {
   672  	return o
   673  }
   674  
   675  func (o ReplicationInstanceMapOutput) MapIndex(k pulumi.StringInput) ReplicationInstanceOutput {
   676  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicationInstance {
   677  		return vs[0].(map[string]*ReplicationInstance)[vs[1].(string)]
   678  	}).(ReplicationInstanceOutput)
   679  }
   680  
   681  func init() {
   682  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationInstanceInput)(nil)).Elem(), &ReplicationInstance{})
   683  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationInstanceArrayInput)(nil)).Elem(), ReplicationInstanceArray{})
   684  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationInstanceMapInput)(nil)).Elem(), ReplicationInstanceMap{})
   685  	pulumi.RegisterOutputType(ReplicationInstanceOutput{})
   686  	pulumi.RegisterOutputType(ReplicationInstanceArrayOutput{})
   687  	pulumi.RegisterOutputType(ReplicationInstanceMapOutput{})
   688  }