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); ListVolumesResponse resp = new ListVolumesResponse(); do { ListVolumesRequest req = new ListVolumesRequest { Marker = resp.Marker , Limit = maxItems }; resp = client.ListVolumes(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.VolumeInfos) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.Marker)); }
public void StorageGatewayListVolumes() { #region to-list-the-iscsi-stored-volumes-of-a-gateway-1472145723653 var client = new AmazonStorageGatewayClient(); var response = client.ListVolumes(new ListVolumesRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", Limit = 2, Marker = "1" }); string gatewayARN = response.GatewayARN; string marker = response.Marker; List <VolumeInfo> volumeInfos = response.VolumeInfos; #endregion }