CreateReplicationInstance - Amazon Database Migration Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CreateReplicationInstance

Creates the replication instance using the specified parameters.

Amazon DMS requires that your account have certain roles with appropriate permissions before you can create a replication instance. For information on the required roles, see Creating the IAM Roles to Use With the Amazon CLI and Amazon DMS API. For information on the required permissions, see IAM Permissions Needed to Use Amazon DMS.

Note

If you don't specify a version when creating a replication instance, Amazon DMS will create the instance using the default engine version. For information about the default engine version, see Release Notes.

Request Syntax

{ "AllocatedStorage": number, "AutoMinorVersionUpgrade": boolean, "AvailabilityZone": "string", "DnsNameServers": "string", "EngineVersion": "string", "KmsKeyId": "string", "MultiAZ": boolean, "NetworkType": "string", "PreferredMaintenanceWindow": "string", "PubliclyAccessible": boolean, "ReplicationInstanceClass": "string", "ReplicationInstanceIdentifier": "string", "ReplicationSubnetGroupIdentifier": "string", "ResourceIdentifier": "string", "Tags": [ { "Key": "string", "ResourceArn": "string", "Value": "string" } ], "VpcSecurityGroupIds": [ "string" ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AllocatedStorage

The amount of storage (in gigabytes) to be initially allocated for the replication instance.

Type: Integer

Required: No

AutoMinorVersionUpgrade

A value that indicates whether minor engine upgrades are applied automatically to the replication instance during the maintenance window. This parameter defaults to true.

Default: true

Type: Boolean

Required: No

AvailabilityZone

The Availability Zone where the replication instance will be created. The default value is a random, system-chosen Availability Zone in the endpoint's Amazon Web Services Region, for example: us-east-1d.

Type: String

Required: No

DnsNameServers

A list of custom DNS name servers supported for the replication instance to access your on-premise source or target database. This list overrides the default name servers supported by the replication instance. You can specify a comma-separated list of internet addresses for up to four on-premise DNS name servers. For example: "1.1.1.1,2.2.2.2,3.3.3.3,4.4.4.4"

Type: String

Required: No

EngineVersion

The engine version number of the replication instance.

If an engine version number is not specified when a replication instance is created, the default is the latest engine version available.

Type: String

Required: No

KmsKeyId

An Amazon KMS key identifier that is used to encrypt the data on the replication instance.

If you don't specify a value for the KmsKeyId parameter, then Amazon DMS uses your default encryption key.

Amazon KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.

Type: String

Required: No

MultiAZ

Specifies whether the replication instance is a Multi-AZ deployment. You can't set the AvailabilityZone parameter if the Multi-AZ parameter is set to true.

Type: Boolean

Required: No

NetworkType

The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.

Type: String

Required: No

PreferredMaintenanceWindow

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format: ddd:hh24:mi-ddd:hh24:mi

Default: A 30-minute window selected at random from an 8-hour block of time per Amazon Web Services Region, occurring on a random day of the week.

Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints: Minimum 30-minute window.

Type: String

Required: No

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. The default value is true.

Type: Boolean

Required: No

ReplicationInstanceClass

The compute and memory capacity of the replication instance as defined for the specified replication instance class. For example to specify the instance class dms.c4.large, set this parameter to "dms.c4.large".

For more information on the settings and capacities for the available replication instance classes, see Choosing the right Amazon DMS replication instance; and, Selecting the best size for a replication instance.

Type: String

Required: Yes

ReplicationInstanceIdentifier

The replication instance identifier. This parameter is stored as a lowercase string.

Constraints:

  • Must contain 1-63 alphanumeric characters or hyphens.

  • First character must be a letter.

  • Can't end with a hyphen or contain two consecutive hyphens.

Example: myrepinstance

Type: String

Required: Yes

ReplicationSubnetGroupIdentifier

A subnet group to associate with the replication instance.

Type: String

Required: No

ResourceIdentifier

A friendly name for the resource identifier at the end of the EndpointArn response parameter that is returned in the created Endpoint object. The value for this parameter can have up to 31 characters. It can contain only ASCII letters, digits, and hyphen ('-'). Also, it can't end with a hyphen or contain two consecutive hyphens, and can only begin with a letter, such as Example-App-ARN1. For example, this value might result in the EndpointArn value arn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1. If you don't specify a ResourceIdentifier value, Amazon DMS generates a default identifier value for the end of EndpointArn.

Type: String

Required: No

Tags

One or more tags to be assigned to the replication instance.

Type: Array of Tag objects

Required: No

VpcSecurityGroupIds

Specifies the VPC security group to be used with the replication instance. The VPC security group must work with the VPC containing the replication instance.

Type: Array of strings

Required: No

Response Syntax

{ "ReplicationInstance": { "AllocatedStorage": number, "AutoMinorVersionUpgrade": boolean, "AvailabilityZone": "string", "DnsNameServers": "string", "EngineVersion": "string", "FreeUntil": number, "InstanceCreateTime": number, "KmsKeyId": "string", "MultiAZ": boolean, "NetworkType": "string", "PendingModifiedValues": { "AllocatedStorage": number, "EngineVersion": "string", "MultiAZ": boolean, "NetworkType": "string", "ReplicationInstanceClass": "string" }, "PreferredMaintenanceWindow": "string", "PubliclyAccessible": boolean, "ReplicationInstanceArn": "string", "ReplicationInstanceClass": "string", "ReplicationInstanceIdentifier": "string", "ReplicationInstanceIpv6Addresses": [ "string" ], "ReplicationInstancePrivateIpAddress": "string", "ReplicationInstancePrivateIpAddresses": [ "string" ], "ReplicationInstancePublicIpAddress": "string", "ReplicationInstancePublicIpAddresses": [ "string" ], "ReplicationInstanceStatus": "string", "ReplicationSubnetGroup": { "ReplicationSubnetGroupDescription": "string", "ReplicationSubnetGroupIdentifier": "string", "SubnetGroupStatus": "string", "Subnets": [ { "SubnetAvailabilityZone": { "Name": "string" }, "SubnetIdentifier": "string", "SubnetStatus": "string" } ], "SupportedNetworkTypes": [ "string" ], "VpcId": "string" }, "SecondaryAvailabilityZone": "string", "VpcSecurityGroups": [ { "Status": "string", "VpcSecurityGroupId": "string" } ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ReplicationInstance

The replication instance that was created.

Type: ReplicationInstance object

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedFault

Amazon DMS was denied access to the endpoint. Check that the role is correctly configured.

HTTP Status Code: 400

InsufficientResourceCapacityFault

There are not enough resources allocated to the database migration.

HTTP Status Code: 400

InvalidResourceStateFault

The resource is in a state that prevents it from being used for database migration.

HTTP Status Code: 400

InvalidSubnet

The subnet provided isn't valid.

HTTP Status Code: 400

KMSKeyNotAccessibleFault

Amazon DMS cannot access the KMS key.

HTTP Status Code: 400

ReplicationSubnetGroupDoesNotCoverEnoughAZs

The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet group and add more AZs.

HTTP Status Code: 400

ResourceAlreadyExistsFault

The resource you are attempting to create already exists.

HTTP Status Code: 400

ResourceNotFoundFault

The resource could not be found.

HTTP Status Code: 400

ResourceQuotaExceededFault

The quota for this resource quota has been exceeded.

HTTP Status Code: 400

StorageQuotaExceededFault

The storage quota has been exceeded.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of CreateReplicationInstance.

Sample Request

POST / HTTP/1.1 Host: dms.<region>.<domain> x-amz-Date: <Date> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature> User-Agent: <UserAgentString> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Connection: Keep-Alive X-Amz-Target: AmazonDMSv20160101.CreateReplicationInstance { "ReplicationInstanceIdentifier":"test-rep-1", "AllocatedStorage":5, "ReplicationInstanceClass":"dms.t2.micro", "AvailabilityZone":"", "ReplicationSubnetGroupIdentifier":"default", "PreferredMaintenanceWindow":"", "EngineVersion":"1.5.0", "AutoMinorVersionUpgrade":true, "NetworkType":"IPv4", "Tags":[ { "Key":"", "Value":"" } ], "KmsKeyId":"", "PubliclyAccessible":true }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date> { "ReplicationInstance":{ "PubliclyAccessible":true, "ReplicationInstanceArn":"arn:aws:dms:us-east- 1:123456789012:rep:PWEBBEUNOLU7VEB2OHTEH4I4GQ", "ReplicationInstanceClass":"dms.t2.micro", "ReplicationSubnetGroup":{ "ReplicationSubnetGroupDescription":"default", "Subnets":[ { "SubnetStatus":"Active", "SubnetIdentifier":"subnet-f6dd91af", "SubnetAvailabilityZone":{ "Name":"us-east-1d" } }, { "SubnetStatus":"Active", "SubnetIdentifier":"subnet-3605751d", "SubnetAvailabilityZone":{ "Name":"us-east-1b" } }, { "SubnetStatus":"Active", "SubnetIdentifier":"subnet-c2daefb5", "SubnetAvailabilityZone":{ "Name":"us-east-1c" } }, { "SubnetStatus":"Active", "SubnetIdentifier":"subnet-85e90cb8", "SubnetAvailabilityZone":{ "Name":"us-east-1e" } } ], "VpcId":"vpc-6741a603", "SubnetGroupStatus":"Complete", "ReplicationSubnetGroupIdentifier":"default" }, "AutoMinorVersionUpgrade":true, "ReplicationInstanceStatus":"creating", "KmsKeyId":"arn:aws:kms:us-east-1:123456789012:key/4dc17316-5543- 4ded-b1e3-d53a7cfb411d", "AllocatedStorage":5, "NetworkType":"IPv4", "EngineVersion":"1.5.0", "ReplicationInstanceIdentifier":"test-rep-1", "PreferredMaintenanceWindow":"sun:06:00-sun:14:00", "PendingModifiedValues":{ } } }

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: