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