IVS / Client / list_streams

list_streams#

IVS.Client.list_streams(**kwargs)#

Gets summary information about live streams in your account, in the Amazon Web Services region where the API request is processed.

See also: AWS API Documentation

Request Syntax

response = client.list_streams(
    filterBy={
        'health': 'HEALTHY'|'STARVING'|'UNKNOWN'
    },
    nextToken='string',
    maxResults=123
)
Parameters:
  • filterBy (dict) –

    Filters the stream list to match the specified criterion.

    • health (string) –

      The stream’s health.

  • nextToken (string) – The first stream to retrieve. This is used for pagination; see the nextToken response field.

  • maxResults (integer) – Maximum number of streams to return. Default: 100.

Return type:

dict

Returns:

Response Syntax

{
    'streams': [
        {
            'channelArn': 'string',
            'streamId': 'string',
            'state': 'LIVE'|'OFFLINE',
            'health': 'HEALTHY'|'STARVING'|'UNKNOWN',
            'viewerCount': 123,
            'startTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • streams (list) –

      List of streams.

      • (dict) –

        Summary information about a stream.

        • channelArn (string) –

          Channel ARN for the stream.

        • streamId (string) –

          Unique identifier for a live or previously live stream in the specified channel.

        • state (string) –

          The stream’s state. Do not rely on the OFFLINE state, as the API may not return it; instead, a “NotBroadcasting” error will indicate that the stream is not live.

        • health (string) –

          The stream’s health.

        • viewerCount (integer) –

          A count of concurrent views of the stream. Typically, a new view appears in viewerCount within 15 seconds of when video playback starts and a view is removed from viewerCount within 1 minute of when video playback ends. A value of -1 indicates that the request timed out; in this case, retry.

        • startTime (datetime) –

          Time of the stream’s start. This is an ISO 8601 timestamp; note that this is returned as a string.

    • nextToken (string) –

      If there are more streams than maxResults, use nextToken in the request to get the next set.

Exceptions

  • IVS.Client.exceptions.AccessDeniedException

  • IVS.Client.exceptions.ValidationException