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