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