aws_sdk_keyspacesstreams/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) of the stream for which to get the shard iterator. The ARN uniquely identifies the stream within Amazon Keyspaces.</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 within the stream. The shard ID uniquely identifies a subset of the stream's data records that you want to access.</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 positioned. Must be one of the following:</p> <ul> <li> <p><code>TRIM_HORIZON</code> - Start reading at the last untrimmed record in the shard, which is the oldest data record in the shard.</p></li> <li> <p><code>AT_SEQUENCE_NUMBER</code> - Start reading exactly from the specified sequence number.</p></li> <li> <p><code>AFTER_SEQUENCE_NUMBER</code> - Start reading right after the specified sequence number.</p></li> <li> <p><code>LATEST</code> - Start reading just after the most recent record in the shard, so that you always read the most recent data.</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 the data record in the shard from which to start reading. Required if <code>ShardIteratorType</code> is <code>AT_SEQUENCE_NUMBER</code> or <code>AFTER_SEQUENCE_NUMBER</code>. This parameter is ignored for other iterator types.</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 unique identifier for the shard iterator. This value is used in the <code>GetRecords</code> operation to retrieve data records from the specified shard. Each shard iterator expires 5 minutes after it is returned to the requester.</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}