public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonDatabaseMigrationServiceConfig config = new AmazonDatabaseMigrationServiceConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonDatabaseMigrationServiceClient client = new AmazonDatabaseMigrationServiceClient(creds, config); DescribeReplicationTaskAssessmentResultsResponse resp = new DescribeReplicationTaskAssessmentResultsResponse(); do { DescribeReplicationTaskAssessmentResultsRequest req = new DescribeReplicationTaskAssessmentResultsRequest { Marker = resp.Marker , MaxRecords = maxItems }; resp = client.DescribeReplicationTaskAssessmentResults(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.BucketName) { AddObject(obj); } foreach (var obj in resp.ReplicationTaskAssessmentResults) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.Marker)); }
protected IAmazonDatabaseMigrationService CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonDatabaseMigrationServiceConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonDatabaseMigrationServiceClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }