Table of Contents
KinesisVideo.
Client
¶A low-level client representing Amazon Kinesis Video Streams
import boto3
client = boto3.client('kinesisvideo')
These are the available methods:
can_paginate()
close()
create_signaling_channel()
create_stream()
delete_signaling_channel()
delete_stream()
describe_image_generation_configuration()
describe_notification_configuration()
describe_signaling_channel()
describe_stream()
get_data_endpoint()
get_paginator()
get_signaling_channel_endpoint()
get_waiter()
list_signaling_channels()
list_streams()
list_tags_for_resource()
list_tags_for_stream()
tag_resource()
tag_stream()
untag_resource()
untag_stream()
update_data_retention()
update_image_generation_configuration()
update_notification_configuration()
update_signaling_channel()
update_stream()
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
create_signaling_channel
(**kwargs)¶Creates a signaling channel.
CreateSignalingChannel
is an asynchronous operation.
See also: AWS API Documentation
Request Syntax
response = client.create_signaling_channel(
ChannelName='string',
ChannelType='SINGLE_MASTER'|'FULL_MESH',
SingleMasterConfiguration={
'MessageTtlSeconds': 123
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[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.
SINGLE_MASTER
is the only supported channel type.A structure containing the configuration for the SINGLE_MASTER
channel type.
The period of time a signaling channel retains undelivered messages before they are discarded.
A set of tags (key-value pairs) that you want to associate with this channel.
A key and value pair that is associated with the specified signaling channel.
The key of the tag that is associated with the specified signaling channel.
The value of the tag that is associated with the specified signaling channel.
dict
Response Syntax
{
'ChannelARN': 'string'
}
Response Structure
(dict) --
ChannelARN (string) --
The Amazon Resource Name (ARN) of the created channel.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.AccountChannelLimitExceededException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.AccessDeniedException
KinesisVideo.Client.exceptions.TagsPerResourceExceededLimitException
create_stream
(**kwargs)¶Creates a new Kinesis video stream.
When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version.
CreateStream
is an asynchronous operation.
For information about how the service works, see How it Works .
You must have permissions for the KinesisVideo:CreateStream
action.
See also: AWS API Documentation
Request Syntax
response = client.create_stream(
DeviceName='string',
StreamName='string',
MediaType='string',
KmsKeyId='string',
DataRetentionInHours=123,
Tags={
'string': 'string'
}
)
The name of the device that is writing to the stream.
Note
In the current implementation, Kinesis Video Streams does not use this name.
[REQUIRED]
A name for the stream that you are creating.
The stream name is an identifier for the stream, and must be unique for each account and region.
The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see Media Types . If you choose to specify the MediaType
, see Naming Requirements for guidelines.
Example valid values include "video/h264" and "video/h264,audio/aac".
This parameter is optional; the default value is null
(or empty in JSON).
The ID of the Key Management Service (KMS) key that you want Kinesis Video Streams to use to encrypt stream data.
If no key ID is specified, the default, Kinesis Video-managed key (aws/kinesisvideo
) is used.
For more information, see DescribeKey .
The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream.
The default value is 0, indicating that the stream does not persist data.
When the DataRetentionInHours
value is 0, consumers can still consume the fragments that remain in the service host buffer, which has a retention time limit of 5 minutes and a retention memory limit of 200 MB. Fragments are removed from the buffer when either limit is reached.
A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).
dict
Response Syntax
{
'StreamARN': 'string'
}
Response Structure
(dict) --
StreamARN (string) --
The Amazon Resource Name (ARN) of the stream.
Exceptions
KinesisVideo.Client.exceptions.AccountStreamLimitExceededException
KinesisVideo.Client.exceptions.DeviceStreamLimitExceededException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.InvalidDeviceException
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.TagsPerResourceExceededLimitException
delete_signaling_channel
(**kwargs)¶Deletes a specified signaling channel. DeleteSignalingChannel
is an asynchronous operation. If you don't specify the channel's current version, the most recent version is deleted.
See also: AWS API Documentation
Request Syntax
response = client.delete_signaling_channel(
ChannelARN='string',
CurrentVersion='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the signaling channel that you want to delete.
DescribeSignalingChannel
or ListSignalingChannels
API operations.dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
KinesisVideo.Client.exceptions.VersionMismatchException
KinesisVideo.Client.exceptions.ResourceInUseException
delete_stream
(**kwargs)¶Deletes a Kinesis video stream and the data contained in the stream.
This method marks the stream for deletion, and makes the data in the stream inaccessible immediately.
To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream
API.
This operation requires permission for the KinesisVideo:DeleteStream
action.
See also: AWS API Documentation
Request Syntax
response = client.delete_stream(
StreamARN='string',
CurrentVersion='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the stream that you want to delete.
Optional: The version of the stream that you want to delete.
Specify the version as a safeguard to ensure that your are deleting the correct stream. To get the stream version, use the DescribeStream
API.
If not specified, only the CreationTime
is checked before deleting the stream.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.NotAuthorizedException
KinesisVideo.Client.exceptions.VersionMismatchException
KinesisVideo.Client.exceptions.ResourceInUseException
describe_image_generation_configuration
(**kwargs)¶Gets the ImageGenerationConfiguration
for a given Kinesis video stream.
See also: AWS API Documentation
Request Syntax
response = client.describe_image_generation_configuration(
StreamName='string',
StreamARN='string'
)
StreamName
or the StreamARN
.StreamName
or the StreamARN
.dict
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.
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.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
describe_notification_configuration
(**kwargs)¶Gets the NotificationConfiguration
for a given Kinesis video stream.
See also: AWS API Documentation
Request Syntax
response = client.describe_notification_configuration(
StreamName='string',
StreamARN='string'
)
StreamName
or the StreamARN
.StreamName
or the StreamARN.dict
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.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
describe_signaling_channel
(**kwargs)¶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
response = client.describe_signaling_channel(
ChannelName='string',
ChannelARN='string'
)
dict
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.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
describe_stream
(**kwargs)¶Returns the most current information about the specified stream. You must specify either the StreamName
or the StreamARN
.
See also: AWS API Documentation
Request Syntax
response = client.describe_stream(
StreamName='string',
StreamARN='string'
)
dict
Response Syntax
{
'StreamInfo': {
'DeviceName': 'string',
'StreamName': 'string',
'StreamARN': 'string',
'MediaType': 'string',
'KmsKeyId': 'string',
'Version': 'string',
'Status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING',
'CreationTime': datetime(2015, 1, 1),
'DataRetentionInHours': 123
}
}
Response Structure
(dict) --
StreamInfo (dict) --
An object that describes the stream.
DeviceName (string) --
The name of the device that is associated with the stream.
StreamName (string) --
The name of the stream.
StreamARN (string) --
The Amazon Resource Name (ARN) of the stream.
MediaType (string) --
The MediaType
of the stream.
KmsKeyId (string) --
The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream.
Version (string) --
The version of the stream.
Status (string) --
The status of the stream.
CreationTime (datetime) --
A time stamp that indicates when the stream was created.
DataRetentionInHours (integer) --
How long the stream retains data, in hours.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.NotAuthorizedException
get_data_endpoint
(**kwargs)¶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
response = 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'
)
StreamARN
in the request.StreamName
in the request.[REQUIRED]
The name of the API action for which to get an endpoint.
dict
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.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.NotAuthorizedException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_signaling_channel_endpoint
(**kwargs)¶Provides an endpoint for the specified signaling channel to send and receive messages. This API uses the SingleMasterChannelEndpointConfiguration
input parameter, which consists of the Protocols
and Role
properties.
Protocols
is used to determine the communication mechanism. For example, if you specifyWSS
as the protocol, this API produces a secure websocket endpoint. If you specifyHTTPS
as the protocol, this API generates an HTTPS endpoint.
Role
determines the messaging permissions. AMASTER
role results in this API generating an endpoint that a client can use to communicate with any of the viewers on the channel. AVIEWER
role results in this API generating an endpoint that a client can use to communicate only with aMASTER
.
See also: AWS API Documentation
Request Syntax
response = client.get_signaling_channel_endpoint(
ChannelARN='string',
SingleMasterChannelEndpointConfiguration={
'Protocols': [
'WSS'|'HTTPS',
],
'Role': 'MASTER'|'VIEWER'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the signalling channel for which you want to get an endpoint.
A structure containing the endpoint configuration for the SINGLE_MASTER
channel type.
This property is used to determine the nature of communication over this SINGLE_MASTER
signaling channel. If WSS
is specified, this API returns a websocket endpoint. If HTTPS
is specified, this API returns an HTTPS
endpoint.
This property is used to determine messaging permissions in this SINGLE_MASTER
signaling channel. If MASTER
is specified, this API returns an endpoint that a client can use to receive offers from and send answers to any of the viewers on this signaling channel. If VIEWER
is specified, this API returns an endpoint that a client can use only to send offers to another MASTER
client on this signaling channel.
dict
Response Syntax
{
'ResourceEndpointList': [
{
'Protocol': 'WSS'|'HTTPS',
'ResourceEndpoint': 'string'
},
]
}
Response Structure
(dict) --
ResourceEndpointList (list) --
A list of endpoints for the specified signaling channel.
(dict) --
An object that describes the endpoint of the signaling channel returned by the GetSignalingChannelEndpoint
API.
Protocol (string) --
The protocol of the signaling channel returned by the GetSignalingChannelEndpoint
API.
ResourceEndpoint (string) --
The endpoint of the signaling channel returned by the GetSignalingChannelEndpoint
API.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.AccessDeniedException
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_signaling_channels
(**kwargs)¶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
response = client.list_signaling_channels(
MaxResults=123,
NextToken='string',
ChannelNameCondition={
'ComparisonOperator': 'BEGINS_WITH',
'ComparisonValue': 'string'
}
)
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.Optional: Returns only the channels that satisfy a specific condition.
A comparison operator. Currently, you can only specify the BEGINS_WITH
operator, which finds signaling channels whose names begin with a given prefix.
A value to compare.
dict
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.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.AccessDeniedException
list_streams
(**kwargs)¶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
.
See also: AWS API Documentation
Request Syntax
response = client.list_streams(
MaxResults=123,
NextToken='string',
StreamNameCondition={
'ComparisonOperator': 'BEGINS_WITH',
'ComparisonValue': 'string'
}
)
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.Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition.
A comparison operator. Currently, you can specify only the BEGINS_WITH
operator, which finds streams whose names start with a given prefix.
A value to compare.
dict
Response Syntax
{
'StreamInfoList': [
{
'DeviceName': 'string',
'StreamName': 'string',
'StreamARN': 'string',
'MediaType': 'string',
'KmsKeyId': 'string',
'Version': 'string',
'Status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING',
'CreationTime': datetime(2015, 1, 1),
'DataRetentionInHours': 123
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
StreamInfoList (list) --
An array of StreamInfo
objects.
(dict) --
An object describing a Kinesis video stream.
DeviceName (string) --
The name of the device that is associated with the stream.
StreamName (string) --
The name of the stream.
StreamARN (string) --
The Amazon Resource Name (ARN) of the stream.
MediaType (string) --
The MediaType
of the stream.
KmsKeyId (string) --
The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream.
Version (string) --
The version of the stream.
Status (string) --
The status of the stream.
CreationTime (datetime) --
A time stamp that indicates when the stream was created.
DataRetentionInHours (integer) --
How long the stream retains data, in hours.
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.
Exceptions
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.InvalidArgumentException
Returns a list of tags associated with the specified signaling channel.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
NextToken='string',
ResourceARN='string'
)
ListTagsForResource
call is truncated, the response includes a token that you can use in the next request to fetch the next batch of tags.[REQUIRED]
The Amazon Resource Name (ARN) of the signaling channel for which you want to list tags.
dict
Response Syntax
{
'NextToken': 'string',
'Tags': {
'string': 'string'
}
}
Response Structure
(dict) --
NextToken (string) --
If you specify this parameter and the result of a ListTagsForResource
call is truncated, the response includes a token that you can use in the next request to fetch the next set of tags.
Tags (dict) --
A map of tag keys and values associated with the specified signaling channel.
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
Returns a list of tags associated with the specified stream.
In the request, you must specify either the StreamName
or the StreamARN
.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_stream(
NextToken='string',
StreamARN='string',
StreamName='string'
)
ListTagsForStream
call is truncated, the response includes a token that you can use in the next request to fetch the next batch of tags.dict
Response Syntax
{
'NextToken': 'string',
'Tags': {
'string': 'string'
}
}
Response Structure
(dict) --
NextToken (string) --
If you specify this parameter and the result of a ListTags
call is truncated, the response includes a token that you can use in the next request to fetch the next set of tags.
Tags (dict) --
A map of tag keys and values associated with the specified stream.
Exceptions
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.NotAuthorizedException
KinesisVideo.Client.exceptions.InvalidResourceFormatException
tag_resource
(**kwargs)¶Adds one or more tags to a signaling channel. A tag is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the Billing and Cost Management and Cost Management User Guide .
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceARN='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the signaling channel to which you want to add tags.
[REQUIRED]
A list of tags to associate with the specified signaling channel. Each tag is a key-value pair.
A key and value pair that is associated with the specified signaling channel.
The key of the tag that is associated with the specified signaling channel.
The value of the tag that is associated with the specified signaling channel.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
KinesisVideo.Client.exceptions.TagsPerResourceExceededLimitException
tag_stream
(**kwargs)¶Adds one or more tags to a stream. A tag is a key-value pair (the value is optional) that you can define and assign to Amazon Web Services resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the Billing and Cost Management and Cost Management User Guide .
You must provide either the StreamName
or the StreamARN
.
This operation requires permission for the KinesisVideo:TagStream
action.
A Kinesis video stream can support up to 50 tags.
See also: AWS API Documentation
Request Syntax
response = client.tag_stream(
StreamARN='string',
StreamName='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.NotAuthorizedException
KinesisVideo.Client.exceptions.InvalidResourceFormatException
KinesisVideo.Client.exceptions.TagsPerResourceExceededLimitException
untag_resource
(**kwargs)¶Removes one or more tags from a signaling channel. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceARN='string',
TagKeyList=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the signaling channel from which you want to remove tags.
[REQUIRED]
A list of the keys of the tags that you want to remove.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
untag_stream
(**kwargs)¶Removes one or more tags from a stream. In the request, specify only a tag key or keys; don't specify the value. If you specify a tag key that does not exist, it's ignored.
In the request, you must provide the StreamName
or StreamARN
.
See also: AWS API Documentation
Request Syntax
response = client.untag_stream(
StreamARN='string',
StreamName='string',
TagKeyList=[
'string',
]
)
[REQUIRED]
A list of the keys of the tags that you want to remove.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.NotAuthorizedException
KinesisVideo.Client.exceptions.InvalidResourceFormatException
update_data_retention
(**kwargs)¶Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the Operation
parameter in the request body. In the request, you must specify either the StreamName
or the StreamARN
.
Note
The retention period that you specify replaces the current value.
This operation requires permission for the KinesisVideo:UpdateDataRetention
action.
Changing the data retention period affects the data in the stream as follows:
See also: AWS API Documentation
Request Syntax
response = client.update_data_retention(
StreamName='string',
StreamARN='string',
CurrentVersion='string',
Operation='INCREASE_DATA_RETENTION'|'DECREASE_DATA_RETENTION',
DataRetentionChangeInHours=123
)
[REQUIRED]
The version of the stream whose retention period you want to change. To get the version, call either the DescribeStream
or the ListStreams
API.
[REQUIRED]
Indicates whether you want to increase or decrease the retention period.
[REQUIRED]
The retention period, in hours. The value you specify replaces the current value. The maximum value for this parameter is 87600 (ten years).
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.NotAuthorizedException
KinesisVideo.Client.exceptions.VersionMismatchException
update_image_generation_configuration
(**kwargs)¶Updates the StreamInfo
and ImageProcessingConfiguration
fields.
See also: AWS API Documentation
Request Syntax
response = 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
}
)
StreamName
or the StreamARN
.StreamName
or the StreamARN
.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.
Indicates whether the ContinuousImageGenerationConfigurations
API is enabled or disabled.
The origin of the Server or Producer timestamps to use to generate the images.
The structure that contains the information required to deliver images to a customer.
The Uniform Resource Idenifier (URI) that identifies where the images will be delivered.
The AWS Region of the S3 bucket where images will be delivered. This DestinationRegion
must match the Region where the stream is located.
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.
The accepted image format.
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.
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.
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.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.NoDataRetentionException
update_notification_configuration
(**kwargs)¶Updates the notification information for a stream.
See also: AWS API Documentation
Request Syntax
response = client.update_notification_configuration(
StreamName='string',
StreamARN='string',
NotificationConfiguration={
'Status': 'ENABLED'|'DISABLED',
'DestinationConfig': {
'Uri': 'string'
}
}
)
StreamName
or the StreamARN
.StreamName
or the StreamARN
.The structure containing the information required for notifications. If the structure is null, the configuration will be deleted from the stream.
Indicates if a notification configuration is enabled or disabled.
The destination information required to deliver a notification to a customer.
The Uniform Resource Idenifier (URI) that identifies where the images will be delivered.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.AccessDeniedException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.NoDataRetentionException
update_signaling_channel
(**kwargs)¶Updates the existing signaling channel. This is an asynchronous operation and takes time to complete.
If the MessageTtlSeconds
value is updated (either increased or reduced), it only applies to new messages sent via this channel after it's been updated. Existing messages are still expired as per the previous MessageTtlSeconds
value.
See also: AWS API Documentation
Request Syntax
response = client.update_signaling_channel(
ChannelARN='string',
CurrentVersion='string',
SingleMasterConfiguration={
'MessageTtlSeconds': 123
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the signaling channel that you want to update.
[REQUIRED]
The current version of the signaling channel that you want to update.
The structure containing the configuration for the SINGLE_MASTER
type of the signaling channel that you want to update.
The period of time a signaling channel retains undelivered messages before they are discarded.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.AccessDeniedException
KinesisVideo.Client.exceptions.VersionMismatchException
update_stream
(**kwargs)¶Updates stream metadata, such as the device name and media type.
You must provide the stream name or the Amazon Resource Name (ARN) of the stream.
To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream
API.
UpdateStream
is an asynchronous operation, and takes time to complete.
See also: AWS API Documentation
Request Syntax
response = client.update_stream(
StreamName='string',
StreamARN='string',
CurrentVersion='string',
DeviceName='string',
MediaType='string'
)
The name of the stream whose metadata you want to update.
The stream name is an identifier for the stream, and must be unique for each account and region.
[REQUIRED]
The version of the stream whose metadata you want to update.
The name of the device that is writing to the stream.
Note
In the current implementation, Kinesis Video Streams does not use this name.
The stream's media type. Use MediaType
to specify the type of content that the stream contains to the consumers of the stream. For more information about media types, see Media Types . If you choose to specify the MediaType
, see Naming Requirements .
To play video on the console, you must specify the correct video type. For example, if the video in the stream is H.264, specify video/h264
as the MediaType
.
dict
Response Syntax
{}
Response Structure
Exceptions
KinesisVideo.Client.exceptions.ClientLimitExceededException
KinesisVideo.Client.exceptions.InvalidArgumentException
KinesisVideo.Client.exceptions.ResourceNotFoundException
KinesisVideo.Client.exceptions.ResourceInUseException
KinesisVideo.Client.exceptions.NotAuthorizedException
KinesisVideo.Client.exceptions.VersionMismatchException
The available paginators are:
KinesisVideo.Paginator.
ListSignalingChannels
¶paginator = client.get_paginator('list_signaling_channels')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from KinesisVideo.Client.list_signaling_channels()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ChannelNameCondition={
'ComparisonOperator': 'BEGINS_WITH',
'ComparisonValue': 'string'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Optional: Returns only the channels that satisfy a specific condition.
A comparison operator. Currently, you can only specify the BEGINS_WITH
operator, which finds signaling channels whose names begin with a given prefix.
A value to compare.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
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'
},
],
}
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.
KinesisVideo.Paginator.
ListStreams
¶paginator = client.get_paginator('list_streams')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from KinesisVideo.Client.list_streams()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
StreamNameCondition={
'ComparisonOperator': 'BEGINS_WITH',
'ComparisonValue': 'string'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Optional: Returns only streams that satisfy a specific condition. Currently, you can specify only the prefix of a stream name as a condition.
A comparison operator. Currently, you can specify only the BEGINS_WITH
operator, which finds streams whose names start with a given prefix.
A value to compare.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'StreamInfoList': [
{
'DeviceName': 'string',
'StreamName': 'string',
'StreamARN': 'string',
'MediaType': 'string',
'KmsKeyId': 'string',
'Version': 'string',
'Status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING',
'CreationTime': datetime(2015, 1, 1),
'DataRetentionInHours': 123
},
],
}
Response Structure
(dict) --
StreamInfoList (list) --
An array of StreamInfo
objects.
(dict) --
An object describing a Kinesis video stream.
DeviceName (string) --
The name of the device that is associated with the stream.
StreamName (string) --
The name of the stream.
StreamARN (string) --
The Amazon Resource Name (ARN) of the stream.
MediaType (string) --
The MediaType
of the stream.
KmsKeyId (string) --
The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream.
Version (string) --
The version of the stream.
Status (string) --
The status of the stream.
CreationTime (datetime) --
A time stamp that indicates when the stream was created.
DataRetentionInHours (integer) --
How long the stream retains data, in hours.