Exemplo n.º 1
0
        public void StorageGatewayDescribeStorediSCSIVolumes()
        {
            #region to-describe-the-volumes-of-a-gateway-1471472640660

            var client   = new AmazonStorageGatewayClient();
            var response = client.DescribeStorediSCSIVolumes(new DescribeStorediSCSIVolumesRequest
            {
                VolumeARNs = new List <string> {
                    "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"
                }
            });

            List <StorediSCSIVolume> storediSCSIVolumes = response.StorediSCSIVolumes;

            #endregion
        }
        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);

            DescribeStorediSCSIVolumesResponse resp = new DescribeStorediSCSIVolumesResponse();
            DescribeStorediSCSIVolumesRequest  req  = new DescribeStorediSCSIVolumesRequest
            {
            };

            resp = client.DescribeStorediSCSIVolumes(req);
            CheckError(resp.HttpStatusCode, "200");

            foreach (var obj in resp.StorediSCSIVolumes)
            {
                AddObject(obj);
            }
        }