public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonGameLiftConfig config = new AmazonGameLiftConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonGameLiftClient client = new AmazonGameLiftClient(creds, config); DescribeInstancesResponse resp = new DescribeInstancesResponse(); do { DescribeInstancesRequest req = new DescribeInstancesRequest { NextToken = resp.NextToken , Limit = maxItems }; resp = client.DescribeInstances(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Instances) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }