KinesisVideoSignalingChannels

Client

class KinesisVideoSignalingChannels.Client

A low-level client representing Amazon Kinesis Video Signaling Channels

Kinesis Video Streams Signaling Service is a intermediate service that establishes a communication channel for discovering peers, transmitting offers and answers in order to establish peer-to-peer connection in webRTC technology.

client = session.create_client('kinesis-video-signaling')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is 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").
Returns
True if the operation can be paginated, False otherwise.
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_ice_server_config(**kwargs)

Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, username, and password which can be used to configure the WebRTC connection. The ICE component uses this configuration information to setup the WebRTC connection, including authenticating with the Traversal Using Relays around NAT (TURN) relay server.

TURN is a protocol that is used to improve the connectivity of peer-to-peer applications. By providing a cloud-based relay service, TURN ensures that a connection can be established even when one or more peers are incapable of a direct peer-to-peer connection. For more information, see A REST API For Access To TURN Services .

You can invoke this API to establish a fallback mechanism in case either of the peers is unable to establish a direct peer-to-peer connection over a signaling channel. You must specify either a signaling channel ARN or the client ID in order to invoke this API.

See also: AWS API Documentation

Request Syntax

response = client.get_ice_server_config(
    ChannelARN='string',
    ClientId='string',
    Service='TURN',
    Username='string'
)
Parameters
  • ChannelARN (string) --

    [REQUIRED]

    The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.

  • ClientId (string) -- Unique identifier for the viewer. Must be unique within the signaling channel.
  • Service (string) -- Specifies the desired service. Currently, TURN is the only valid value.
  • Username (string) -- An optional user ID to be associated with the credentials.
Return type

dict

Returns

Response Syntax

{
    'IceServerList': [
        {
            'Uris': [
                'string',
            ],
            'Username': 'string',
            'Password': 'string',
            'Ttl': 123
        },
    ]
}

Response Structure

  • (dict) --

    • IceServerList (list) --

      The list of ICE server information objects.

      • (dict) --

        A structure for the ICE server connection data.

        • Uris (list) --

          An array of URIs, in the form specified in the I-D.petithuguenin-behave-turn-uris spec. These URIs provide the different addresses and/or protocols that can be used to reach the TURN server.

          • (string) --
        • Username (string) --

          A username to login to the ICE server.

        • Password (string) --

          A password to login to the ICE server.

        • Ttl (integer) --

          The period of time, in seconds, during which the username and password are valid.

Exceptions

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is 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").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
send_alexa_offer_to_master(**kwargs)

This API allows you to connect WebRTC-enabled devices with Alexa display devices. When invoked, it sends the Alexa Session Description Protocol (SDP) offer to the master peer. The offer is delivered as soon as the master is connected to the specified signaling channel. This API returns the SDP answer from the connected master. If the master is not connected to the signaling channel, redelivery requests are made until the message expires.

See also: AWS API Documentation

Request Syntax

response = client.send_alexa_offer_to_master(
    ChannelARN='string',
    SenderClientId='string',
    MessagePayload='string'
)
Parameters
  • ChannelARN (string) --

    [REQUIRED]

    The ARN of the signaling channel by which Alexa and the master peer communicate.

  • SenderClientId (string) --

    [REQUIRED]

    The unique identifier for the sender client.

  • MessagePayload (string) --

    [REQUIRED]

    The base64-encoded SDP offer content.

Return type

dict

Returns

Response Syntax

{
    'Answer': 'string'
}

Response Structure

  • (dict) --

    • Answer (string) --

      The base64-encoded SDP answer content.

Exceptions

Client Exceptions

Client exceptions are available on a client instance via the exceptions property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.

The available client exceptions are:

class KinesisVideoSignalingChannels.Client.exceptions.ClientLimitExceededException

Your request was throttled because you have exceeded the limit of allowed client calls. Try making the call later.

Example

try:
  ...
except client.exceptions.ClientLimitExceededException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'Message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    Your request was throttled because you have exceeded the limit of allowed client calls. Try making the call later.

    • Message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class KinesisVideoSignalingChannels.Client.exceptions.InvalidArgumentException

The value for this input parameter is invalid.

Example

try:
  ...
except client.exceptions.InvalidArgumentException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'Message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The value for this input parameter is invalid.

    • Message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class KinesisVideoSignalingChannels.Client.exceptions.InvalidClientException

The specified client is invalid.

Example

try:
  ...
except client.exceptions.InvalidClientException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The specified client is invalid.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class KinesisVideoSignalingChannels.Client.exceptions.NotAuthorizedException

The caller is not authorized to perform this operation.

Example

try:
  ...
except client.exceptions.NotAuthorizedException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'Message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The caller is not authorized to perform this operation.

    • Message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class KinesisVideoSignalingChannels.Client.exceptions.ResourceNotFoundException

The specified resource is not found.

Example

try:
  ...
except client.exceptions.ResourceNotFoundException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'Message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The specified resource is not found.

    • Message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class KinesisVideoSignalingChannels.Client.exceptions.SessionExpiredException

If the client session is expired. Once the client is connected, the session is valid for 45 minutes. Client should reconnect to the channel to continue sending/receiving messages.

Example

try:
  ...
except client.exceptions.SessionExpiredException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    If the client session is expired. Once the client is connected, the session is valid for 45 minutes. Client should reconnect to the channel to continue sending/receiving messages.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.

Paginators

The available paginators are: