예제 #1
0
        public void StorageGatewayDescribeCachediSCSIVolumes()
        {
            #region to-describe-gateway-cached-iscsi-volumes-1471458094649

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

            List <CachediSCSIVolume> cachediSCSIVolumes = response.CachediSCSIVolumes;

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

            DescribeCachediSCSIVolumesResponse resp = new DescribeCachediSCSIVolumesResponse();
            DescribeCachediSCSIVolumesRequest  req  = new DescribeCachediSCSIVolumesRequest
            {
            };

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

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