Пример #1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonMediaConnectConfig config = new AmazonMediaConnectConfig();

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

            ListOfferingsResponse resp = new ListOfferingsResponse();

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

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

                foreach (var obj in resp.Offerings)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Пример #2
0
        internal virtual ListOfferingsResponse ListOfferings(ListOfferingsRequest request)
        {
            var marshaller   = ListOfferingsRequestMarshaller.Instance;
            var unmarshaller = ListOfferingsResponseUnmarshaller.Instance;

            return(Invoke <ListOfferingsRequest, ListOfferingsResponse>(request, marshaller, unmarshaller));
        }
Пример #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListOfferings operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListOfferings 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/medialive-2017-10-14/ListOfferings">REST API Reference for ListOfferings Operation</seealso>
        public virtual Task <ListOfferingsResponse> ListOfferingsAsync(ListOfferingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = ListOfferingsRequestMarshaller.Instance;
            var unmarshaller = ListOfferingsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListOfferingsRequest, ListOfferingsResponse>(request, marshaller,
                                                                             unmarshaller, cancellationToken));
        }