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