Exemple #1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonMediaPackageVodConfig config = new AmazonMediaPackageVodConfig();

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

            ListPackagingConfigurationsResponse resp = new ListPackagingConfigurationsResponse();

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

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

                foreach (var obj in resp.PackagingConfigurations)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
        /// <summary>
        /// Returns a collection of MediaPackage VOD PackagingConfiguration resources.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListPackagingConfigurations service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the ListPackagingConfigurations service method, as returned by MediaPackageVod.</returns>
        /// <exception cref="Amazon.MediaPackageVod.Model.ForbiddenException">
        /// The client is not authorized to access the requested resource.
        /// </exception>
        /// <exception cref="Amazon.MediaPackageVod.Model.InternalServerErrorException">
        /// An unexpected error occurred.
        /// </exception>
        /// <exception cref="Amazon.MediaPackageVod.Model.NotFoundException">
        /// The requested resource does not exist.
        /// </exception>
        /// <exception cref="Amazon.MediaPackageVod.Model.ServiceUnavailableException">
        /// An unexpected error occurred.
        /// </exception>
        /// <exception cref="Amazon.MediaPackageVod.Model.TooManyRequestsException">
        /// The client has exceeded their resource or throttling limits.
        /// </exception>
        /// <exception cref="Amazon.MediaPackageVod.Model.UnprocessableEntityException">
        /// The parameters sent in the request are not valid.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediapackage-vod-2018-11-07/ListPackagingConfigurations">REST API Reference for ListPackagingConfigurations Operation</seealso>
        public virtual Task <ListPackagingConfigurationsResponse> ListPackagingConfigurationsAsync(ListPackagingConfigurationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListPackagingConfigurationsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListPackagingConfigurationsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListPackagingConfigurationsResponse>(request, options, cancellationToken));
        }
        internal virtual ListPackagingConfigurationsResponse ListPackagingConfigurations(ListPackagingConfigurationsRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListPackagingConfigurationsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListPackagingConfigurationsResponseUnmarshaller.Instance;

            return(Invoke <ListPackagingConfigurationsResponse>(request, options));
        }