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

**********
tag_stream
**********



.. py:method:: KinesisVideo.Client.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 <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html>`__ 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 <https://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30/TagStream>`_  


  **Request Syntax**
  ::

    response = client.tag_stream(
        StreamARN='string',
        StreamName='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type StreamARN: string
  :param StreamARN: 

    The Amazon Resource Name (ARN) of the resource that you want to add the tag or tags to.

    

  
  :type StreamName: string
  :param StreamName: 

    The name of the stream that you want to add the tag or tags to.

    

  
  :type Tags: dict
  :param Tags: **[REQUIRED]** 

    A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

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

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

  