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); DescribeJobDefinitionsResponse resp = new DescribeJobDefinitionsResponse(); do { DescribeJobDefinitionsRequest req = new DescribeJobDefinitionsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.DescribeJobDefinitions(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.JobDefinitions) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
public void BatchDescribeJobDefinitions() { #region to-describe-active-job-definitions-1481153895831 var client = new AmazonBatchClient(); var response = client.DescribeJobDefinitions(new DescribeJobDefinitionsRequest { Status = "ACTIVE" }); List <JobDefinition> jobDefinitions = response.JobDefinitions; #endregion }