:doc:`KinesisVideo <../../kinesisvideo>` / Client / update_stream

*************
update_stream
*************



.. py:method:: KinesisVideo.Client.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 <https://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30/UpdateStream>`_  


  **Request Syntax**
  ::

    response = client.update_stream(
        StreamName='string',
        StreamARN='string',
        CurrentVersion='string',
        DeviceName='string',
        MediaType='string'
    )
    
  :type StreamName: string
  :param StreamName: 

    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.

    

  
  :type StreamARN: string
  :param StreamARN: 

    The ARN of the stream whose metadata you want to update.

    

  
  :type CurrentVersion: string
  :param CurrentVersion: **[REQUIRED]** 

    The version of the stream whose metadata you want to update.

    

  
  :type DeviceName: string
  :param DeviceName: 

    The name of the device that is writing to the stream.

     

    .. note::

      

      In the current implementation, Kinesis Video Streams does not use this name.

      

    

  
  :type MediaType: string
  :param MediaType: 

    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 <http://www.iana.org/assignments/media-types/media-types.xhtml>`__. If you choose to specify the ``MediaType``, see `Naming Requirements <https://tools.ietf.org/html/rfc6838#section-4.2>`__.

     

    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``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`KinesisVideo.Client.exceptions.ClientLimitExceededException`

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

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

  
  *   :py:class:`KinesisVideo.Client.exceptions.ResourceInUseException`

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

  
  *   :py:class:`KinesisVideo.Client.exceptions.VersionMismatchException`

  