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