internal ListContainerInstancesResponse ListContainerInstances(ListContainerInstancesRequest request) { var marshaller = new ListContainerInstancesRequestMarshaller(); var unmarshaller = ListContainerInstancesResponseUnmarshaller.Instance; return(Invoke <ListContainerInstancesRequest, ListContainerInstancesResponse>(request, marshaller, unmarshaller)); }
public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonECSConfig config = new AmazonECSConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonECSClient client = new AmazonECSClient(creds, config); ListContainerInstancesResponse resp = new ListContainerInstancesResponse(); do { ListContainerInstancesRequest req = new ListContainerInstancesRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListContainerInstances(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.ContainerInstanceArns) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListContainerInstances operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListContainerInstances 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 <ListContainerInstancesResponse> ListContainerInstancesAsync(ListContainerInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListContainerInstancesRequestMarshaller(); var unmarshaller = ListContainerInstancesResponseUnmarshaller.Instance; return(InvokeAsync <ListContainerInstancesRequest, ListContainerInstancesResponse>(request, marshaller, unmarshaller, cancellationToken)); }