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