Add tags to a domain

    Returns {tagged: true} if the domain was tagged and returns
    {tagged: False} if the domain was not tagged.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_elasticsearch_domain.add_tags mydomain tag_a=tag_value tag_b=tag_value

def add_tags(DomainName=None, ARN=None,
           region=None, key=None, keyid=None, profile=None, **kwargs):
    '''
    Add tags to a domain

    Returns {tagged: true} if the domain was tagged and returns
    {tagged: False} if the domain was not tagged.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_elasticsearch_domain.add_tags mydomain tag_a=tag_value tag_b=tag_value

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        tagslist = []
        for k, v in six.iteritems(kwargs):
            if six.text_type(k).startswith('__'):
                continue
            tagslist.append({'Key': six.text_type(k), 'Value': six.text_type(v)})
        if ARN is None:
            if DomainName is None:
                raise SaltInvocationError('One (but not both) of ARN or '
                         'domain must be specified.')
            domaindata = status(DomainName=DomainName,
                            region=region, key=key, keyid=keyid,
                            profile=profile)
            if not domaindata or 'domain' not in domaindata:
                log.warning('Domain tags not updated')
                return {'tagged': False}
            ARN = domaindata.get('domain', {}).get('ARN')
        elif DomainName is not None:
            raise SaltInvocationError('One (but not both) of ARN or '
                         'domain must be specified.')
        conn.add_tags(ARN=ARN, TagList=tagslist)
        return {'tagged': True}
    except ClientError as e:
        return {'tagged': False, 'error': __utils__['boto3.get_error'](e)}