Пример #1
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);

            DescribeVTLDevicesResponse resp = new DescribeVTLDevicesResponse();

            do
            {
                DescribeVTLDevicesRequest req = new DescribeVTLDevicesRequest
                {
                    Marker = resp.Marker
                    ,
                    Limit = maxItems
                };

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

                foreach (var obj in resp.VTLDevices)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.Marker));
        }
Пример #2
0
        public void StorageGatewayDescribeVTLDevices()
        {
            #region to-describe-virtual-tape-library-vtl-devices-of-a-single-gateway-1471906071410

            var client   = new AmazonStorageGatewayClient();
            var response = client.DescribeVTLDevices(new DescribeVTLDevicesRequest
            {
                GatewayARN    = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B",
                Limit         = 123,
                Marker        = "1",
                VTLDeviceARNs = new List <string> {
                }
            });

            string           gatewayARN = response.GatewayARN;
            string           marker     = response.Marker;
            List <VTLDevice> vtlDevices = response.VTLDevices;

            #endregion
        }