Amazon Kinesis Video Streams

2022/05/03 - Amazon Kinesis Video Streams - 4 new 4 updated api methods

Changes  Add support for multiple image feature related APIs for configuring image generation and notification of a video stream. Add "GET_IMAGES" to the list of supported API names for the GetDataEndpoint API.

DescribeNotificationConfiguration (new) Link ¶

Gets the NotificationConfiguration for a given Kinesis video stream.

See also: AWS API Documentation

Request Syntax

client.describe_notification_configuration(
    StreamName='string',
    StreamARN='string'
)
type StreamName

string

param StreamName

The name of the stream from which to retrieve the notification configuration. You must specify either the StreamName or the StreamARN .

type StreamARN

string

param StreamARN

The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to retrieve the notification configuration. You must specify either the StreamName or the StreamARN.

rtype

dict

returns

Response Syntax

{
    'NotificationConfiguration': {
        'Status': 'ENABLED'|'DISABLED',
        'DestinationConfig': {
            'Uri': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • NotificationConfiguration (dict) --

      The structure that contains the information required for notifications. If the structure is null, the configuration will be deleted from the stream.

      • Status (string) --

        Indicates if a notification configuration is enabled or disabled.

      • DestinationConfig (dict) --

        The destination information required to deliver a notification to a customer.

        • Uri (string) --

          The Uniform Resource Idenifier (URI) that identifies where the images will be delivered.

UpdateImageGenerationConfiguration (new) Link ¶

Updates the StreamInfo and ImageProcessingConfiguration fields.

See also: AWS API Documentation

Request Syntax

client.update_image_generation_configuration(
    StreamName='string',
    StreamARN='string',
    ImageGenerationConfiguration={
        'Status': 'ENABLED'|'DISABLED',
        'ImageSelectorType': 'SERVER_TIMESTAMP'|'PRODUCER_TIMESTAMP',
        'DestinationConfig': {
            'Uri': 'string',
            'DestinationRegion': 'string'
        },
        'SamplingInterval': 123,
        'Format': 'JPEG'|'PNG',
        'FormatConfig': {
            'string': 'string'
        },
        'WidthPixels': 123,
        'HeightPixels': 123
    }
)
type StreamName

string

param StreamName

The name of the stream from which to update the image generation configuration. You must specify either the StreamName or the StreamARN .

type StreamARN

string

param StreamARN

The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to update the image generation configuration. You must specify either the StreamName or the StreamARN .

type ImageGenerationConfiguration

dict

param ImageGenerationConfiguration

The structure that contains the information required for the KVS images delivery. If the structure is null, the configuration will be deleted from the stream.

  • Status (string) -- [REQUIRED]

    Indicates whether the ContinuousImageGenerationConfigurations API is enabled or disabled.

  • ImageSelectorType (string) -- [REQUIRED]

    The origin of the Server or Producer timestamps to use to generate the images.

  • DestinationConfig (dict) -- [REQUIRED]

    The structure that contains the information required to deliver images to a customer.

    • Uri (string) -- [REQUIRED]

      The Uniform Resource Idenifier (URI) that identifies where the images will be delivered.

    • DestinationRegion (string) -- [REQUIRED]

      The AWS Region of the S3 bucket where images will be delivered. This DestinationRegion must match the Region where the stream is located.

  • SamplingInterval (integer) -- [REQUIRED]

    The time interval in milliseconds (ms) at which the images need to be generated from the stream. The minimum value that can be provided is 33 ms, because a camera that generates content at 30 FPS would create a frame every 33.3 ms. If the timestamp range is less than the sampling interval, the Image from the StartTimestamp will be returned if available.

  • Format (string) -- [REQUIRED]

    The accepted image format.

  • FormatConfig (dict) --

    The list of a key-value pair structure that contains extra parameters that can be applied when the image is generated. The FormatConfig key is the JPEGQuality , which indicates the JPEG quality key to be used to generate the image. The FormatConfig value accepts ints from 1 to 100. If the value is 1, the image will be generated with less quality and the best compression. If the value is 100, the image will be generated with the best quality and less compression. If no value is provided, the default value of the JPEGQuality key will be set to 80.

    • (string) --

      • (string) --

  • WidthPixels (integer) --

    The width of the output image that is used in conjunction with the HeightPixels parameter. When both WidthPixels and HeightPixels parameters are provided, the image will be stretched to fit the specified aspect ratio. If only the WidthPixels parameter is provided, its original aspect ratio will be used to calculate the HeightPixels ratio. If neither parameter is provided, the original image size will be returned.

  • HeightPixels (integer) --

    The height of the output image that is used in conjunction with the WidthPixels parameter. When both HeightPixels and WidthPixels parameters are provided, the image will be stretched to fit the specified aspect ratio. If only the HeightPixels parameter is provided, its original aspect ratio will be used to calculate the WidthPixels ratio. If neither parameter is provided, the original image size will be returned.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeImageGenerationConfiguration (new) Link ¶

Gets the ImageGenerationConfiguration for a given Kinesis video stream.

See also: AWS API Documentation

Request Syntax

client.describe_image_generation_configuration(
    StreamName='string',
    StreamARN='string'
)
type StreamName

string

param StreamName

The name of the stream from which to retrieve the image generation configuration. You must specify either the StreamName or the StreamARN .

type StreamARN

string

param StreamARN

The Amazon Resource Name (ARN) of the Kinesis video stream from which to retrieve the image generation configuration. You must specify either the StreamName or the StreamARN .

rtype

dict

returns

Response Syntax

{
    'ImageGenerationConfiguration': {
        'Status': 'ENABLED'|'DISABLED',
        'ImageSelectorType': 'SERVER_TIMESTAMP'|'PRODUCER_TIMESTAMP',
        'DestinationConfig': {
            'Uri': 'string',
            'DestinationRegion': 'string'
        },
        'SamplingInterval': 123,
        'Format': 'JPEG'|'PNG',
        'FormatConfig': {
            'string': 'string'
        },
        'WidthPixels': 123,
        'HeightPixels': 123
    }
}

Response Structure

  • (dict) --

    • ImageGenerationConfiguration (dict) --

      The structure that contains the information required for the Kinesis video stream (KVS) images delivery. If this structure is null, the configuration will be deleted from the stream.

      • Status (string) --

        Indicates whether the ContinuousImageGenerationConfigurations API is enabled or disabled.

      • ImageSelectorType (string) --

        The origin of the Server or Producer timestamps to use to generate the images.

      • DestinationConfig (dict) --

        The structure that contains the information required to deliver images to a customer.

        • Uri (string) --

          The Uniform Resource Idenifier (URI) that identifies where the images will be delivered.

        • DestinationRegion (string) --

          The AWS Region of the S3 bucket where images will be delivered. This DestinationRegion must match the Region where the stream is located.

      • SamplingInterval (integer) --

        The time interval in milliseconds (ms) at which the images need to be generated from the stream. The minimum value that can be provided is 33 ms, because a camera that generates content at 30 FPS would create a frame every 33.3 ms. If the timestamp range is less than the sampling interval, the Image from the StartTimestamp will be returned if available.

      • Format (string) --

        The accepted image format.

      • FormatConfig (dict) --

        The list of a key-value pair structure that contains extra parameters that can be applied when the image is generated. The FormatConfig key is the JPEGQuality , which indicates the JPEG quality key to be used to generate the image. The FormatConfig value accepts ints from 1 to 100. If the value is 1, the image will be generated with less quality and the best compression. If the value is 100, the image will be generated with the best quality and less compression. If no value is provided, the default value of the JPEGQuality key will be set to 80.

        • (string) --

          • (string) --

      • WidthPixels (integer) --

        The width of the output image that is used in conjunction with the HeightPixels parameter. When both WidthPixels and HeightPixels parameters are provided, the image will be stretched to fit the specified aspect ratio. If only the WidthPixels parameter is provided, its original aspect ratio will be used to calculate the HeightPixels ratio. If neither parameter is provided, the original image size will be returned.

      • HeightPixels (integer) --

        The height of the output image that is used in conjunction with the WidthPixels parameter. When both HeightPixels and WidthPixels parameters are provided, the image will be stretched to fit the specified aspect ratio. If only the HeightPixels parameter is provided, its original aspect ratio will be used to calculate the WidthPixels ratio. If neither parameter is provided, the original image size will be returned.

UpdateNotificationConfiguration (new) Link ¶

Updates the notification information for a stream.

See also: AWS API Documentation

Request Syntax

client.update_notification_configuration(
    StreamName='string',
    StreamARN='string',
    NotificationConfiguration={
        'Status': 'ENABLED'|'DISABLED',
        'DestinationConfig': {
            'Uri': 'string'
        }
    }
)
type StreamName

string

param StreamName

The name of the stream from which to update the notification configuration. You must specify either the StreamName or the StreamARN .

type StreamARN

string

param StreamARN

The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to update the notification configuration. You must specify either the StreamName or the StreamARN .

type NotificationConfiguration

dict

param NotificationConfiguration

The structure containing the information required for notifications. If the structure is null, the configuration will be deleted from the stream.

  • Status (string) -- [REQUIRED]

    Indicates if a notification configuration is enabled or disabled.

  • DestinationConfig (dict) -- [REQUIRED]

    The destination information required to deliver a notification to a customer.

    • Uri (string) -- [REQUIRED]

      The Uniform Resource Idenifier (URI) that identifies where the images will be delivered.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateSignalingChannel (updated) Link ¶
Changes (request)
{'ChannelType': {'FULL_MESH'}}

Creates a signaling channel.

CreateSignalingChannel is an asynchronous operation.

See also: AWS API Documentation

Request Syntax

client.create_signaling_channel(
    ChannelName='string',
    ChannelType='SINGLE_MASTER'|'FULL_MESH',
    SingleMasterConfiguration={
        'MessageTtlSeconds': 123
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ChannelName

string

param ChannelName

[REQUIRED]

A name for the signaling channel that you are creating. It must be unique for each Amazon Web Services account and Amazon Web Services Region.

type ChannelType

string

param ChannelType

A type of the signaling channel that you are creating. Currently, SINGLE_MASTER is the only supported channel type.

type SingleMasterConfiguration

dict

param SingleMasterConfiguration

A structure containing the configuration for the SINGLE_MASTER channel type.

  • MessageTtlSeconds (integer) --

    The period of time a signaling channel retains undelivered messages before they are discarded.

type Tags

list

param Tags

A set of tags (key-value pairs) that you want to associate with this channel.

  • (dict) --

    A key and value pair that is associated with the specified signaling channel.

    • Key (string) -- [REQUIRED]

      The key of the tag that is associated with the specified signaling channel.

    • Value (string) -- [REQUIRED]

      The value of the tag that is associated with the specified signaling channel.

rtype

dict

returns

Response Syntax

{
    'ChannelARN': 'string'
}

Response Structure

  • (dict) --

    • ChannelARN (string) --

      The Amazon Resource Name (ARN) of the created channel.

DescribeSignalingChannel (updated) Link ¶
Changes (response)
{'ChannelInfo': {'ChannelType': {'FULL_MESH'}}}

Returns the most current information about the signaling channel. You must specify either the name or the Amazon Resource Name (ARN) of the channel that you want to describe.

See also: AWS API Documentation

Request Syntax

client.describe_signaling_channel(
    ChannelName='string',
    ChannelARN='string'
)
type ChannelName

string

param ChannelName

The name of the signaling channel that you want to describe.

type ChannelARN

string

param ChannelARN

The ARN of the signaling channel that you want to describe.

rtype

dict

returns

Response Syntax

{
    'ChannelInfo': {
        'ChannelName': 'string',
        'ChannelARN': 'string',
        'ChannelType': 'SINGLE_MASTER'|'FULL_MESH',
        'ChannelStatus': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING',
        'CreationTime': datetime(2015, 1, 1),
        'SingleMasterConfiguration': {
            'MessageTtlSeconds': 123
        },
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    • ChannelInfo (dict) --

      A structure that encapsulates the specified signaling channel's metadata and properties.

      • ChannelName (string) --

        The name of the signaling channel.

      • ChannelARN (string) --

        The Amazon Resource Name (ARN) of the signaling channel.

      • ChannelType (string) --

        The type of the signaling channel.

      • ChannelStatus (string) --

        Current status of the signaling channel.

      • CreationTime (datetime) --

        The time at which the signaling channel was created.

      • SingleMasterConfiguration (dict) --

        A structure that contains the configuration for the SINGLE_MASTER channel type.

        • MessageTtlSeconds (integer) --

          The period of time a signaling channel retains undelivered messages before they are discarded.

      • Version (string) --

        The current version of the signaling channel.

GetDataEndpoint (updated) Link ¶
Changes (request)
{'APIName': {'GET_IMAGES'}}

Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the GetMedia or GetMediaForFragmentList operations) or write to it (using the PutMedia operation).

Note

The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint.

In the request, specify the stream either by StreamName or StreamARN .

See also: AWS API Documentation

Request Syntax

client.get_data_endpoint(
    StreamName='string',
    StreamARN='string',
    APIName='PUT_MEDIA'|'GET_MEDIA'|'LIST_FRAGMENTS'|'GET_MEDIA_FOR_FRAGMENT_LIST'|'GET_HLS_STREAMING_SESSION_URL'|'GET_DASH_STREAMING_SESSION_URL'|'GET_CLIP'|'GET_IMAGES'
)
type StreamName

string

param StreamName

The name of the stream that you want to get the endpoint for. You must specify either this parameter or a StreamARN in the request.

type StreamARN

string

param StreamARN

The Amazon Resource Name (ARN) of the stream that you want to get the endpoint for. You must specify either this parameter or a StreamName in the request.

type APIName

string

param APIName

[REQUIRED]

The name of the API action for which to get an endpoint.

rtype

dict

returns

Response Syntax

{
    'DataEndpoint': 'string'
}

Response Structure

  • (dict) --

    • DataEndpoint (string) --

      The endpoint value. To read data from the stream or to write data to it, specify this endpoint in your application.

ListSignalingChannels (updated) Link ¶
Changes (response)
{'ChannelInfoList': {'ChannelType': {'FULL_MESH'}}}

Returns an array of ChannelInfo objects. Each object describes a signaling channel. To retrieve only those channels that satisfy a specific condition, you can specify a ChannelNameCondition .

See also: AWS API Documentation

Request Syntax

client.list_signaling_channels(
    MaxResults=123,
    NextToken='string',
    ChannelNameCondition={
        'ComparisonOperator': 'BEGINS_WITH',
        'ComparisonValue': 'string'
    }
)
type MaxResults

integer

param MaxResults

The maximum number of channels to return in the response. The default is 500.

type NextToken

string

param NextToken

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

type ChannelNameCondition

dict

param ChannelNameCondition

Optional: Returns only the channels that satisfy a specific condition.

  • ComparisonOperator (string) --

    A comparison operator. Currently, you can only specify the BEGINS_WITH operator, which finds signaling channels whose names begin with a given prefix.

  • ComparisonValue (string) --

    A value to compare.

rtype

dict

returns

Response Syntax

{
    'ChannelInfoList': [
        {
            'ChannelName': 'string',
            'ChannelARN': 'string',
            'ChannelType': 'SINGLE_MASTER'|'FULL_MESH',
            'ChannelStatus': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING',
            'CreationTime': datetime(2015, 1, 1),
            'SingleMasterConfiguration': {
                'MessageTtlSeconds': 123
            },
            'Version': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ChannelInfoList (list) --

      An array of ChannelInfo objects.

      • (dict) --

        A structure that encapsulates a signaling channel's metadata and properties.

        • ChannelName (string) --

          The name of the signaling channel.

        • ChannelARN (string) --

          The Amazon Resource Name (ARN) of the signaling channel.

        • ChannelType (string) --

          The type of the signaling channel.

        • ChannelStatus (string) --

          Current status of the signaling channel.

        • CreationTime (datetime) --

          The time at which the signaling channel was created.

        • SingleMasterConfiguration (dict) --

          A structure that contains the configuration for the SINGLE_MASTER channel type.

          • MessageTtlSeconds (integer) --

            The period of time a signaling channel retains undelivered messages before they are discarded.

        • Version (string) --

          The current version of the signaling channel.

    • NextToken (string) --

      If the response is truncated, the call returns this element with a token. To get the next batch of streams, use this token in your next request.