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)); }
public void ECSListContainerInstances() { #region 62a82a94-713c-4e18-8420-1d2b2ba9d484 var client = new AmazonECSClient(); var response = client.ListContainerInstances(new ListContainerInstancesRequest { Cluster = "default" }); List <string> containerInstanceArns = response.ContainerInstanceArns; #endregion }