Пример #1
0
        internal virtual DescribeJobDefinitionsResponse DescribeJobDefinitions(DescribeJobDefinitionsRequest request)
        {
            var marshaller   = new DescribeJobDefinitionsRequestMarshaller();
            var unmarshaller = DescribeJobDefinitionsResponseUnmarshaller.Instance;

            return(Invoke <DescribeJobDefinitionsRequest, DescribeJobDefinitionsResponse>(request, marshaller, unmarshaller));
        }
Пример #2
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));
        }
Пример #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeJobDefinitions operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DescribeJobDefinitions operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions">REST API Reference for DescribeJobDefinitions Operation</seealso>
        public Task <DescribeJobDefinitionsResponse> DescribeJobDefinitionsAsync(DescribeJobDefinitionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DescribeJobDefinitionsRequestMarshaller();
            var unmarshaller = DescribeJobDefinitionsResponseUnmarshaller.Instance;

            return(InvokeAsync <DescribeJobDefinitionsRequest, DescribeJobDefinitionsResponse>(request, marshaller,
                                                                                               unmarshaller, cancellationToken));
        }
Пример #4
0
        internal virtual DescribeJobDefinitionsResponse DescribeJobDefinitions(DescribeJobDefinitionsRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DescribeJobDefinitionsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DescribeJobDefinitionsResponseUnmarshaller.Instance;

            return(Invoke <DescribeJobDefinitionsResponse>(request, options));
        }
Пример #5
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeJobDefinitions operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DescribeJobDefinitions operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions">REST API Reference for DescribeJobDefinitions Operation</seealso>
        public virtual Task <DescribeJobDefinitionsResponse> DescribeJobDefinitionsAsync(DescribeJobDefinitionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DescribeJobDefinitionsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DescribeJobDefinitionsResponseUnmarshaller.Instance;

            return(InvokeAsync <DescribeJobDefinitionsResponse>(request, options, cancellationToken));
        }