public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonElasticBeanstalkConfig config = new AmazonElasticBeanstalkConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonElasticBeanstalkClient client = new AmazonElasticBeanstalkClient(creds, config); ListPlatformBranchesResponse resp = new ListPlatformBranchesResponse(); do { ListPlatformBranchesRequest req = new ListPlatformBranchesRequest { NextToken = resp.NextToken , MaxRecords = maxItems }; resp = client.ListPlatformBranches(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.PlatformBranchSummaryList) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }