Exemple #1
0
        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));
        }
Exemple #2
0
        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
        }