public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonQLDBConfig config = new AmazonQLDBConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonQLDBClient client = new AmazonQLDBClient(creds, config); ListLedgersResponse resp = new ListLedgersResponse(); do { ListLedgersRequest req = new ListLedgersRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListLedgers(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Ledgers) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
public IntegrationTestBase(string ledgerName, string regionName) { this.ledgerName = ledgerName; this.regionName = regionName; AmazonQLDBConfig amazonQldbConfig = CreateAmazonQLDBConfig(regionName); this.amazonQldbClient = new AmazonQLDBClient(amazonQldbConfig); }
public static AmazonQLDBConfig CreateAmazonQLDBConfig(string region) { var amazonQLDBConfig = new AmazonQLDBConfig(); if (region != null) { amazonQLDBConfig.RegionEndpoint = RegionEndpoint.GetBySystemName(region); } return(amazonQLDBConfig); }
protected IAmazonQLDB CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonQLDBConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonQLDBClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }