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