aws_sdk_dynamodbstreams/client/
get_shard_iterator.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetShardIterator`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`stream_arn(impl Into<String>)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::stream_arn) / [`set_stream_arn(Option<String>)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::set_stream_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) for the stream.</p><br>
7    ///   - [`shard_id(impl Into<String>)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::shard_id) / [`set_shard_id(Option<String>)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::set_shard_id):<br>required: **true**<br><p>The identifier of the shard. The iterator will be returned for this shard ID.</p><br>
8    ///   - [`shard_iterator_type(ShardIteratorType)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::shard_iterator_type) / [`set_shard_iterator_type(Option<ShardIteratorType>)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::set_shard_iterator_type):<br>required: **true**<br><p>Determines how the shard iterator is used to start reading stream records from the shard:</p> <ul>  <li>   <p><code>AT_SEQUENCE_NUMBER</code> - Start reading exactly from the position denoted by a specific sequence number.</p></li>  <li>   <p><code>AFTER_SEQUENCE_NUMBER</code> - Start reading right after the position denoted by a specific sequence number.</p></li>  <li>   <p><code>TRIM_HORIZON</code> - Start reading at the last (untrimmed) stream record, which is the oldest record in the shard. In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records whose age exceeds this limit are subject to removal (trimming) from the stream.</p></li>  <li>   <p><code>LATEST</code> - Start reading just after the most recent stream record in the shard, so that you always read the most recent data in the shard.</p></li> </ul><br>
9    ///   - [`sequence_number(impl Into<String>)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::sequence_number) / [`set_sequence_number(Option<String>)`](crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::set_sequence_number):<br>required: **false**<br><p>The sequence number of a stream record in the shard from which to start reading.</p><br>
10    /// - On success, responds with [`GetShardIteratorOutput`](crate::operation::get_shard_iterator::GetShardIteratorOutput) with field(s):
11    ///   - [`shard_iterator(Option<String>)`](crate::operation::get_shard_iterator::GetShardIteratorOutput::shard_iterator): <p>The position in the shard from which to start reading stream records sequentially. A shard iterator specifies this position using the sequence number of a stream record in a shard.</p>
12    /// - On failure, responds with [`SdkError<GetShardIteratorError>`](crate::operation::get_shard_iterator::GetShardIteratorError)
13    pub fn get_shard_iterator(&self) -> crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder {
14        crate::operation::get_shard_iterator::builders::GetShardIteratorFluentBuilder::new(self.handle.clone())
15    }
16}