:doc:`KinesisVideoSignalingChannels <../../kinesis-video-signaling>` / Client / get_ice_server_config

*********************
get_ice_server_config
*********************



.. py:method:: KinesisVideoSignalingChannels.Client.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 <https://tools.ietf.org/html/draft-uberti-rtcweb-turn-rest-00>`__.

   

  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 <https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/GetIceServerConfig>`_  


  **Request Syntax**
  ::

    response = client.get_ice_server_config(
        ChannelARN='string',
        ClientId='string',
        Service='TURN',
        Username='string'
    )
    
  :type ChannelARN: string
  :param ChannelARN: **[REQUIRED]** 

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

    

  
  :type ClientId: string
  :param ClientId: 

    Unique identifier for the viewer. Must be unique within the signaling channel.

    

  
  :type Service: string
  :param Service: 

    Specifies the desired service. Currently, ``TURN`` is the only valid value.

    

  
  :type Username: string
  :param Username: 

    An optional user ID to be associated with the credentials.

    

  
  
  :rtype: 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 <https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03>`__ 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**
  
  *   :py:class:`KinesisVideoSignalingChannels.Client.exceptions.InvalidClientException`

  
  *   :py:class:`KinesisVideoSignalingChannels.Client.exceptions.SessionExpiredException`

  
  *   :py:class:`KinesisVideoSignalingChannels.Client.exceptions.ClientLimitExceededException`

  
  *   :py:class:`KinesisVideoSignalingChannels.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`KinesisVideoSignalingChannels.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`KinesisVideoSignalingChannels.Client.exceptions.NotAuthorizedException`

  