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); ListAuditFindingsResponse resp = new ListAuditFindingsResponse(); do { ListAuditFindingsRequest req = new ListAuditFindingsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListAuditFindings(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Findings) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }