KinesisClient.get_shard_iterator
rboto-kinesis==0.4.0 · Service index · Types
Model summary (excerpt): Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is returned to the requester. When invoking this API, you must use either the StreamARN or the StreamName parameter, or both. It is recommended that you use the StreamARN input parameter when you invoke this API. A shard iterator specifies the shard position from which to start reading data records sequentially....
Install and imports
from rboto import KinesisClient
from rboto_kinesis.types import (
GetShardIteratorOutput,
ShardIteratorType,
)
Signature
async def get_shard_iterator(
*,
shard_id: str,
shard_iterator_type: ShardIteratorType,
stream_name: str | None = None,
starting_sequence_number: str | None = None,
timestamp: str | None = None,
stream_arn: str | None = None,
stream_id: str | None = None,
dry_run: bool | None = None,
) -> GetShardIteratorOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
shard_id |
Yes | The shard ID of the Kinesis Data Streams shard to get the iterator for. |
shard_iterator_type |
Yes | Determines how the shard iterator is used to start reading data records from the shard. The following are the valid Amazon Kinesis shard iterator types: AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific sequence number, provided in the value StartingSequenceNumber . AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted by a specific sequence number,... |
stream_name |
No | The name of the Amazon Kinesis data stream. |
starting_sequence_number |
No | The sequence number of the data record in the shard from which to start reading. Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER. |
timestamp |
No | The time stamp of the data record from which to start reading. Used with shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or 1459799926.480 . If a record with this exact time stamp does not exist, the iterator returned is for the next (later) record. If the time stamp is older than the current trim... |
stream_arn |
No | The ARN of the stream. |
stream_id |
No | Not Implemented. Reserved for future use. |
dry_run |
No | Checks if your request will succeed. DryRun is an optional parameter. |
Output
GetShardIteratorOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
shard_iterator |
str | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
GetShardIteratorOutput, ShardIteratorType
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_kinesis.exceptions:
AccessDeniedError, DryRunOperationError, InternalFailureError, InvalidArgumentError, ProvisionedThroughputExceededError, ResourceNotFoundError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.