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