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