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