public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonTranscribeServiceConfig config = new AmazonTranscribeServiceConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonTranscribeServiceClient client = new AmazonTranscribeServiceClient(creds, config); ListTranscriptionJobsResponse resp = new ListTranscriptionJobsResponse(); do { ListTranscriptionJobsRequest req = new ListTranscriptionJobsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListTranscriptionJobs(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.TranscriptionJobSummaries) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
protected IAmazonTranscribeService CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonTranscribeServiceConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonTranscribeServiceClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }