Returns an array of stream ARNs associated with the current account and endpoint. If the TableName parameter is present, then ListStreams will return only the streams ARNs for that table.
You can call ListStreams at a maximum rate of 5 times per second.
Parameters:
-
table_name
(Optional[TableName], default:
None
)
–
If this parameter is provided, then only the streams associated with this table name are returned.
-
limit
(Optional[PositiveIntegerObject], default:
None
)
–
The maximum number of streams to return. The upper limit is 100.
-
exclusive_start_stream_arn
(Optional[StreamArn], default:
None
)
–
The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for LastEvaluatedStreamArn in the previous operation.
Raises:
Examples:
To list all of the stream ARNs
The following example lists all of the stream ARNs.
>>> client.list_streams()
Source code in docs_src/capo_dynamodb_streams/_services/dynamo_db_streams.py
| def list_streams(
self,
*,
config_overrides: Optional[DynamoDBStreamsClientConfig] = None,
table_name: Optional["capo_dynamodb_streams.types.table_name.TableName"] = None,
limit: Optional[
"capo_dynamodb_streams.types.positive_integer_object.PositiveIntegerObject"
] = None,
exclusive_start_stream_arn: Optional[
"capo_dynamodb_streams.types.stream_arn.StreamArn"
] = None,
) -> "capo_dynamodb_streams.types.list_streams_output.ListStreamsOutput":
"""<p>Returns an array of stream ARNs associated with the current account and endpoint. If the <code>TableName</code> parameter is present, then <code>ListStreams</code> will return only the streams ARNs for that table.</p> <note> <p>You can call <code>ListStreams</code> at a maximum rate of 5 times per second.</p> </note>
Args:
table_name: <p>If this parameter is provided, then only the streams associated with this table name are returned.</p>
limit: <p>The maximum number of streams to return. The upper limit is 100.</p>
exclusive_start_stream_arn: <p>The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedStreamArn</code> in the previous operation. </p>
Raises:
capo_dynamodb_streams.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_dynamodb_streams.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
capo_dynamodb_streams.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To list all of the stream ARNs
The following example lists all of the stream ARNs.
>>> client.list_streams()
"""
def _handler(
req: "OperationRequest[capo_dynamodb_streams.types.list_streams_input.ListStreamsInput]",
) -> OperationResponse[
"capo_dynamodb_streams.types.list_streams_output.ListStreamsOutput"
]:
import capo_dynamodb_streams._operations.dynamo_db_streams_20120810.list_streams
output, http_response = (
capo_dynamodb_streams._operations.dynamo_db_streams_20120810.list_streams.list_streams(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListStreams")
)
input_: capo_dynamodb_streams.types.list_streams_input.ListStreamsInput = {}
if table_name is not None:
input_["table_name"] = table_name
if limit is not None:
input_["limit"] = limit
if exclusive_start_stream_arn is not None:
input_["exclusive_start_stream_arn"] = exclusive_start_stream_arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|