Example #1
0
        internal virtual ListVirtualRoutersResponse ListVirtualRouters(ListVirtualRoutersRequest request)
        {
            var marshaller   = ListVirtualRoutersRequestMarshaller.Instance;
            var unmarshaller = ListVirtualRoutersResponseUnmarshaller.Instance;

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

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

            ListVirtualRoutersResponse resp = new ListVirtualRoutersResponse();

            do
            {
                ListVirtualRoutersRequest req = new ListVirtualRoutersRequest
                {
                    NextToken = resp.NextToken
                    ,
                    Limit = maxItems
                };

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

                foreach (var obj in resp.VirtualRouters)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Example #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListVirtualRouters operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListVirtualRouters 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/appmesh-2018-10-01/ListVirtualRouters">REST API Reference for ListVirtualRouters Operation</seealso>
        public virtual Task <ListVirtualRoutersResponse> ListVirtualRoutersAsync(ListVirtualRoutersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = ListVirtualRoutersRequestMarshaller.Instance;
            var unmarshaller = ListVirtualRoutersResponseUnmarshaller.Instance;

            return(InvokeAsync <ListVirtualRoutersRequest, ListVirtualRoutersResponse>(request, marshaller,
                                                                                       unmarshaller, cancellationToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListVirtualRouters operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListVirtualRouters 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/appmesh-2018-10-01/ListVirtualRouters">REST API Reference for ListVirtualRouters Operation</seealso>
        public virtual Task <ListVirtualRoutersResponse> ListVirtualRoutersAsync(ListVirtualRoutersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListVirtualRoutersRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListVirtualRoutersResponseUnmarshaller.Instance;

            return(InvokeAsync <ListVirtualRoutersResponse>(request, options, cancellationToken));
        }
        internal virtual ListVirtualRoutersResponse ListVirtualRouters(ListVirtualRoutersRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListVirtualRoutersRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListVirtualRoutersResponseUnmarshaller.Instance;

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