Exemplo n.º 1
0
        internal ListProgressUpdateStreamsResponse ListProgressUpdateStreams(ListProgressUpdateStreamsRequest request)
        {
            var marshaller   = new ListProgressUpdateStreamsRequestMarshaller();
            var unmarshaller = ListProgressUpdateStreamsResponseUnmarshaller.Instance;

            return(Invoke <ListProgressUpdateStreamsRequest, ListProgressUpdateStreamsResponse>(request, marshaller, unmarshaller));
        }
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonMigrationHubConfig config = new AmazonMigrationHubConfig();

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

            ListProgressUpdateStreamsResponse resp = new ListProgressUpdateStreamsResponse();

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

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

                foreach (var obj in resp.ProgressUpdateStreamSummaryList)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
        internal virtual ListProgressUpdateStreamsResponse ListProgressUpdateStreams(ListProgressUpdateStreamsRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListProgressUpdateStreamsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListProgressUpdateStreamsResponseUnmarshaller.Instance;

            return(Invoke <ListProgressUpdateStreamsResponse>(request, options));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListProgressUpdateStreams operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListProgressUpdateStreams 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/AWSMigrationHub-2017-05-31/ListProgressUpdateStreams">REST API Reference for ListProgressUpdateStreams Operation</seealso>
        public Task <ListProgressUpdateStreamsResponse> ListProgressUpdateStreamsAsync(ListProgressUpdateStreamsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListProgressUpdateStreamsRequestMarshaller();
            var unmarshaller = ListProgressUpdateStreamsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListProgressUpdateStreamsRequest, ListProgressUpdateStreamsResponse>(request, marshaller,
                                                                                                     unmarshaller, cancellationToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListProgressUpdateStreams operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListProgressUpdateStreams 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/AWSMigrationHub-2017-05-31/ListProgressUpdateStreams">REST API Reference for ListProgressUpdateStreams Operation</seealso>
        public virtual Task <ListProgressUpdateStreamsResponse> ListProgressUpdateStreamsAsync(ListProgressUpdateStreamsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListProgressUpdateStreamsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListProgressUpdateStreamsResponseUnmarshaller.Instance;

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