public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonElasticsearchConfig config = new AmazonElasticsearchConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonElasticsearchClient client = new AmazonElasticsearchClient(creds, config); ListElasticsearchVersionsResponse resp = new ListElasticsearchVersionsResponse(); do { ListElasticsearchVersionsRequest req = new ListElasticsearchVersionsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListElasticsearchVersions(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.ElasticsearchVersions) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
internal ListElasticsearchVersionsResponse ListElasticsearchVersions(ListElasticsearchVersionsRequest request) { var marshaller = new ListElasticsearchVersionsRequestMarshaller(); var unmarshaller = ListElasticsearchVersionsResponseUnmarshaller.Instance; return(Invoke <ListElasticsearchVersionsRequest, ListElasticsearchVersionsResponse>(request, marshaller, unmarshaller)); }
internal virtual ListElasticsearchVersionsResponse ListElasticsearchVersions(ListElasticsearchVersionsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListElasticsearchVersionsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListElasticsearchVersionsResponseUnmarshaller.Instance; return(Invoke <ListElasticsearchVersionsResponse>(request, options)); }
/// <summary> /// Initiates the asynchronous execution of the ListElasticsearchVersions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListElasticsearchVersions 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> public Task <ListElasticsearchVersionsResponse> ListElasticsearchVersionsAsync(ListElasticsearchVersionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListElasticsearchVersionsRequestMarshaller(); var unmarshaller = ListElasticsearchVersionsResponseUnmarshaller.Instance; return(InvokeAsync <ListElasticsearchVersionsRequest, ListElasticsearchVersionsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListElasticsearchVersions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListElasticsearchVersions 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> public virtual Task <ListElasticsearchVersionsResponse> ListElasticsearchVersionsAsync(ListElasticsearchVersionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListElasticsearchVersionsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListElasticsearchVersionsResponseUnmarshaller.Instance; return(InvokeAsync <ListElasticsearchVersionsResponse>(request, options, cancellationToken)); }