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

            DescribeTapeRecoveryPointsResponse resp = new DescribeTapeRecoveryPointsResponse();

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

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

                foreach (var obj in resp.TapeRecoveryPointInfos)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.Marker));
        }
예제 #2
0
        public void StorageGatewayDescribeTapeRecoveryPoints()
        {
            #region to-describe-virtual-tape-recovery-points-1471542042026

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

            string gatewayARN = response.GatewayARN;
            string marker     = response.Marker;
            List <TapeRecoveryPointInfo> tapeRecoveryPointInfos = response.TapeRecoveryPointInfos;

            #endregion
        }