Table of Contents
A low-level client representing Amazon Interactive Video Service (IVS)
Introduction
The Amazon Interactive Video Service (IVS) API is REST compatible, using a standard HTTP API and an Amazon Web Services EventBridge event stream for responses. JSON is used for both requests and responses, including errors.
The API is an Amazon Web Services regional service. For a list of supported regions and Amazon IVS HTTPS service endpoints, see the Amazon IVS page in the Amazon Web Services General Reference .
- All API request parameters and URLs are case sensitive. *
For a summary of notable documentation changes in each release, see Document History .
Allowed Header Values
Resources
The following resources contain information about your IVS live stream (see Getting Started with Amazon IVS ):
Tagging
A tag is a metadata label that you assign to an Amazon Web Services resource. A tag comprises a key and a value , both set by you. For example, you might set a tag as topic:nature to label a particular video category. See Tagging Amazon Web Services Resources for more information, including restrictions that apply to tags.
Tags can help you identify and organize your Amazon Web Services resources. For example, you can use the same tag for different resources to indicate that they are related. You can also use tags to manage access (see Access Tags ).
The Amazon IVS API has these tag-related endpoints: TagResource , UntagResource , and ListTagsForResource . The following resources support tagging: Channels, Stream Keys, Playback Key Pairs, and Recording Configurations.
At most 50 tags can be applied to a resource.
Authentication versus Authorization
Note the differences between these concepts:
Authentication
All Amazon IVS API requests must be authenticated with a signature. The Amazon Web Services Command-Line Interface (CLI) and Amazon IVS Player SDKs take care of signing the underlying API calls for you. However, if your application calls the Amazon IVS API directly, it’s your responsibility to sign the requests.
You generate a signature using valid Amazon Web Services credentials that have permission to perform the requested action. For example, you must sign PutMetadata requests with a signature generated from an IAM user account that has the ivs:PutMetadata permission.
For more information:
Channel Endpoints
StreamKey Endpoints
Stream Endpoints
PlaybackKeyPair Endpoints
For more information, see Setting Up Private Channels in the Amazon IVS User Guide .
RecordingConfiguration Endpoints
Amazon Web Services Tags Endpoints
import boto3
client = boto3.client('ivs')
These are the available methods:
Performs GetChannel on multiple ARNs simultaneously.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_channel(
arns=[
'string',
]
)
[REQUIRED]
Array of ARNs, one per channel.
{
'channels': [
{
'arn': 'string',
'authorized': True|False,
'ingestEndpoint': 'string',
'latencyMode': 'NORMAL'|'LOW',
'name': 'string',
'playbackUrl': 'string',
'recordingConfigurationArn': 'string',
'tags': {
'string': 'string'
},
'type': 'BASIC'|'STANDARD'
},
],
'errors': [
{
'arn': 'string',
'code': 'string',
'message': 'string'
},
]
}
Response Structure
Object specifying a channel.
Channel ARN.
Whether the channel is private (enabled for playback authorization). Default: false .
Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW . (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)
Channel name.
Channel playback URL.
Recording-configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (empty string, recording is disabled).
Array of 1-50 maps, each of the form string:string (key:value) .
Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD . Valid values:
Each error object is related to a specific ARN in the request.
Error related to a specific channel, specified by its ARN.
Channel ARN.
Error code.
Error message, determined by the application.
Performs GetStreamKey on multiple ARNs simultaneously.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_stream_key(
arns=[
'string',
]
)
[REQUIRED]
Array of ARNs, one per channel.
{
'errors': [
{
'arn': 'string',
'code': 'string',
'message': 'string'
},
],
'streamKeys': [
{
'arn': 'string',
'channelArn': 'string',
'tags': {
'string': 'string'
},
'value': 'string'
},
]
}
Response Structure
Error related to a specific channel, specified by its ARN.
Channel ARN.
Error code.
Error message, determined by the application.
Object specifying a stream key.
Stream-key ARN.
Channel ARN for the stream.
Array of 1-50 maps, each of the form string:string (key:value) .
Stream-key value.
Check if an operation can be paginated.
Creates a new channel and an associated stream key to start streaming.
See also: AWS API Documentation
Request Syntax
response = client.create_channel(
authorized=True|False,
latencyMode='NORMAL'|'LOW',
name='string',
recordingConfigurationArn='string',
tags={
'string': 'string'
},
type='BASIC'|'STANDARD'
)
Array of 1-50 maps, each of the form string:string (key:value) .
Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD . Valid values:
dict
Response Syntax
{
'channel': {
'arn': 'string',
'authorized': True|False,
'ingestEndpoint': 'string',
'latencyMode': 'NORMAL'|'LOW',
'name': 'string',
'playbackUrl': 'string',
'recordingConfigurationArn': 'string',
'tags': {
'string': 'string'
},
'type': 'BASIC'|'STANDARD'
},
'streamKey': {
'arn': 'string',
'channelArn': 'string',
'tags': {
'string': 'string'
},
'value': 'string'
}
}
Response Structure
(dict) --
channel (dict) --
arn (string) --
Channel ARN.
authorized (boolean) --
Whether the channel is private (enabled for playback authorization). Default: false .
ingestEndpoint (string) --
Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
latencyMode (string) --
Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW . (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)
name (string) --
Channel name.
playbackUrl (string) --
Channel playback URL.
recordingConfigurationArn (string) --
Recording-configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (empty string, recording is disabled).
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
type (string) --
Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD . Valid values:
streamKey (dict) --
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) .
value (string) --
Stream-key value.
Exceptions
Creates a new recording configuration, used to enable recording to Amazon S3.
Known issue: In the us-east-1 region, if you use the Amazon Web Services CLI to create a recording configuration, it returns success even if the S3 bucket is in a different region. In this case, the state of the recording configuration is CREATE_FAILED (instead of ACTIVE ). (In other regions, the CLI correctly returns failure if the bucket is in a different region.)
Workaround: Ensure that your S3 bucket is in the same region as the recording configuration. If you create a recording configuration in a different region as your S3 bucket, delete that recording configuration and create a new one with an S3 bucket from the correct region.
See also: AWS API Documentation
Request Syntax
response = client.create_recording_configuration(
destinationConfiguration={
's3': {
'bucketName': 'string'
}
},
name='string',
tags={
'string': 'string'
},
thumbnailConfiguration={
'recordingMode': 'DISABLED'|'INTERVAL',
'targetIntervalSeconds': 123
}
)
[REQUIRED]
A complex type that contains a destination configuration for where recorded video will be stored.
An S3 destination configuration where recorded videos will be stored.
Location (S3 bucket name) where recorded videos will be stored.
Array of 1-50 maps, each of the form string:string (key:value) .
A complex type that allows you to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.
Thumbnail recording mode. Default: INTERVAL .
The targeted thumbnail-generation interval in seconds. This is configurable (and required) only if recordingMode is INTERVAL . Default: 60.
Important: Setting a value for targetIntervalSeconds does not guarantee that thumbnails are generated at the specified interval. For thumbnails to be generated at the targetIntervalSeconds interval, the IDR/Keyframe value for the input video must be less than the targetIntervalSeconds value. See Amazon IVS Streaming Configuration for information on setting IDR/Keyframe to the recommended value in video-encoder settings.
dict
Response Syntax
{
'recordingConfiguration': {
'arn': 'string',
'destinationConfiguration': {
's3': {
'bucketName': 'string'
}
},
'name': 'string',
'state': 'CREATING'|'CREATE_FAILED'|'ACTIVE',
'tags': {
'string': 'string'
},
'thumbnailConfiguration': {
'recordingMode': 'DISABLED'|'INTERVAL',
'targetIntervalSeconds': 123
}
}
}
Response Structure
(dict) --
recordingConfiguration (dict) --
arn (string) --
Recording-configuration ARN.
destinationConfiguration (dict) --
A complex type that contains information about where recorded video will be stored.
s3 (dict) --
An S3 destination configuration where recorded videos will be stored.
bucketName (string) --
Location (S3 bucket name) where recorded videos will be stored.
name (string) --
Recording-configuration name. The value does not need to be unique.
state (string) --
Indicates the current state of the recording configuration. When the state is ACTIVE , the configuration is ready for recording a channel stream.
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
thumbnailConfiguration (dict) --
A complex type that allows you to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.
recordingMode (string) --
Thumbnail recording mode. Default: INTERVAL .
targetIntervalSeconds (integer) --
The targeted thumbnail-generation interval in seconds. This is configurable (and required) only if recordingMode is INTERVAL . Default: 60.
Important: Setting a value for targetIntervalSeconds does not guarantee that thumbnails are generated at the specified interval. For thumbnails to be generated at the targetIntervalSeconds interval, the IDR/Keyframe value for the input video must be less than the targetIntervalSeconds value. See Amazon IVS Streaming Configuration for information on setting IDR/Keyframe to the recommended value in video-encoder settings.
Exceptions
Creates a stream key, used to initiate a stream, for the 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
response = client.create_stream_key(
channelArn='string',
tags={
'string': 'string'
}
)
[REQUIRED]
ARN of the channel for which to create the stream key.
Array of 1-50 maps, each of the form string:string (key:value) .
dict
Response Syntax
{
'streamKey': {
'arn': 'string',
'channelArn': 'string',
'tags': {
'string': 'string'
},
'value': 'string'
}
}
Response Structure
(dict) --
streamKey (dict) --
Stream key used to authenticate an RTMPS stream for ingestion.
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) .
value (string) --
Stream-key value.
Exceptions
Deletes the specified channel and its associated stream keys.
If you try to delete a live channel, you will get an error (409 ConflictException). To delete a channel that is live, call StopStream , wait for the Amazon EventBridge "Stream End" event (to verify that the stream's state was changed from Live to Offline), then call DeleteChannel. (See Using EventBridge with Amazon IVS .)
See also: AWS API Documentation
Request Syntax
response = client.delete_channel(
arn='string'
)
[REQUIRED]
ARN of the channel to be deleted.
Exceptions
Deletes a specified authorization key pair. This invalidates future viewer tokens generated using the key pair’s privateKey . For more information, see Setting Up Private Channels in the Amazon IVS User Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_playback_key_pair(
arn='string'
)
[REQUIRED]
ARN of the key pair to be deleted.
{}
Response Structure
Exceptions
Deletes the recording configuration for the specified ARN.
If you try to delete a recording configuration that is associated with a channel, you will get an error (409 ConflictException). To avoid this, for all channels that reference the recording configuration, first use UpdateChannel to set the recordingConfigurationArn field to an empty string, then use DeleteRecordingConfiguration.
See also: AWS API Documentation
Request Syntax
response = client.delete_recording_configuration(
arn='string'
)
[REQUIRED]
ARN of the recording configuration to be deleted.
Exceptions
Deletes the stream key for the specified ARN, so it can no longer be used to stream.
See also: AWS API Documentation
Request Syntax
response = client.delete_stream_key(
arn='string'
)
[REQUIRED]
ARN of the stream key to be deleted.
Exceptions
Gets the channel configuration for the specified channel ARN. See also BatchGetChannel .
See also: AWS API Documentation
Request Syntax
response = client.get_channel(
arn='string'
)
[REQUIRED]
ARN of the channel for which the configuration is to be retrieved.
{
'channel': {
'arn': 'string',
'authorized': True|False,
'ingestEndpoint': 'string',
'latencyMode': 'NORMAL'|'LOW',
'name': 'string',
'playbackUrl': 'string',
'recordingConfigurationArn': 'string',
'tags': {
'string': 'string'
},
'type': 'BASIC'|'STANDARD'
}
}
Response Structure
Channel ARN.
Whether the channel is private (enabled for playback authorization). Default: false .
Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW . (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)
Channel name.
Channel playback URL.
Recording-configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (empty string, recording is disabled).
Array of 1-50 maps, each of the form string:string (key:value) .
Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD . Valid values:
Exceptions
Create a paginator for an operation.
Gets a specified playback authorization key pair and returns the arn and fingerprint . The privateKey held by the caller can be used to generate viewer authorization tokens, to grant viewers access to private channels. For more information, see Setting Up Private Channels in the Amazon IVS User Guide .
See also: AWS API Documentation
Request Syntax
response = client.get_playback_key_pair(
arn='string'
)
[REQUIRED]
ARN of the key pair to be returned.
{
'keyPair': {
'arn': 'string',
'fingerprint': 'string',
'name': 'string',
'tags': {
'string': 'string'
}
}
}
Response Structure
Key-pair ARN.
Key-pair identifier.
Playback-key-pair name. The value does not need to be unique.
Array of 1-50 maps, each of the form string:string (key:value) .
Exceptions
Gets the recording configuration for the specified ARN.
See also: AWS API Documentation
Request Syntax
response = client.get_recording_configuration(
arn='string'
)
[REQUIRED]
ARN of the recording configuration to be retrieved.
{
'recordingConfiguration': {
'arn': 'string',
'destinationConfiguration': {
's3': {
'bucketName': 'string'
}
},
'name': 'string',
'state': 'CREATING'|'CREATE_FAILED'|'ACTIVE',
'tags': {
'string': 'string'
},
'thumbnailConfiguration': {
'recordingMode': 'DISABLED'|'INTERVAL',
'targetIntervalSeconds': 123
}
}
}
Response Structure
Recording-configuration ARN.
A complex type that contains information about where recorded video will be stored.
An S3 destination configuration where recorded videos will be stored.
Location (S3 bucket name) where recorded videos will be stored.
Recording-configuration name. The value does not need to be unique.
Indicates the current state of the recording configuration. When the state is ACTIVE , the configuration is ready for recording a channel stream.
Array of 1-50 maps, each of the form string:string (key:value) .
A complex type that allows you to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.
Thumbnail recording mode. Default: INTERVAL .
The targeted thumbnail-generation interval in seconds. This is configurable (and required) only if recordingMode is INTERVAL . Default: 60.
Important: Setting a value for targetIntervalSeconds does not guarantee that thumbnails are generated at the specified interval. For thumbnails to be generated at the targetIntervalSeconds interval, the IDR/Keyframe value for the input video must be less than the targetIntervalSeconds value. See Amazon IVS Streaming Configuration for information on setting IDR/Keyframe to the recommended value in video-encoder settings.
Exceptions
Gets information about the active (live) stream on a specified channel.
See also: AWS API Documentation
Request Syntax
response = client.get_stream(
channelArn='string'
)
[REQUIRED]
Channel ARN for stream to be accessed.
{
'stream': {
'channelArn': 'string',
'health': 'HEALTHY'|'STARVING'|'UNKNOWN',
'playbackUrl': 'string',
'startTime': datetime(2015, 1, 1),
'state': 'LIVE'|'OFFLINE',
'streamId': 'string',
'viewerCount': 123
}
}
Response Structure
Channel ARN for the stream.
The stream’s health.
URL of the master playlist, required by the video player to play the HLS stream.
Time of the stream’s start. This is an ISO 8601 timestamp returned as a string.
The stream’s state.
Unique identifier for a live or previously live stream in the specified channel.
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.
Exceptions
Gets stream-key information for a specified ARN.
See also: AWS API Documentation
Request Syntax
response = client.get_stream_key(
arn='string'
)
[REQUIRED]
ARN for the stream key to be retrieved.
{
'streamKey': {
'arn': 'string',
'channelArn': 'string',
'tags': {
'string': 'string'
},
'value': 'string'
}
}
Response Structure
Stream-key ARN.
Channel ARN for the stream.
Array of 1-50 maps, each of the form string:string (key:value) .
Stream-key value.
Exceptions
Gets metadata on a specified stream.
See also: AWS API Documentation
Request Syntax
response = client.get_stream_session(
channelArn='string',
streamId='string'
)
[REQUIRED]
ARN of the channel resource
dict
Response Syntax
{
'streamSession': {
'channel': {
'arn': 'string',
'authorized': True|False,
'ingestEndpoint': 'string',
'latencyMode': 'NORMAL'|'LOW',
'name': 'string',
'playbackUrl': 'string',
'recordingConfigurationArn': 'string',
'tags': {
'string': 'string'
},
'type': 'BASIC'|'STANDARD'
},
'endTime': datetime(2015, 1, 1),
'ingestConfiguration': {
'audio': {
'channels': 123,
'codec': 'string',
'sampleRate': 123,
'targetBitrate': 123
},
'video': {
'avcLevel': 'string',
'avcProfile': 'string',
'codec': 'string',
'encoder': 'string',
'targetBitrate': 123,
'targetFramerate': 123,
'videoHeight': 123,
'videoWidth': 123
}
},
'recordingConfiguration': {
'arn': 'string',
'destinationConfiguration': {
's3': {
'bucketName': 'string'
}
},
'name': 'string',
'state': 'CREATING'|'CREATE_FAILED'|'ACTIVE',
'tags': {
'string': 'string'
},
'thumbnailConfiguration': {
'recordingMode': 'DISABLED'|'INTERVAL',
'targetIntervalSeconds': 123
}
},
'startTime': datetime(2015, 1, 1),
'streamId': 'string',
'truncatedEvents': [
{
'eventTime': datetime(2015, 1, 1),
'name': 'string',
'type': 'string'
},
]
}
}
Response Structure
(dict) --
streamSession (dict) --
List of stream details.
channel (dict) --
The properties of the channel at the time of going live.
arn (string) --
Channel ARN.
authorized (boolean) --
Whether the channel is private (enabled for playback authorization). Default: false .
ingestEndpoint (string) --
Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
latencyMode (string) --
Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW . (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)
name (string) --
Channel name.
playbackUrl (string) --
Channel playback URL.
recordingConfigurationArn (string) --
Recording-configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (empty string, recording is disabled).
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
type (string) --
Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD . Valid values:
endTime (datetime) --
UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is NULL .
ingestConfiguration (dict) --
The properties of the incoming RTMP stream for the stream.
audio (dict) --
Encoder settings for audio.
channels (integer) --
Number of audio channels.
codec (string) --
Codec used for the audio encoding.
sampleRate (integer) --
Number of audio samples recorded per second.
targetBitrate (integer) --
The expected ingest bitrate (bits per second). This is configured in the encoder.
video (dict) --
Encoder settings for video.
avcLevel (string) --
Indicates the degree of required decoder performance for a profile. Normally this is set automatically by the encoder. For details, see the H.264 specification.
avcProfile (string) --
Indicates to the decoder the requirements for decoding the stream. For definitions of the valid values, see the H.264 specification.
codec (string) --
Codec used for the video encoding.
encoder (string) --
Software or hardware used to encode the video.
targetBitrate (integer) --
The expected ingest bitrate (bits per second). This is configured in the encoder.
targetFramerate (integer) --
The expected ingest framerate. This is configured in the encoder.
videoHeight (integer) --
Video-resolution height in pixels.
videoWidth (integer) --
Video-resolution width in pixels.
recordingConfiguration (dict) --
The properties of recording the live stream.
arn (string) --
Recording-configuration ARN.
destinationConfiguration (dict) --
A complex type that contains information about where recorded video will be stored.
s3 (dict) --
An S3 destination configuration where recorded videos will be stored.
bucketName (string) --
Location (S3 bucket name) where recorded videos will be stored.
name (string) --
Recording-configuration name. The value does not need to be unique.
state (string) --
Indicates the current state of the recording configuration. When the state is ACTIVE , the configuration is ready for recording a channel stream.
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
thumbnailConfiguration (dict) --
A complex type that allows you to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.
recordingMode (string) --
Thumbnail recording mode. Default: INTERVAL .
targetIntervalSeconds (integer) --
The targeted thumbnail-generation interval in seconds. This is configurable (and required) only if recordingMode is INTERVAL . Default: 60.
Important: Setting a value for targetIntervalSeconds does not guarantee that thumbnails are generated at the specified interval. For thumbnails to be generated at the targetIntervalSeconds interval, the IDR/Keyframe value for the input video must be less than the targetIntervalSeconds value. See Amazon IVS Streaming Configuration for information on setting IDR/Keyframe to the recommended value in video-encoder settings.
startTime (datetime) --
UTC ISO-8601 formatted timestamp of when the channel went live.
streamId (string) --
Unique identifier for a live or previously live stream in the specified channel.
truncatedEvents (list) --
List of Amazon IVS events that the stream encountered. The list is sorted by most recent events and contains up to 500 events. For Amazon IVS events, see Using Amazon EventBridge with Amazon IVS .
(dict) --
Object specifying a stream’s events. For a list of events, see Using Amazon EventBridge with Amazon IVS .
eventTime (datetime) --
UTC ISO-8601 formatted timestamp of when the event occurred.
name (string) --
Name that identifies the stream event within a type .
type (string) --
Logical group for certain events.
Exceptions
Returns an object that can wait for some condition.
Imports the public portion of a new key pair and returns its arn and fingerprint . The privateKey can then be used to generate viewer authorization tokens, to grant viewers access to private channels. For more information, see Setting Up Private Channels in the Amazon IVS User Guide .
See also: AWS API Documentation
Request Syntax
response = client.import_playback_key_pair(
name='string',
publicKeyMaterial='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The public portion of a customer-generated key pair.
Any tags provided with the request are added to the playback key pair tags.
dict
Response Syntax
{
'keyPair': {
'arn': 'string',
'fingerprint': 'string',
'name': 'string',
'tags': {
'string': 'string'
}
}
}
Response Structure
(dict) --
keyPair (dict) --
arn (string) --
Key-pair ARN.
fingerprint (string) --
Key-pair identifier.
name (string) --
Playback-key-pair name. The value does not need to be unique.
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
Exceptions
Gets summary information about all channels in your account, in the Amazon Web Services region where the API request is processed. This list can be filtered to match a specified name or recording-configuration ARN. Filters are mutually exclusive and cannot be used together. If you try to use both filters, you will get an error (409 ConflictException).
See also: AWS API Documentation
Request Syntax
response = client.list_channels(
filterByName='string',
filterByRecordingConfigurationArn='string',
maxResults=123,
nextToken='string'
)
dict
Response Syntax
{
'channels': [
{
'arn': 'string',
'authorized': True|False,
'latencyMode': 'NORMAL'|'LOW',
'name': 'string',
'recordingConfigurationArn': 'string',
'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.
authorized (boolean) --
Whether the channel is private (enabled for playback authorization). Default: false .
latencyMode (string) --
Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW . (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)
name (string) --
Channel name.
recordingConfigurationArn (string) --
Recording-configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (empty string, recording is disabled).
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
nextToken (string) --
If there are more channels than maxResults , use nextToken in the request to get the next set.
Exceptions
Gets summary information about playback key pairs. For more information, see Setting Up Private Channels in the Amazon IVS User Guide .
See also: AWS API Documentation
Request Syntax
response = client.list_playback_key_pairs(
maxResults=123,
nextToken='string'
)
dict
Response Syntax
{
'keyPairs': [
{
'arn': 'string',
'name': 'string',
'tags': {
'string': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
keyPairs (list) --
List of key pairs.
(dict) --
Summary information about a playback key pair.
arn (string) --
Key-pair ARN.
name (string) --
Playback-key-pair name. The value does not need to be unique.
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
nextToken (string) --
If there are more key pairs than maxResults , use nextToken in the request to get the next set.
Exceptions
Gets summary information about all recording configurations 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_recording_configurations(
maxResults=123,
nextToken='string'
)
dict
Response Syntax
{
'nextToken': 'string',
'recordingConfigurations': [
{
'arn': 'string',
'destinationConfiguration': {
's3': {
'bucketName': 'string'
}
},
'name': 'string',
'state': 'CREATING'|'CREATE_FAILED'|'ACTIVE',
'tags': {
'string': 'string'
}
},
]
}
Response Structure
(dict) --
nextToken (string) --
If there are more recording configurations than maxResults , use nextToken in the request to get the next set.
recordingConfigurations (list) --
List of the matching recording configurations.
(dict) --
Summary information about a RecordingConfiguration.
arn (string) --
Recording-configuration ARN.
destinationConfiguration (dict) --
A complex type that contains information about where recorded video will be stored.
s3 (dict) --
An S3 destination configuration where recorded videos will be stored.
bucketName (string) --
Location (S3 bucket name) where recorded videos will be stored.
name (string) --
Recording-configuration name. The value does not need to be unique.
state (string) --
Indicates the current state of the recording configuration. When the state is ACTIVE , the configuration is ready for recording a channel stream.
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
Exceptions
Gets summary information about stream keys for the specified channel.
See also: AWS API Documentation
Request Syntax
response = client.list_stream_keys(
channelArn='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
Channel ARN used to filter the list.
dict
Response Syntax
{
'nextToken': 'string',
'streamKeys': [
{
'arn': 'string',
'channelArn': 'string',
'tags': {
'string': 'string'
}
},
]
}
Response Structure
(dict) --
nextToken (string) --
If there are more stream keys than maxResults , use nextToken in the request to get the next set.
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) .
Exceptions
Gets a summary of current and previous streams for a specified channel in your account, in the AWS region where the API request is processed.
See also: AWS API Documentation
Request Syntax
response = client.list_stream_sessions(
channelArn='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
Channel ARN used to filter the list.
dict
Response Syntax
{
'nextToken': 'string',
'streamSessions': [
{
'endTime': datetime(2015, 1, 1),
'hasErrorEvent': True|False,
'startTime': datetime(2015, 1, 1),
'streamId': 'string'
},
]
}
Response Structure
(dict) --
nextToken (string) --
If there are more streams than maxResults , use nextToken in the request to get the next set.
streamSessions (list) --
List of stream sessions.
(dict) --
Summary information about a stream session.
endTime (datetime) --
UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is NULL .
hasErrorEvent (boolean) --
If true , this stream encountered a quota breach or failure.
startTime (datetime) --
UTC ISO-8601 formatted timestamp of when the channel went live.
streamId (string) --
Unique identifier for a live or previously live stream in the specified channel.
Exceptions
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'
},
maxResults=123,
nextToken='string'
)
Filters the stream list to match the specified criterion.
The stream’s health.
dict
Response Syntax
{
'nextToken': 'string',
'streams': [
{
'channelArn': 'string',
'health': 'HEALTHY'|'STARVING'|'UNKNOWN',
'startTime': datetime(2015, 1, 1),
'state': 'LIVE'|'OFFLINE',
'streamId': 'string',
'viewerCount': 123
},
]
}
Response Structure
(dict) --
nextToken (string) --
If there are more streams than maxResults , use nextToken in the request to get the next set.
streams (list) --
List of streams.
(dict) --
Summary information about a stream.
channelArn (string) --
Channel ARN for the stream.
health (string) --
The stream’s health.
startTime (datetime) --
Time of the stream’s start. This is an ISO 8601 timestamp returned as a string.
state (string) --
The stream’s state.
streamId (string) --
Unique identifier for a live or previously live stream in the specified channel.
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.
Exceptions
Gets information about Amazon Web Services tags for the specified ARN.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string'
)
[REQUIRED]
The ARN of the resource to be retrieved.
{
'tags': {
'string': 'string'
}
}
Response Structure
Exceptions
Inserts metadata into the active stream of the specified channel. At most 5 requests per second per channel are allowed, each with a maximum 1 KB payload. (If 5 TPS is not sufficient for your needs, we recommend batching your data into a single PutMetadata call.) At most 155 requests per second per account are allowed. Also see Embedding Metadata within a Video Stream in the Amazon IVS User Guide .
See also: AWS API Documentation
Request Syntax
response = client.put_metadata(
channelArn='string',
metadata='string'
)
[REQUIRED]
ARN of the channel into which metadata is inserted. This channel must have an active stream.
[REQUIRED]
Metadata to insert into the stream. Maximum: 1 KB per request.
None
Exceptions
Disconnects the incoming RTMPS stream for the specified channel. Can be used in conjunction with DeleteStreamKey to prevent further streaming to a channel.
Note
Many streaming client-software libraries automatically reconnect a dropped RTMPS 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
response = client.stop_stream(
channelArn='string'
)
[REQUIRED]
ARN of the channel for which the stream is to be stopped.
{}
Response Structure
Exceptions
Adds or updates tags for the Amazon Web Services resource with the specified ARN.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags={
'string': 'string'
}
)
[REQUIRED]
ARN of the resource for which tags are to be added or updated.
[REQUIRED]
Array of tags to be added or updated.
dict
Response Syntax
{}
Response Structure
Exceptions
Removes tags from the resource with the specified ARN.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
ARN of the resource for which tags are to be removed.
[REQUIRED]
Array of tags to be removed.
dict
Response Syntax
{}
Response Structure
Exceptions
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
response = client.update_channel(
arn='string',
authorized=True|False,
latencyMode='NORMAL'|'LOW',
name='string',
recordingConfigurationArn='string',
type='BASIC'|'STANDARD'
)
[REQUIRED]
ARN of the channel to be updated.
Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately . Valid values:
dict
Response Syntax
{
'channel': {
'arn': 'string',
'authorized': True|False,
'ingestEndpoint': 'string',
'latencyMode': 'NORMAL'|'LOW',
'name': 'string',
'playbackUrl': 'string',
'recordingConfigurationArn': 'string',
'tags': {
'string': 'string'
},
'type': 'BASIC'|'STANDARD'
}
}
Response Structure
(dict) --
channel (dict) --
Object specifying a channel.
arn (string) --
Channel ARN.
authorized (boolean) --
Whether the channel is private (enabled for playback authorization). Default: false .
ingestEndpoint (string) --
Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
latencyMode (string) --
Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW . (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)
name (string) --
Channel name.
playbackUrl (string) --
Channel playback URL.
recordingConfigurationArn (string) --
Recording-configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (empty string, recording is disabled).
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
type (string) --
Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD . Valid values:
Exceptions
The available paginators are:
paginator = client.get_paginator('list_channels')
Creates an iterator that will paginate through responses from IVS.Client.list_channels().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filterByName='string',
filterByRecordingConfigurationArn='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
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
{
'channels': [
{
'arn': 'string',
'authorized': True|False,
'latencyMode': 'NORMAL'|'LOW',
'name': 'string',
'recordingConfigurationArn': 'string',
'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.
authorized (boolean) --
Whether the channel is private (enabled for playback authorization). Default: false .
latencyMode (string) --
Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW . (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)
name (string) --
Channel name.
recordingConfigurationArn (string) --
Recording-configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (empty string, recording is disabled).
tags (dict) --
Array of 1-50 maps, each of the form string:string (key:value) .
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_playback_key_pairs')
Creates an iterator that will paginate through responses from IVS.Client.list_playback_key_pairs().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
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.
{
'keyPairs': [
{
'arn': 'string',
'name': 'string',
'tags': {
'string': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
List of key pairs.
Summary information about a playback key pair.
Key-pair ARN.
Playback-key-pair name. The value does not need to be unique.
Array of 1-50 maps, each of the form string:string (key:value) .
A token to resume pagination.
paginator = client.get_paginator('list_recording_configurations')
Creates an iterator that will paginate through responses from IVS.Client.list_recording_configurations().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
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.
{
'recordingConfigurations': [
{
'arn': 'string',
'destinationConfiguration': {
's3': {
'bucketName': 'string'
}
},
'name': 'string',
'state': 'CREATING'|'CREATE_FAILED'|'ACTIVE',
'tags': {
'string': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
List of the matching recording configurations.
Summary information about a RecordingConfiguration.
Recording-configuration ARN.
A complex type that contains information about where recorded video will be stored.
An S3 destination configuration where recorded videos will be stored.
Location (S3 bucket name) where recorded videos will be stored.
Recording-configuration name. The value does not need to be unique.
Indicates the current state of the recording configuration. When the state is ACTIVE , the configuration is ready for recording a channel stream.
Array of 1-50 maps, each of the form string:string (key:value) .
A token to resume pagination.
paginator = client.get_paginator('list_stream_keys')
Creates an iterator that will paginate through responses from IVS.Client.list_stream_keys().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
channelArn='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
Channel ARN used to filter the list.
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
{
'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) .
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_streams')
Creates an iterator that will paginate through responses from IVS.Client.list_streams().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filterBy={
'health': 'HEALTHY'|'STARVING'|'UNKNOWN'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Filters the stream list to match the specified criterion.
The stream’s health.
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
{
'streams': [
{
'channelArn': 'string',
'health': 'HEALTHY'|'STARVING'|'UNKNOWN',
'startTime': datetime(2015, 1, 1),
'state': 'LIVE'|'OFFLINE',
'streamId': 'string',
'viewerCount': 123
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
streams (list) --
List of streams.
(dict) --
Summary information about a stream.
channelArn (string) --
Channel ARN for the stream.
health (string) --
The stream’s health.
startTime (datetime) --
Time of the stream’s start. This is an ISO 8601 timestamp returned as a string.
state (string) --
The stream’s state.
streamId (string) --
Unique identifier for a live or previously live stream in the specified channel.
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.
NextToken (string) --
A token to resume pagination.