Skip to content

list_streams async

list_streams(
    *,
    config_overrides: Optional[AsyncKinesisVideoClientConfig] = None,
    max_results: Optional[ListStreamsInputLimit] = None,
    next_token: Optional[NextToken] = None,
    stream_name_condition: Optional[StreamNameCondition] = None,
) -> ListStreamsOutput

Returns an array of StreamInfo objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a StreamNameCondition.

Parameters:

  • max_results (Optional[ListStreamsInputLimit], default: None ) –

    The maximum number of streams to return in the response. The default is 10,000.

  • next_token (Optional[NextToken], default: None ) –

    If you specify this parameter, when the result of a ListStreams operation is truncated, the call returns the NextToken in the response. To get another batch of streams, provide this token in your next request.

  • stream_name_condition (Optional[StreamNameCondition], default: None ) –

    Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition.

Raises:

Source code in docs_src/capo_kinesis_video/_services/async_kinesis_video.py
async def list_streams(
    self,
    *,
    config_overrides: Optional[AsyncKinesisVideoClientConfig] = None,
    max_results: Optional[
        "capo_kinesis_video.types.list_streams_input_limit.ListStreamsInputLimit"
    ] = None,
    next_token: Optional["capo_kinesis_video.types.next_token.NextToken"] = None,
    stream_name_condition: Optional[
        "capo_kinesis_video.types.stream_name_condition.StreamNameCondition"
    ] = None,
) -> "capo_kinesis_video.types.list_streams_output.ListStreamsOutput":
    """<p>Returns an array of <code>StreamInfo</code> objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a <code>StreamNameCondition</code>. </p>

    Args:
        max_results: <p>The maximum number of streams to return in the response. The default is 10,000.</p>
        next_token: <p>If you specify this parameter, when the result of a <code>ListStreams</code> operation is truncated, the call returns the <code>NextToken</code> in the response. To get another batch of streams, provide this token in your next request.</p>
        stream_name_condition: <p>Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition. </p>

    Raises:
        capo_kinesis_video.errors.client_limit_exceeded_exception.ClientLimitExceededException: <p>Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.</p>
        capo_kinesis_video.errors.invalid_argument_exception.InvalidArgumentException: <p>The value for this input parameter is invalid.</p>
        capo_kinesis_video.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kinesis_video.types.list_streams_input.ListStreamsInput]",
    ) -> AsyncOperationResponse[
        "capo_kinesis_video.types.list_streams_output.ListStreamsOutput"
    ]:
        import capo_kinesis_video._operations.kinesis_video_20170930.list_streams

        (
            output,
            http_response,
        ) = await capo_kinesis_video._operations.kinesis_video_20170930.list_streams.async_list_streams(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListStreams")
    )
    input_: capo_kinesis_video.types.list_streams_input.ListStreamsInput = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if stream_name_condition is not None:
        input_["stream_name_condition"] = stream_name_condition

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output