public void DatabaseMigrationServiceCreateReplicationTask()
        {
            #region create-replication-task-1481747646288

            var response = client.CreateReplicationTask(new CreateReplicationTaskRequest
            {
                CdcStartTime              = new DateTime(2016, 12, 14, 10, 25, 43),
                MigrationType             = "full-load",
                ReplicationInstanceArn    = "arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ",
                ReplicationTaskIdentifier = "task1",
                ReplicationTaskSettings   = "",
                SourceEndpointArn         = "arn:aws:dms:us-east-1:123456789012:endpoint:ZW5UAN6P4E77EC7YWHK4RZZ3BE",
                TableMappings             = "file://mappingfile.json",
                Tags = new List <Tag> {
                    new Tag {
                        Key   = "Acount",
                        Value = "24352226"
                    }
                },
                TargetEndpointArn = "arn:aws:dms:us-east-1:123456789012:endpoint:ASXWXJZLNWNT5HTWCGV2BUJQ7E"
            });

            ReplicationTask replicationTask = response.ReplicationTask;

            #endregion
        }
Пример #2
0
 private Amazon.DatabaseMigrationService.Model.CreateReplicationTaskResponse CallAWSServiceOperation(IAmazonDatabaseMigrationService client, Amazon.DatabaseMigrationService.Model.CreateReplicationTaskRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Database Migration Service", "CreateReplicationTask");
     try
     {
         #if DESKTOP
         return(client.CreateReplicationTask(request));
         #elif CORECLR
         return(client.CreateReplicationTaskAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }