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

            ListFileSharesResponse resp = new ListFileSharesResponse();

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

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

                foreach (var obj in resp.FileShareInfoList)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextMarker));
        }