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