public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonMediaConvertConfig config = new AmazonMediaConvertConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonMediaConvertClient client = new AmazonMediaConvertClient(creds, config);

            ListJobTemplatesResponse resp = new ListJobTemplatesResponse();

            do
            {
                ListJobTemplatesRequest req = new ListJobTemplatesRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.ListJobTemplates(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.JobTemplates)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Ejemplo n.º 2
0
        internal virtual ListJobTemplatesResponse ListJobTemplates(ListJobTemplatesRequest request)
        {
            var marshaller   = new ListJobTemplatesRequestMarshaller();
            var unmarshaller = ListJobTemplatesResponseUnmarshaller.Instance;

            return(Invoke <ListJobTemplatesRequest, ListJobTemplatesResponse>(request, marshaller, unmarshaller));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListJobTemplates operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListJobTemplates 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/mediaconvert-2017-08-29/ListJobTemplates">REST API Reference for ListJobTemplates Operation</seealso>
        public virtual Task <ListJobTemplatesResponse> ListJobTemplatesAsync(ListJobTemplatesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListJobTemplatesRequestMarshaller();
            var unmarshaller = ListJobTemplatesResponseUnmarshaller.Instance;

            return(InvokeAsync <ListJobTemplatesRequest, ListJobTemplatesResponse>(request, marshaller,
                                                                                   unmarshaller, cancellationToken));
        }