Esempio n. 1
0
        public void StorageGatewayListLocalDisks()
        {
            #region to-list-the-gateways-local-disks-1472079564618

            var client   = new AmazonStorageGatewayClient();
            var response = client.ListLocalDisks(new ListLocalDisksRequest
            {
                GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"
            });

            List <Disk> disks      = response.Disks;
            string      gatewayARN = response.GatewayARN;

            #endregion
        }
Esempio n. 2
0
        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);

            ListLocalDisksResponse resp = new ListLocalDisksResponse();
            ListLocalDisksRequest  req  = new ListLocalDisksRequest
            {
            };

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

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