:doc:`DocDB <../../docdb>` / Client / add_tags_to_resource

********************
add_tags_to_resource
********************



.. py:method:: DocDB.Client.add_tags_to_resource(**kwargs)

  

  Adds metadata tags to an Amazon DocumentDB resource. You can use these tags with cost allocation reporting to track costs that are associated with Amazon DocumentDB resources or in a ``Condition`` statement in an Identity and Access Management (IAM) policy for Amazon DocumentDB.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/AddTagsToResource>`_  


  **Request Syntax**
  ::

    response = client.add_tags_to_resource(
        ResourceName='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type ResourceName: string
  :param ResourceName: **[REQUIRED]** 

    The Amazon DocumentDB resource that the tags are added to. This value is an Amazon Resource Name .

    

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

    The tags to be assigned to the Amazon DocumentDB resource.

    

  
    - *(dict) --* 

      Metadata assigned to an Amazon DocumentDB resource consisting of a key-value pair.

      

    
      - **Key** *(string) --* 

        The required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with " ``aws:``" or " ``rds:``". The string can contain only the set of Unicode letters, digits, white space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

        

      
      - **Value** *(string) --* 

        The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with " ``aws:``" or " ``rds:``". The string can contain only the set of Unicode letters, digits, white space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

        

      
    

  
  :returns: None
  **Exceptions**
  
  *   :py:class:`DocDB.Client.exceptions.DBInstanceNotFoundFault`

  
  *   :py:class:`DocDB.Client.exceptions.DBSnapshotNotFoundFault`

  
  *   :py:class:`DocDB.Client.exceptions.DBClusterNotFoundFault`

  