public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonTransferConfig config = new AmazonTransferConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonTransferClient client = new AmazonTransferClient(creds, config); ListServersResponse resp = new ListServersResponse(); do { ListServersRequest req = new ListServersRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListServers(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Servers) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
internal virtual ListServersResponse ListServers(ListServersRequest request) { var marshaller = ListServersRequestMarshaller.Instance; var unmarshaller = ListServersResponseUnmarshaller.Instance; return(Invoke <ListServersRequest, ListServersResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the ListServers operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListServers 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/transfer-2018-11-05/ListServers">REST API Reference for ListServers Operation</seealso> public virtual Task <ListServersResponse> ListServersAsync(ListServersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = ListServersRequestMarshaller.Instance; var unmarshaller = ListServersResponseUnmarshaller.Instance; return(InvokeAsync <ListServersRequest, ListServersResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListServers operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListServers 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/transfer-2018-11-05/ListServers">REST API Reference for ListServers Operation</seealso> public virtual Task <ListServersResponse> ListServersAsync(ListServersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListServersRequestMarshaller.Instance; options.ResponseUnmarshaller = ListServersResponseUnmarshaller.Instance; return(InvokeAsync <ListServersResponse>(request, options, cancellationToken)); }
internal virtual ListServersResponse ListServers(ListServersRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListServersRequestMarshaller.Instance; options.ResponseUnmarshaller = ListServersResponseUnmarshaller.Instance; return(Invoke <ListServersResponse>(request, options)); }
protected override Message CreateFirstMessage() { Message m = new ListServersRequest(true); return(m); }