public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonStepFunctionsConfig config = new AmazonStepFunctionsConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonStepFunctionsClient client = new AmazonStepFunctionsClient(creds, config); ListStateMachinesResponse resp = new ListStateMachinesResponse(); do { ListStateMachinesRequest req = new ListStateMachinesRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListStateMachines(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.StateMachines) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }