コード例 #1
0
        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));
        }
コード例 #2
0
        public IntegrationTestBase(string ledgerName, string regionName)
        {
            this.ledgerName = ledgerName;
            this.regionName = regionName;

            AmazonQLDBConfig amazonQldbConfig = CreateAmazonQLDBConfig(regionName);

            this.amazonQldbClient = new AmazonQLDBClient(amazonQldbConfig);
        }
コード例 #3
0
        public static AmazonQLDBConfig CreateAmazonQLDBConfig(string region)
        {
            var amazonQLDBConfig = new AmazonQLDBConfig();

            if (region != null)
            {
                amazonQLDBConfig.RegionEndpoint = RegionEndpoint.GetBySystemName(region);
            }
            return(amazonQLDBConfig);
        }
コード例 #4
0
        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);
        }