:doc:`Glacier <../../glacier>` / Client / add_tags_to_vault

*****************
add_tags_to_vault
*****************



.. py:method:: Glacier.Client.add_tags_to_vault(**kwargs)

  

  This operation adds the specified tags to a vault. Each tag is composed of a key and a value. Each vault can have up to 10 tags. If your request would cause the tag limit for the vault to be exceeded, the operation throws the ``LimitExceededException`` error. If a tag already exists on the vault under a specified key, the existing key value will be overwritten. For more information about tags, see `Tagging Amazon Glacier Resources <https://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glacier-2012-06-01/AddTagsToVault>`_  


  **Request Syntax**
  ::

    response = client.add_tags_to_vault(
        vaultName='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type accountId: string
  :param accountId: 

    The ``AccountId`` value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ' ``-``' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.

        Note: this parameter is set to "-" bydefault if no value is not specified.


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

    The name of the vault.

    

  
  :type Tags: dict
  :param Tags: 

    The tags to add to the vault. Each tag is composed of a key and a value. The value can be an empty string.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :returns: None
  **Exceptions**
  
  *   :py:class:`Glacier.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`Glacier.Client.exceptions.MissingParameterValueException`

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

  
  *   :py:class:`Glacier.Client.exceptions.LimitExceededException`

  
  *   :py:class:`Glacier.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`Glacier.Client.exceptions.NoLongerSupportedException`

  

  **Examples**

  The example adds two tags to a my-vault.
  ::

    response = client.add_tags_to_vault(
        Tags={
            'examplekey1': 'examplevalue1',
            'examplekey2': 'examplevalue2',
        },
        accountId='-',
        vaultName='my-vault',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  