public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonStorageGatewayConfig config = new AmazonStorageGatewayConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonStorageGatewayClient client = new AmazonStorageGatewayClient(creds, config); ListGatewaysResponse resp = new ListGatewaysResponse(); do { ListGatewaysRequest req = new ListGatewaysRequest { Marker = resp.Marker , Limit = maxItems }; resp = client.ListGateways(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Gateways) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.Marker)); }
public void StorageGatewayListGateways() { #region to-lists-region-specific-gateways-per-aws-account-1472077860657 var client = new AmazonStorageGatewayClient(); var response = client.ListGateways(new ListGatewaysRequest { Limit = 2, Marker = "1" }); List <GatewayInfo> gateways = response.Gateways; string marker = response.Marker; #endregion }