Amazon Interactive Video Service

2020/07/15 - Amazon Interactive Video Service - 18 new api methods

Changes  Introducing Amazon Interactive Video Service - a managed live streaming solution that is quick and easy to set up, and ideal for creating interactive video experiences.

CreateChannel (new) Link ¶

Creates a new channel and an associated stream key to start streaming.

See also: AWS API Documentation

Request Syntax

client.create_channel(
    name='string',
    latencyMode='NORMAL'|'LOW',
    type='BASIC'|'STANDARD',
    tags={
        'string': 'string'
    }
)
type name

string

param name

Channel name.

type latencyMode

string

param latencyMode

Channel latency mode. Default: LOW .

type type

string

param type

Channel type, which determines the allowable resolution and bitrate. STANDARD : The stream is transcoded; resolution (width, in landscape orientation) can be up to 1080p or the input source resolution, whichever is lower; and bitrate can be up to 8.5 Mbps. BASIC : The stream is transfixed; resolution can be up to 480p; and bitrate can be up to 1.5 Mbps. Default: STANDARD .

type tags

dict

param tags

See Channel$tags .

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'channel': {
        'arn': 'string',
        'name': 'string',
        'latencyMode': 'NORMAL'|'LOW',
        'type': 'BASIC'|'STANDARD',
        'ingestEndpoint': 'string',
        'playbackUrl': 'string',
        'tags': {
            'string': 'string'
        }
    },
    'streamKey': {
        'arn': 'string',
        'value': 'string',
        'channelArn': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • channel (dict) --

      Object specifying a channel.

      • arn (string) --

        Channel ARN.

      • name (string) --

        Channel name.

      • latencyMode (string) --

        Channel latency mode. Default: LOW .

      • type (string) --

        Channel type, which determines the allowable resolution and bitrate. STANDARD: The stream is transcoded; resolution (width, in landscape orientation) can be up to 1080p or the input source resolution, whichever is lower; and bitrate can be up to 8.5 Mbps. BASIC: The stream is transfixed; resolution can be up to 480p; and bitrate can be up to 1.5 Mbps. Default STANDARD.

      • ingestEndpoint (string) --

        Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.

      • playbackUrl (string) --

        Channel playback URL.

      • tags (dict) --

        Array of 1-50 maps, each of the form string:string (key:value) .

        • (string) --

          • (string) --

    • streamKey (dict) --

      Object specifying a stream key.

      • arn (string) --

        Stream-key ARN.

      • value (string) --

        Stream-key value.

      • channelArn (string) --

        Channel ARN for the stream.

      • tags (dict) --

        Array of 1-50 maps, each of the form string:string (key:value)

        • (string) --

          • (string) --

GetStreamKey (new) Link ¶

Gets stream-key information for a specified ARN.

See also: AWS API Documentation

Request Syntax

client.get_stream_key(
    arn='string'
)
type arn

string

param arn

[REQUIRED]

ARN for the stream key to be retrieved.

rtype

dict

returns

Response Syntax

{
    'streamKey': {
        'arn': 'string',
        'value': 'string',
        'channelArn': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • streamKey (dict) --

      Object specifying a stream key.

      • arn (string) --

        Stream-key ARN.

      • value (string) --

        Stream-key value.

      • channelArn (string) --

        Channel ARN for the stream.

      • tags (dict) --

        Array of 1-50 maps, each of the form string:string (key:value)

        • (string) --

          • (string) --

DeleteChannel (new) Link ¶

Deletes a specified channel and its associated stream keys.

See also: AWS API Documentation

Request Syntax

client.delete_channel(
    arn='string'
)
type arn

string

param arn

[REQUIRED]

ARN of the channel to be deleted.

returns

None

ListStreamKeys (new) Link ¶

Gets summary information about stream keys. The list can be filtered to a particular channel.

See also: AWS API Documentation

Request Syntax

client.list_stream_keys(
    channelArn='string',
    nextToken='string',
    maxResults=123
)
type channelArn

string

param channelArn

[REQUIRED]

Channel ARN used to filter the list.

type nextToken

string

param nextToken

The first stream key to retrieve. This is used for pagination; see the nextToken response field.

type maxResults

integer

param maxResults

Maximum number of streamKeys to return.

rtype

dict

returns

Response Syntax

{
    'streamKeys': [
        {
            'arn': 'string',
            'channelArn': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • streamKeys (list) --

      List of stream keys.

      • (dict) --

        Summary information about a stream key.

        • arn (string) --

          Stream-key ARN.

        • channelArn (string) --

          Channel ARN for the stream.

        • tags (dict) --

          Array of 1-50 maps, each of the form string:string (key:value)

          • (string) --

            • (string) --

    • nextToken (string) --

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

GetChannel (new) Link ¶

Gets the channel configuration for a specified channel ARN. See also BatchGetChannel .

See also: AWS API Documentation

Request Syntax

client.get_channel(
    arn='string'
)
type arn

string

param arn

[REQUIRED]

ARN of the channel for which the configuration is to be retrieved.

rtype

dict

returns

Response Syntax

{
    'channel': {
        'arn': 'string',
        'name': 'string',
        'latencyMode': 'NORMAL'|'LOW',
        'type': 'BASIC'|'STANDARD',
        'ingestEndpoint': 'string',
        'playbackUrl': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • channel (dict) --

      Object specifying a channel.

      • arn (string) --

        Channel ARN.

      • name (string) --

        Channel name.

      • latencyMode (string) --

        Channel latency mode. Default: LOW .

      • type (string) --

        Channel type, which determines the allowable resolution and bitrate. STANDARD: The stream is transcoded; resolution (width, in landscape orientation) can be up to 1080p or the input source resolution, whichever is lower; and bitrate can be up to 8.5 Mbps. BASIC: The stream is transfixed; resolution can be up to 480p; and bitrate can be up to 1.5 Mbps. Default STANDARD.

      • ingestEndpoint (string) --

        Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.

      • playbackUrl (string) --

        Channel playback URL.

      • tags (dict) --

        Array of 1-50 maps, each of the form string:string (key:value) .

        • (string) --

          • (string) --

ListTagsForResource (new) Link ¶

Gets information about the tags for a specified ARN.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string',
    nextToken='string',
    maxResults=123
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource to be retrieved.

type nextToken

string

param nextToken

The first tag to retrieve. This is used for pagination; see the nextToken response field.

type maxResults

integer

param maxResults

Maximum number of tags to return.

rtype

dict

returns

Response Syntax

{
    'tags': {
        'string': 'string'
    },
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tags (dict) --

      • (string) --

        • (string) --

    • nextToken (string) --

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

BatchGetChannel (new) Link ¶

Performs GetChannel on multiple ARNs simultaneously.

See also: AWS API Documentation

Request Syntax

client.batch_get_channel(
    arns=[
        'string',
    ]
)
type arns

list

param arns

[REQUIRED]

Array of ARNs, one per channel.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'channels': [
        {
            'arn': 'string',
            'name': 'string',
            'latencyMode': 'NORMAL'|'LOW',
            'type': 'BASIC'|'STANDARD',
            'ingestEndpoint': 'string',
            'playbackUrl': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'errors': [
        {
            'arn': 'string',
            'code': 'string',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • channels (list) --

      • (dict) --

        Object specifying a channel.

        • arn (string) --

          Channel ARN.

        • name (string) --

          Channel name.

        • latencyMode (string) --

          Channel latency mode. Default: LOW .

        • type (string) --

          Channel type, which determines the allowable resolution and bitrate. STANDARD: The stream is transcoded; resolution (width, in landscape orientation) can be up to 1080p or the input source resolution, whichever is lower; and bitrate can be up to 8.5 Mbps. BASIC: The stream is transfixed; resolution can be up to 480p; and bitrate can be up to 1.5 Mbps. Default STANDARD.

        • ingestEndpoint (string) --

          Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.

        • playbackUrl (string) --

          Channel playback URL.

        • tags (dict) --

          Array of 1-50 maps, each of the form string:string (key:value) .

          • (string) --

            • (string) --

    • errors (list) --

      Each error object is related to a specific ARN in the request.

      • (dict) --

        Error related to a specific channel, specified by its ARN.

        • arn (string) --

          Channel ARN.

        • code (string) --

          Error code.

        • message (string) --

          Error message, determined by the application.

StopStream (new) Link ¶

Disconnects the stream for the specified channel. This disconnects the incoming RTMP stream from the client. Can be used in conjunction with DeleteStreamKey to prevent further streaming to a channel.

Note

Many streaming client-software libraries automatically reconnect a dropped RTMP session, so to stop the stream permanently, you may want to first revoke the streamKey attached to the channel.

See also: AWS API Documentation

Request Syntax

client.stop_stream(
    channelArn='string'
)
type channelArn

string

param channelArn

[REQUIRED]

ARN of the channel for which the stream is to be stopped.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateStreamKey (new) Link ¶

Creates a stream key, used to initiate a stream, for a specified channel ARN.

Note that CreateChannel creates a stream key. If you subsequently use CreateStreamKey on the same channel, it will fail because a stream key already exists and there is a limit of 1 stream key per channel. To reset the stream key on a channel, use DeleteStreamKey and then CreateStreamKey.

See also: AWS API Documentation

Request Syntax

client.create_stream_key(
    channelArn='string',
    tags={
        'string': 'string'
    }
)
type channelArn

string

param channelArn

[REQUIRED]

ARN of the channel for which to create the stream key.

type tags

dict

param tags

See Channel$tags .

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'streamKey': {
        'arn': 'string',
        'value': 'string',
        'channelArn': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • streamKey (dict) --

      Stream key used to authenticate an RTMP stream for ingestion.

      • arn (string) --

        Stream-key ARN.

      • value (string) --

        Stream-key value.

      • channelArn (string) --

        Channel ARN for the stream.

      • tags (dict) --

        Array of 1-50 maps, each of the form string:string (key:value)

        • (string) --

          • (string) --

TagResource (new) Link ¶

Adds or updates tags for a resource with a specified ARN.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
type resourceArn

string

param resourceArn

[REQUIRED]

ARN of the resource for which tags are to be added or updated.

type tags

dict

param tags

[REQUIRED]

Array of tags to be added or updated.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListChannels (new) Link ¶

Gets summary information about channels. This list can be filtered to match a specified string.

See also: AWS API Documentation

Request Syntax

client.list_channels(
    filterByName='string',
    nextToken='string',
    maxResults=123
)
type filterByName

string

param filterByName

Filters the channel list to match the specified name.

type nextToken

string

param nextToken

The first channel to retrieve. This is used for pagination; see the nextToken response field.

type maxResults

integer

param maxResults

Maximum number of channels to return.

rtype

dict

returns

Response Syntax

{
    'channels': [
        {
            'arn': 'string',
            'name': 'string',
            'latencyMode': 'NORMAL'|'LOW',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • channels (list) --

      List of the matching channels.

      • (dict) --

        Summary information about a channel.

        • arn (string) --

          Channel ARN.

        • name (string) --

          Channel name.

        • latencyMode (string) --

          Channel latency mode. Default: LOW .

        • tags (dict) --

          Array of 1-50 maps, each of the form string:string (key:value) .

          • (string) --

            • (string) --

    • nextToken (string) --

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

UntagResource (new) Link ¶

Removes tags for a resource with a specified ARN.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

ARN of the resource for which tags are to be removed.

type tagKeys

list

param tagKeys

[REQUIRED]

Array of tags to be removed.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateChannel (new) Link ¶

Updates a channel's configuration. This does not affect an ongoing stream of this channel. You must stop and restart the stream for the changes to take effect.

See also: AWS API Documentation

Request Syntax

client.update_channel(
    arn='string',
    name='string',
    latencyMode='NORMAL'|'LOW',
    type='BASIC'|'STANDARD'
)
type arn

string

param arn

[REQUIRED]

ARN of the channel to be updated.

type name

string

param name

Channel name.

type latencyMode

string

param latencyMode

Channel latency mode. Default: LOW .

type type

string

param type

Channel type, which determines the allowable resolution and bitrate. STANDARD : The stream is transcoded; resolution (width, in landscape orientation) can be up to 1080p or the input source resolution, whichever is lower; and bitrate can be up to 8.5 Mbps. BASIC : The stream is transfixed; resolution can be up to 480p; and bitrate can be up to 1.5 Mbps. Default STANDARD .

rtype

dict

returns

Response Syntax

{
    'channel': {
        'arn': 'string',
        'name': 'string',
        'latencyMode': 'NORMAL'|'LOW',
        'type': 'BASIC'|'STANDARD',
        'ingestEndpoint': 'string',
        'playbackUrl': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • channel (dict) --

      Object specifying a channel.

      • arn (string) --

        Channel ARN.

      • name (string) --

        Channel name.

      • latencyMode (string) --

        Channel latency mode. Default: LOW .

      • type (string) --

        Channel type, which determines the allowable resolution and bitrate. STANDARD: The stream is transcoded; resolution (width, in landscape orientation) can be up to 1080p or the input source resolution, whichever is lower; and bitrate can be up to 8.5 Mbps. BASIC: The stream is transfixed; resolution can be up to 480p; and bitrate can be up to 1.5 Mbps. Default STANDARD.

      • ingestEndpoint (string) --

        Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.

      • playbackUrl (string) --

        Channel playback URL.

      • tags (dict) --

        Array of 1-50 maps, each of the form string:string (key:value) .

        • (string) --

          • (string) --

PutMetadata (new) Link ¶

Inserts metadata into an RTMP stream for a specified channel. A maximum of 5 requests per second per channel is allowed, each with a maximum 1KB payload.

See also: AWS API Documentation

Request Syntax

client.put_metadata(
    channelArn='string',
    metadata='string'
)
type channelArn

string

param channelArn

[REQUIRED]

ARN of the channel into which metadata is inserted. This channel must have an active stream.

type metadata

string

param metadata

[REQUIRED]

Metadata to insert into the stream. Maximum: 1 KB per request.

returns

None

GetStream (new) Link ¶

Gets information about the active (live) stream on a specified channel.

See also: AWS API Documentation

Request Syntax

client.get_stream(
    channelArn='string'
)
type channelArn

string

param channelArn

[REQUIRED]

Channel ARN for stream to be accessed.

rtype

dict

returns

Response Syntax

{
    'stream': {
        'channelArn': 'string',
        'playbackUrl': 'string',
        'startTime': datetime(2015, 1, 1),
        'state': 'LIVE'|'OFFLINE',
        'health': 'HEALTHY'|'STARVING'|'UNKNOWN',
        'viewerCount': 123
    }
}

Response Structure

  • (dict) --

    • stream (dict) --

      Specifies a live video stream that has been ingested and distributed.

      • channelArn (string) --

        Channel ARN for the stream.

      • playbackUrl (string) --

        URL of the video master manifest, required by the video player to play the HLS stream.

      • startTime (datetime) --

        ISO-8601 formatted timestamp of the stream’s start.

      • state (string) --

        The stream’s state.

      • health (string) --

        The stream’s health.

      • viewerCount (integer) --

        Number of current viewers of the stream.

ListStreams (new) Link ¶

Gets summary information about live streams.

See also: AWS API Documentation

Request Syntax

client.list_streams(
    nextToken='string',
    maxResults=123
)
type nextToken

string

param nextToken

The first stream to retrieve. This is used for pagination; see the nextToken response field.

type maxResults

integer

param maxResults

Maximum number of streams to return.

rtype

dict

returns

Response Syntax

{
    'streams': [
        {
            'channelArn': '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.

        • state (string) --

          The stream’s state.

        • health (string) --

          The stream’s health.

        • viewerCount (integer) --

          Number of current viewers of the stream.

        • startTime (datetime) --

          ISO-8601 formatted timestamp of the stream’s start.

    • nextToken (string) --

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

DeleteStreamKey (new) Link ¶

Deletes the stream key for a specified ARN, so it can no longer be used to stream.

See also: AWS API Documentation

Request Syntax

client.delete_stream_key(
    arn='string'
)
type arn

string

param arn

[REQUIRED]

ARN of the stream key to be deleted.

returns

None

BatchGetStreamKey (new) Link ¶

Performs GetStreamKey on multiple ARNs simultaneously.

See also: AWS API Documentation

Request Syntax

client.batch_get_stream_key(
    arns=[
        'string',
    ]
)
type arns

list

param arns

[REQUIRED]

Array of ARNs, one per channel.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'streamKeys': [
        {
            'arn': 'string',
            'value': 'string',
            'channelArn': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'errors': [
        {
            'arn': 'string',
            'code': 'string',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • streamKeys (list) --

      • (dict) --

        Object specifying a stream key.

        • arn (string) --

          Stream-key ARN.

        • value (string) --

          Stream-key value.

        • channelArn (string) --

          Channel ARN for the stream.

        • tags (dict) --

          Array of 1-50 maps, each of the form string:string (key:value)

          • (string) --

            • (string) --

    • errors (list) --

      • (dict) --

        Error related to a specific channel, specified by its ARN.

        • arn (string) --

          Channel ARN.

        • code (string) --

          Error code.

        • message (string) --

          Error message, determined by the application.