public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonBatchConfig config = new AmazonBatchConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonBatchClient client = new AmazonBatchClient(creds, config); ListJobsResponse resp = new ListJobsResponse(); do { ListJobsRequest req = new ListJobsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListJobs(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.JobSummaryList) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
public void BatchListJobs() { #region to-list-running-jobs-1481154202164 var client = new AmazonBatchClient(); var response = client.ListJobs(new ListJobsRequest { JobQueue = "HighPriority" }); List <JobSummary> jobSummaryList = response.JobSummaryList; #endregion }
public void BatchListJobs() { #region to-list-submitted-jobs-1481154251623 var client = new AmazonBatchClient(); var response = client.ListJobs(new ListJobsRequest { JobQueue = "HighPriority", JobStatus = "SUBMITTED" }); List <JobSummary> jobSummaryList = response.JobSummaryList; #endregion }