public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonEKSConfig config = new AmazonEKSConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonEKSClient client = new AmazonEKSClient(creds, config); DescribeAddonVersionsResponse resp = new DescribeAddonVersionsResponse(); do { DescribeAddonVersionsRequest req = new DescribeAddonVersionsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.DescribeAddonVersions(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Addons) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
protected IAmazonEKS CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonEKSConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonEKSClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }