GetRecordsRequest

Namespace: AWSSDK.Kinesis
We found 10 examples in language CSharp for this search. You will see 34 fragments of code.

Other methods


        private static AmazonKinesisClient BuildClientSettingEndpoint(AWSCredentials credentials, String endpoint, String serviceName, String regionId)
        {
            var regionEndpoint = Amazon.RegionEndpoint.GetBySystemName(regionId);
            var config = new AmazonKinesisConfig { RegionEndpoint = regionEndpoint, AuthenticationRegion = regionId };
            AmazonKinesisClient client = new AmazonKinesisClient(credentials, config);
            //client.setEndpoint(endpoint);
            //client.setSignerRegionOverride(regionId);
            return client;
        }

        /**
         * {@inheritDoc}
         */
        public GetRecordsResponse Get(String shardIterator, int maxRecords)
        {
            GetRecordsRequest getRecordsRequest = new GetRecordsRequest();
            //getRecordsRequest.RequestCredentials = (credentialsProvider);
            getRecordsRequest.ShardIterator = (shardIterator);
            getRecordsRequest.Limit = (maxRecords);

            var task = client.GetRecordsAsync(getRecordsRequest);
            task.Wait();
            return task.Result;
        }

        /**
         * {@inheritDoc}
         */
        public DescribeStreamResponse GetStreamInfo(String startShardId)
        {
            DescribeStreamRequest describeStreamRequest = new DescribeStreamRequest();
            //describeStreamRequest.RequestCredentials = (credentialsProvider);
            describeStreamRequest.StreamName = (streamName);
            describeStreamRequest.ExclusiveStartShardId = (startShardId);
            DescribeStreamResponse response = null;

            LimitExceededException lastException = null;

            int remainingRetryTimes = this.maxDescribeStreamRetryAttempts;
            // Call DescribeStream, with backoff and retries (if we get LimitExceededException).
            while (response == null)
            {
                try
                {
                    var task = client.DescribeStreamAsync(describeStreamRequest);
                    task.Wait();

                    response = task.Result;
                }
                catch (LimitExceededException le)
                {
                    Trace.TraceInformation("Got LimitExceededException when describing stream " + streamName + ". Backing off for " + this.describeStreamBackoffTimeInMillis + " millis.");
                    //try
                    //{
                        Thread.Sleep((int)this.describeStreamBackoffTimeInMillis);
                    //}
                    //catch (InterruptedException ie)
                    //{
                    //    Trace.WriteLine("Stream " + streamName + " : Sleep  was interrupted ", ie);
                    //}
                    lastException = le;
                }
                remainingRetryTimes--;
                if (remainingRetryTimes <= 0 && response == null)
                {
                    if (lastException != null)
                    {
                        throw lastException;
                    }
                    throw new IllegalStateException("Received null from DescribeStream call.");
                }
            }

            if (StreamStatus.ACTIVE.ToString().Equals(response.StreamDescription.StreamStatus)
             || StreamStatus.UPDATING.ToString().Equals(response.StreamDescription.StreamStatus))
            {
                return response;
            }
            else
            {
                Trace.TraceInformation("Stream is in status " + response.StreamDescription.StreamStatus + ", KinesisProxy.DescribeStream returning null (wait until stream is Active or Updating");
                return null;
            }
        }

        /**
         * {@inheritDoc}
         */
        public Shard GetShard(String shardId)
        {
            if (this.listOfShardsSinceLastGet == null)
            {
                //Update this.listOfShardsSinceLastGet as needed.
                this.GetShardList();
            }

            var list = listOfShardsSinceLastGet;

            foreach (Shard shard in list)
            {
                if (shard.ShardId.Equals(shardId))
                {
                    return shard;
                }
            }

            Trace.TraceWarning("Cannot find the shard given the shardId " + shardId);
            return null;
        }

        /**
         * {@inheritDoc}
         */
        public List<Shard> GetShardList()
        {
            lock (this)
            {
                DescribeStreamResponse response;
                if (shardIterationState == null)
                {
                    shardIterationState = new ShardIterationState();
                }

                do
                {
                    response = GetStreamInfo(shardIterationState.LastShardId);

                    if (response == null)
                    {
                        /*
                         * If getStreamInfo ever returns null, we should bail and return null. This indicates the stream is not
                         * in ACTIVE or UPDATING state and we may not have accurate/consistent information about the stream.
                         */
                        return null;
                    }
                    else
                    {
                        shardIterationState.Update(response.StreamDescription.Shards);
                    }
                } while (response.StreamDescription.HasMoreShards);
                this.listOfShardsSinceLastGet = shardIterationState.Shards;

                shardIterationState = new ShardIterationState();
                return listOfShardsSinceLastGet;
            }
        }

        /**
         * {@inheritDoc}
         */
        public HashSet<String> GetAllShardIds()
        {
            List<Shard> shards = GetShardList();
            if (shards == null)
            {
                return null;
            }
            else
            {
                HashSet<String> shardIds = new HashSet<String>();

                foreach (Shard shard in GetShardList())
                {
                    shardIds.Add(shard.ShardId);
                }

                return shardIds;
            }
        }

using System;

namespace Amazon.Kinesis;

public sealed class GetRecordsRequest : KinesisRequest
{
    public GetRecordsRequest(string shardIterator, int? limit = null)
    {
        ArgumentNullException.ThrowIfNull(shardIterator);

        if (limit > 10_000)
            throw new ArgumentOutOfRangeException(nameof(limit), limit, "Must be 10,000 or fewer");

        ShardIterator = shardIterator;
        Limit = limit;
    }

    public int? Limit { get; }

    public string ShardIterator { get; }
}

/*
{
    "Limit": "number",
    "ShardIterator": "string"
}
*/

        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOrderService/GetRecords", ReplyAction="http://tempuri.org/IOrderService/GetRecordsResponse")]
        AsyncDataLoading.ServiceReference1.GetRecordsResponse GetRecords(AsyncDataLoading.ServiceReference1.GetRecordsRequest request);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IOrderService/GetRecords", ReplyAction="http://tempuri.org/IOrderService/GetRecordsResponse")]
        System.IAsyncResult BeginGetRecords(AsyncDataLoading.ServiceReference1.GetRecordsRequest request, System.AsyncCallback callback, object asyncState);
        
        AsyncDataLoading.ServiceReference1.GetRecordsResponse EndGetRecords(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOrderService/GetRecordsCount", ReplyAction="http://tempuri.org/IOrderService/GetRecordsCountResponse")]
        AsyncDataLoading.ServiceReference1.GetRecordsCountResponse GetRecordsCount(AsyncDataLoading.ServiceReference1.GetRecordsCountRequest request);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IOrderService/GetRecordsCount", ReplyAction="http://tempuri.org/IOrderService/GetRecordsCountResponse")]
        System.IAsyncResult BeginGetRecordsCount(AsyncDataLoading.ServiceReference1.GetRecordsCountRequest request, System.AsyncCallback callback, object asyncState);


        /// <summary>
        /// This method verifies your credentials, creates a Kinesis stream, waits for the stream
        /// to become active, then puts 10 records in it, and (optionally) deletes the stream.
        /// </summary>
        public static void Main(string[] args)
        {
            const string myStreamName = "practice-datastream";
            const int myStreamSize = 1;
            PutRecords(myStreamSize, myStreamName);

        }

        /// <summary>
        /// Use this method to write the data to data stream.
        /// <param name="myStreamName">Name of the stream from where we want write the data</param>
        /// <param name="myStreamSize">Name of the shardId from where we want write the data</param>
        /// </summary
        private static void PutRecords(int myStreamSize,string myStreamName)
        {
            try
            {
                ListStreamsRequest listStreamsRequest = new ListStreamsRequest();
                //listStreamsRequest.Limit(20);
                listStreamsRequest.Limit = 20;
                bool isStreamexist = false;
                var listStreamsResult = kinesisClient.ListStreamsAsync(listStreamsRequest);
                var streamNames = listStreamsResult.Result.StreamNames;
                if (streamNames.Count > 0)
                {
                    foreach (var streamName in streamNames)
                    {
                        if (streamName == myStreamName) { isStreamexist = true; }
                    }
                }
                if (!isStreamexist)
                {
                    var createStreamRequest = new CreateStreamRequest();
                    createStreamRequest.StreamName = myStreamName;
                    createStreamRequest.ShardCount = myStreamSize;
                    var createStreamReq = createStreamRequest;
                    var CreateStreamResponse = kinesisClient.CreateStreamAsync(createStreamReq).Result;
                    Console.Error.WriteLine("Created Stream : " + myStreamName);
                }
            }
            catch (ResourceInUseException)
            {
                Console.Error.WriteLine("Producer is quitting without creating stream " + myStreamName +
                    " to put records into as a stream of the same name already exists.");
                Environment.Exit(1);
            }
            WaitForStreamToBecomeAvailable(myStreamName);
            Console.Error.WriteLine("Putting records in stream : " + myStreamName);
            for (int j = 0; j < 10; ++j)
            {
                TimeSpan t = DateTime.UtcNow - new DateTime(1970, 1, 1);
                int secondsSinceEpoch = (int)t.TotalSeconds;
                string property_value = Convert.ToString(secondsSinceEpoch);
                var json = new
                {
                    BatchActivityID = property_value,
                    MSMInstanceI = property_value,
                    SchSourceID = property_value,
                    VerSourceID = property_value,
                    ImportFileFilter = property_value,
                    ImportStarted = property_value,
                    ImportDurationSeconds = property_value
                };
                StringBuilder sb = new StringBuilder();
                using (StringWriter sw = new StringWriter(sb))
                using (JsonTextWriter writer = new JsonTextWriter(sw))
                {
                    writer.QuoteChar = '\'';

                    JsonSerializer ser = new JsonSerializer();
                    ser.Serialize(writer, json);
                }

                //convert to byte array in prep for adding to stream
                byte[] oByte = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(sb.ToString()));
                using (MemoryStream ms = new MemoryStream(oByte))
                {
                    PutRecordRequest requestRecord = new PutRecordRequest();
                    requestRecord.StreamName = myStreamName;
                    requestRecord.Data = ms;
                    requestRecord.PartitionKey = "partitionKey-" + j;

                    var putResultResponse = kinesisClient.PutRecordAsync(requestRecord).Result;
                    Console.Error.WriteLine(
                        String.Format("Successfully putrecord {0}:\n\t partition key = {1,15}, shard ID = {2}",
                            j, requestRecord.PartitionKey, putResultResponse.ShardId));
                    System.Threading.Thread.Sleep(5000);

                    //Call below methond if you want read/get the data from kinesis stream.
                    //GetRecords(putResultResponse.ShardId, myStreamName);
                }
            }
            PutRecords(myStreamSize, myStreamName);
        }

            /// <summary>
            /// Use this method to read the data from data stream.
            /// <param name="StreamName">Name of the stream from where we want read the data</param>
            /// <param name="shardId">Name of the shardId from where we want read the data</param>
            /// </summary
            private static void GetRecords(string shardId, string StreamName)
            {
                var siRequest = new GetShardIteratorRequest();
                siRequest.ShardId = shardId;
                siRequest.StreamName = StreamName;
                siRequest.ShardIteratorType = "TRIM_HORIZON";

                var siResponse = kinesisClient.GetShardIteratorAsync(siRequest);
                var request = new GetRecordsRequest();
                request.ShardIterator = siResponse.Result.ShardIterator;
                var getRecordsRequest = new GetRecordsRequest
                {
                    Limit = 10,
                    ShardIterator = request.ShardIterator,
                };

                var getRecordsResponse = kinesisClient.GetRecordsAsync(getRecordsRequest);
                var records = getRecordsResponse.Result;
                if (records.Records.Count > 0)
                {
                    Console.WriteLine($"Received {records.Records.Count} records.");
                    foreach (var record in records.Records)
                    {
                        var json = Encoding.UTF8.GetString(record.Data.ToArray());
                        Console.WriteLine("Json string: " + json);
                    }
                }
            }

        /// <summary>
        /// This method waits a maximum of 30 seconds for the specified stream to become active.
        /// <param name="myStreamName">Name of the stream whose active status is waited upon.</param>
        /// </summary>
        private static void WaitForStreamToBecomeAvailable(string myStreamName)
        {
            var deadline = DateTime.UtcNow + TimeSpan.FromSeconds(30);
            while (DateTime.UtcNow < deadline)
            {
                DescribeStreamRequest describeStreamReq = new DescribeStreamRequest();
                describeStreamReq.StreamName = myStreamName;
                var describeResult = kinesisClient.DescribeStreamAsync(describeStreamReq).Result;
                string streamStatus = describeResult.StreamDescription.StreamStatus;
                Console.Error.WriteLine("  - current state: " + streamStatus);
                if (streamStatus == StreamStatus.ACTIVE)
                {
                    return;
                }
                System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10));
            }

            throw new Exception("Stream " + myStreamName + " never went active.");
        }


        public async Task Subscribe(string appName, string stream, Action<Record> action)
        {
            var shards = await _client.ListShardsAsync(new ListShardsRequest()
            {
                StreamName = stream
            });

            foreach (var shard in shards.Shards)
            {
                _subscribers.Add(new ShardSubscription()
                {
                    AppName = appName,
                    Stream = stream,
                    Shard = shard,
                    Action = action
                });
            }
        }

        private async void Process()
        {
            while (!_cancelToken.IsCancellationRequested)
            {
                try
                {
                    var todo = _subscribers.Where(x => x.Snooze < DateTime.Now).ToList();
                    foreach (var sub in todo)
                    {
                        if (!await _lockManager.AcquireLock($"{sub.AppName}.{sub.Stream}.{sub.Shard.ShardId}",
                            _cancelToken.Token))
                            continue;

                        try
                        {
                            var records = await GetBatch(sub);

                            if (records.Records.Count == 0)
                                sub.Snooze = DateTime.Now.AddSeconds(5);

                            var lastSequence = string.Empty;

                            foreach (var rec in records.Records)
                            {
                                lastSequence = rec.SequenceNumber;
                                try
                                {
                                    sub.Action(rec);
                                }
                                catch (Exception ex)
                                {
                                    _logger.LogError(default(EventId), ex, ex.Message);
                                }
                            }

                            if (lastSequence != string.Empty)
                                await _tracker.IncrementShardIteratorAndSequence(sub.AppName, sub.Stream, sub.Shard.ShardId, records.NextShardIterator, lastSequence);
                            else
                                await _tracker.IncrementShardIterator(sub.AppName, sub.Stream, sub.Shard.ShardId, records.NextShardIterator);
                        }
                        finally
                        {
                            await _lockManager.ReleaseLock($"{sub.AppName}.{sub.Stream}.{sub.Shard.ShardId}");
                        }
                    }

                    if (todo.Count == 0)
                        await Task.Delay(2000);
                }
                catch (Exception ex)
                {
                    _logger.LogError(default(EventId), ex, ex.Message);
                }
            }
        }

        private async Task<GetRecordsResponse> GetBatch(ShardSubscription sub)
        {
            var iterator = await _tracker.GetNextShardIterator(sub.AppName, sub.Stream, sub.Shard.ShardId);

            if (iterator == null)
            {
                var iterResp = await _client.GetShardIteratorAsync(new GetShardIteratorRequest()
                {
                    ShardId = sub.Shard.ShardId,
                    StreamName = sub.Stream,
                    ShardIteratorType = ShardIteratorType.AT_SEQUENCE_NUMBER,
                    StartingSequenceNumber = sub.Shard.SequenceNumberRange.StartingSequenceNumber
                });
                iterator = iterResp.ShardIterator;
            }

            try
            {
                var result = await _client.GetRecordsAsync(new GetRecordsRequest()
                {
                    ShardIterator = iterator,
                    Limit = _batchSize
                });

                return result;
            }
            catch (ExpiredIteratorException)
            {
                var lastSequence = await _tracker.GetNextLastSequenceNumber(sub.AppName, sub.Stream, sub.Shard.ShardId);
                var iterResp = await _client.GetShardIteratorAsync(new GetShardIteratorRequest()
                {
                    ShardId = sub.Shard.ShardId,
                    StreamName = sub.Stream,
                    ShardIteratorType = ShardIteratorType.AFTER_SEQUENCE_NUMBER,
                    StartingSequenceNumber = lastSequence
                });
                iterator = iterResp.ShardIterator;

                var result = await _client.GetRecordsAsync(new GetRecordsRequest()
                {
                    ShardIterator = iterator,
                    Limit = _batchSize
                });

                return result;
            }
        }
        
        public void Dispose()
        {
            _cancelToken.Cancel();
            _processTask.Wait(5000);
        }

        public IRequest Marshall(AmazonWebServiceRequest input)
        {
            return this.Marshall((GetRecordsRequest)input);
        }

        public IRequest Marshall(GetRecordsRequest publicRequest)
        {
            IRequest request = new DefaultRequest(publicRequest, "Amazon.Kinesis");
            string target = "Kinesis_20131202.GetRecords";
            request.Headers["X-Amz-Target"] = target;
            request.Headers["Content-Type"] = "application/x-amz-json-1.1";
            request.HttpMethod = "POST";

            string uriResourcePath = "/";
            request.ResourcePath = uriResourcePath;
            using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
            {
                JsonWriter writer = new JsonWriter(stringWriter);
                writer.WriteObjectStart();
                var context = new JsonMarshallerContext(request, writer);
                if(publicRequest.IsSetLimit())
                {
                    context.Writer.WritePropertyName("Limit");
                    context.Writer.Write(publicRequest.Limit);
                }

                if(publicRequest.IsSetShardIterator())
                {
                    context.Writer.WritePropertyName("ShardIterator");
                    context.Writer.Write(publicRequest.ShardIterator);
                }

        
                writer.WriteObjectEnd();
                string snippet = stringWriter.ToString();
                request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
            }


            return request;
        }

        public IRequest Marshall(AmazonWebServiceRequest input)
        {
            return this.Marshall((GetRecordsRequest)input);
        }

        public IRequest Marshall(GetRecordsRequest publicRequest)
        {
            IRequest request = new DefaultRequest(publicRequest, "Amazon.Kinesis");
            string target = "Kinesis_20131202.GetRecords";
            request.Headers["X-Amz-Target"] = target;
            request.Headers["Content-Type"] = "application/x-amz-json-1.1";
            request.HttpMethod = "POST";

            string uriResourcePath = "/";
            request.ResourcePath = uriResourcePath;
            using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
            {
                JsonWriter writer = new JsonWriter(stringWriter);
                writer.WriteObjectStart();
                var context = new JsonMarshallerContext(request, writer);
                if(publicRequest.IsSetLimit())
                {
                    context.Writer.WritePropertyName("Limit");
                    context.Writer.Write(publicRequest.Limit);
                }

                if(publicRequest.IsSetShardIterator())
                {
                    context.Writer.WritePropertyName("ShardIterator");
                    context.Writer.Write(publicRequest.ShardIterator);
                }

        
                writer.WriteObjectEnd();
                string snippet = stringWriter.ToString();
                request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
            }


            return request;
        }


        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            await ReadFromStream();
        }

        private async Task ReadFromStream()
        {
            var describeRequest = new DescribeStreamRequest
            {
                StreamName = _streamName,
            };

            var describeStreamResponse = await _kinesisClient.DescribeStreamAsync(describeRequest);
            var shards = describeStreamResponse.StreamDescription.Shards;
            foreach (var shard in shards)
            {
                var getShardIteratorRequest = new GetShardIteratorRequest
                {
                    StreamName = _streamName,
                    ShardId = shard.ShardId,
                    ShardIteratorType = ShardIteratorType.TRIM_HORIZON,
                };

                var getShardIteratorResponse = await _kinesisClient.GetShardIteratorAsync(getShardIteratorRequest);
                var shardIterator = getShardIteratorResponse.ShardIterator;
                while (!string.IsNullOrEmpty(shardIterator))
                {
                    var getRecordsRequest = new GetRecordsRequest
                    {
                        Limit = 100,
                        ShardIterator = shardIterator,
                    };

                    var getRecordsResponse = await _kinesisClient.GetRecordsAsync(getRecordsRequest);
                    var nextIterator = getRecordsResponse.NextShardIterator;
                    var records = getRecordsResponse.Records;

                    if (records.Count > 0)
                    {
                        Console.WriteLine($"Received {records.Count} records.");
                        foreach (var record in records)
                        {
                            var dataMessage = await JsonSerializer.DeserializeAsync<DataMessage>(record.Data);
                            Console.WriteLine($"DataMessage Id={dataMessage.Id}, CreatedOn={dataMessage.CreatedOn.ToString("yyyy-MM-dd HH:mm")}");
                        }
                    }
                    shardIterator = nextIterator;
                }
            }
        }

        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
        
        // CODEGEN: Generating message contract since element name HelloWorldResult from namespace http://tempuri.org/ is not marked nillable
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/HelloWorld", ReplyAction="*")]
        ClintofWebService.StudentClient.HelloWorldResponse HelloWorld(ClintofWebService.StudentClient.HelloWorldRequest request);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/HelloWorld", ReplyAction="*")]
        System.Threading.Tasks.Task<ClintofWebService.StudentClient.HelloWorldResponse> HelloWorldAsync(ClintofWebService.StudentClient.HelloWorldRequest request);
        
        // CODEGEN: Generating message contract since element name GetRecordsResult from namespace http://tempuri.org/ is not marked nillable
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetRecords", ReplyAction="*")]
        ClintofWebService.StudentClient.GetRecordsResponse GetRecords(ClintofWebService.StudentClient.GetRecordsRequest request);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetRecords", ReplyAction="*")]
        System.Threading.Tasks.Task<ClintofWebService.StudentClient.GetRecordsResponse> GetRecordsAsync(ClintofWebService.StudentClient.GetRecordsRequest request);
        
        // CODEGEN: Generating message contract since element name employee from namespace http://tempuri.org/ is not marked nillable
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/AddEmployee", ReplyAction="*")]
        ClintofWebService.StudentClient.AddEmployeeResponse AddEmployee(ClintofWebService.StudentClient.AddEmployeeRequest request);


        static void Main(string[] args)
        {
            try
            {
                log = new KPLNETInterface.Log4NetLogger(typeof(Program));
                string akid = Environment.GetEnvironmentVariable(AWS_ACCESS_KEY_ID);
                string sKey = Environment.GetEnvironmentVariable(AWS_SECRET_ACCESS_KEY);
                if (akid == null || sKey == null)
                    return;

                c = new AmazonKinesisClient(akid, sKey, Amazon.RegionEndpoint.USWest2);
                c.GetShardIteratorAsync(new GetShardIteratorRequest() { ShardId = "shardId-000000000000", StreamName = "KPLNETTest", ShardIteratorType = ShardIteratorType.AFTER_SEQUENCE_NUMBER, StartingSequenceNumber = "49572131548342384703435782055007292317434442354572394498" }).
                    ContinueWith((b) =>
                    {
                        if (b.Result.HttpStatusCode == System.Net.HttpStatusCode.OK)
                        {
                            string it = b.Result.ShardIterator;
                            if (it != null)
                                c.GetRecordsAsync(new GetRecordsRequest() { Limit = 1000, ShardIterator = it }).ContinueWith(continuationAction);
                            else
                                Console.WriteLine("Done iterating all items in the shard");
                        }
                        else
                        {
                            Console.Error.WriteLine("GetShardIteratorRequest failed with Error code: " + b.Result.HttpStatusCode.ToString());
                        }
                    });
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.ToString());
            }
            finally
            {
                Console.ReadLine();
            }
        }

Amazon.Kinesis.Model.GetRecordsRequest : IAmazonWebServiceRequest

Constructors :

public GetRecordsRequest()

Methods :

public Int32 get_Limit()
public Void set_Limit(Int32 value = )
public String get_ShardIterator()
public Void set_ShardIterator(String value = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()