:doc:`CodeArtifact <../../codeartifact>` / Client / tag_resource

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



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

  

  Adds or updates tags for a resource in CodeArtifact.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/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) of the resource that you want to add or update tags for.

    

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

    The tags you want to modify or add to the resource.

    

  
    - *(dict) --* 

      A tag is a key-value pair that can be used to manage, search for, or filter resources in CodeArtifact.

      

    
      - **key** *(string) --* **[REQUIRED]** 

        The tag key.

        

      
      - **value** *(string) --* **[REQUIRED]** 

        The tag value.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`CodeArtifact.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`CodeArtifact.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`CodeArtifact.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CodeArtifact.Client.exceptions.ValidationException`

  