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