public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonManagedBlockchainConfig config = new AmazonManagedBlockchainConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonManagedBlockchainClient client = new AmazonManagedBlockchainClient(creds, config); ListProposalVotesResponse resp = new ListProposalVotesResponse(); do { ListProposalVotesRequest req = new ListProposalVotesRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListProposalVotes(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.ProposalVotes) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListProposalVotes operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListProposalVotes 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/managedblockchain-2018-09-24/ListProposalVotes">REST API Reference for ListProposalVotes Operation</seealso> public virtual Task <ListProposalVotesResponse> ListProposalVotesAsync(ListProposalVotesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListProposalVotesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListProposalVotesResponseUnmarshaller.Instance; return(InvokeAsync <ListProposalVotesResponse>(request, options, cancellationToken)); }
internal virtual ListProposalVotesResponse ListProposalVotes(ListProposalVotesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListProposalVotesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListProposalVotesResponseUnmarshaller.Instance; return(Invoke <ListProposalVotesResponse>(request, options)); }