:doc:`CodeDeploy <../../codedeploy>` / Client / add_tags_to_on_premises_instances

*********************************
add_tags_to_on_premises_instances
*********************************



.. py:method:: CodeDeploy.Client.add_tags_to_on_premises_instances(**kwargs)

  

  Adds tags to on-premises instances.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/AddTagsToOnPremisesInstances>`_  


  **Request Syntax**
  ::

    response = client.add_tags_to_on_premises_instances(
        tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        instanceNames=[
            'string',
        ]
    )
    
  :type tags: list
  :param tags: **[REQUIRED]** 

    The tag key-value pairs to add to the on-premises instances.

     

    Keys and values are both required. Keys cannot be null or empty strings. Value-only tags are not allowed.

    

  
    - *(dict) --* 

      Information about a tag.

      

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

        The tag's key.

        

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

        The tag's value.

        

      
    

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

    The names of the on-premises instances to which to add tags.

    

  
    - *(string) --* 

    

  
  :returns: None
  **Exceptions**
  
  *   :py:class:`CodeDeploy.Client.exceptions.InstanceNameRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidInstanceNameException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.TagRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidTagException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.TagLimitExceededException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InstanceLimitExceededException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InstanceNotRegisteredException`

  