public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonIoTConfig config = new AmazonIoTConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonIoTClient client = new AmazonIoTClient(creds, config); ListThingTypesResponse resp = new ListThingTypesResponse(); do { ListThingTypesRequest req = new ListThingTypesRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListThingTypes(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.ThingTypes) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }