public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonCodeDeployConfig config = new AmazonCodeDeployConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonCodeDeployClient client = new AmazonCodeDeployClient(creds, config); ListDeploymentConfigsResponse resp = new ListDeploymentConfigsResponse(); do { ListDeploymentConfigsRequest req = new ListDeploymentConfigsRequest { NextToken = resp.NextToken }; resp = client.ListDeploymentConfigs(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.DeploymentConfigsList) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
protected IAmazonCodeDeploy CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonCodeDeployConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonCodeDeployClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }