:doc:`SFN <../../stepfunctions>` / Client / tag_resource

************
tag_resource
************



.. py:method:: SFN.Client.tag_resource(**kwargs)

  

  Add a tag to a Step Functions resource.

   

  An array of key-value pairs. For more information, see `Using Cost Allocation Tags <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html>`__ in the *Amazon Web Services Billing and Cost Management User Guide*, and `Controlling Access Using IAM Tags <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html>`__.

   

  Tags may only contain Unicode letters, digits, white space, or these symbols: ``_ . : / = + - @``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/TagResource>`_  


  **Request Syntax**
  ::

    response = client.tag_resource(
        resourceArn='string',
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type resourceArn: string
  :param resourceArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) for the Step Functions state machine or activity.

    

  
  :type tags: list
  :param tags: **[REQUIRED]** 

    The list of tags to add to a resource.

     

    Tags may only contain Unicode letters, digits, white space, or these symbols: ``_ . : / = + - @``.

    

  
    - *(dict) --* 

      Tags are key-value pairs that can be associated with Step Functions state machines and activities.

       

      An array of key-value pairs. For more information, see `Using Cost Allocation Tags <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html>`__ in the *Amazon Web Services Billing and Cost Management User Guide*, and `Controlling Access Using IAM Tags <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html>`__.

       

      Tags may only contain Unicode letters, digits, white space, or these symbols: ``_ . : / = + - @``.

      

    
      - **key** *(string) --* 

        The key of a tag.

        

      
      - **value** *(string) --* 

        The value of a tag.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`SFN.Client.exceptions.InvalidArn`

  
  *   :py:class:`SFN.Client.exceptions.ResourceNotFound`

  
  *   :py:class:`SFN.Client.exceptions.TooManyTags`

  