Menu
AWS Database Migration Service
API Reference (API Version 2016-01-01)

StartReplicationTask

Starts the replication task.

For more information about AWS DMS tasks, see the AWS DMS user guide at Working with Migration Tasks

Request Syntax

{ "CdcStartTime": number, "ReplicationTaskArn": "string", "StartReplicationTaskType": "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.

CdcStartTime

The start time for the Change Data Capture (CDC) operation.

Type: Timestamp

Required: No

ReplicationTaskArn

The Amazon Resource Name (ARN) of the replication task to be started.

Type: String

Required: Yes

StartReplicationTaskType

The type of replication task.

Type: String

Valid Values: start-replication | resume-processing | reload-target

Required: Yes

Response Syntax

{ "ReplicationTask": { "LastFailureMessage": "string", "MigrationType": "string", "ReplicationInstanceArn": "string", "ReplicationTaskArn": "string", "ReplicationTaskCreationDate": number, "ReplicationTaskIdentifier": "string", "ReplicationTaskSettings": "string", "ReplicationTaskStartDate": number, "ReplicationTaskStats": { "ElapsedTimeMillis": number, "FullLoadProgressPercent": number, "TablesErrored": number, "TablesLoaded": number, "TablesLoading": number, "TablesQueued": number }, "SourceEndpointArn": "string", "Status": "string", "StopReason": "string", "TableMappings": "string", "TargetEndpointArn": "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.

ReplicationTask

The replication task started.

Type: ReplicationTask object

Errors

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

InvalidResourceStateFault

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

HTTP Status Code: 400

ResourceNotFoundFault

The resource could not be found.

HTTP Status Code: 400

Example

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.StartReplicationTask { "ReplicationTaskArn":"arn:aws:dms:us-east- 1:152683116123:task:RALPZGYI3IUSJCBKKIRBEURKDY", "StartReplicationTaskType":"reload-target", "CdcStartTime":null }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date> { "ReplicationTask":{ "SourceEndpointArn":"arn:aws:dms:us-east- 1:152683116123:endpoint:RZZK4EZW5UANC7Y3P4E776WHBE", "ReplicationTaskIdentifier":"aks145", "ReplicationInstanceArn":"arn:aws:dms:us-east- 1:152683116123:rep:6USOU366XFJUWATDJGBCJS3VIQ", "TableMappings":"{ \n\t\"TableMappings\": [ { \n\t\t\"Type\": \"Include\",\n\t\t \"SourceSchema\": \"testDB\",\n\t\t \"SourceTable\": \"%\" \n\t}, { \n\t\t\"Type\": \"Include\",\n\t\t \"SourceSchema\": \"testDB\",\n\t\t \"SourceTable\": \"%\" \n\t} ]\n}", "ReplicationTaskStartDate":1457658794.056, "Status":"starting", "ReplicationTaskArn":"arn:aws:dms:us-east- 1:152683116123:task:RALPZGYI3IUSJCBKKIRBEURKDY", "ReplicationTaskCreationDate":1449185680.107, "MigrationType":"full-load", "TargetEndpointArn":"arn:aws:dms:us-east- 1:152683116123:endpoint:GVBUJQXJZASXWHTWCLN2WNT57E", "ReplicationTaskSettings":"{\"TargetMetadata\":{\"TargetSchema\":\"\",\"SupportLobs\":true,\"FullLobMod e\":true,\"LobChunkSize\":64,\"LimitedSizeLobMode\":false,\"LobMaxSize\":0},\ " FullLoadSettings\":{ \"FullLoadEnabled\":true, \" TargetTablePrepMode\":\"DO_NOTHING\", \"CreatePkAfterFullLoad\":false, \"StopTaskCachedChangesApplied\":false, \"StopTaskCachedChangesNotApplied\":false, \"Re sumeEnabled\":false, \"ResumeMinTableSize\":100000, \"ResumeOnlyClusteredPKTabl es\":true, \"MaxFullLoadSubTasks\":8, \"TransactionConsistencyTimeout\":600, \"C ommitRate\":10000 } } " } }

See Also

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