Given a domain name, delete it.

    Returns {deleted: true} if the domain was deleted and returns
    {deleted: false} if the domain was not deleted.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_elasticsearch_domain.delete mydomain

def delete(DomainName, region=None, key=None, keyid=None, profile=None):
    '''
    Given a domain name, delete it.

    Returns {deleted: true} if the domain was deleted and returns
    {deleted: false} if the domain was not deleted.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_elasticsearch_domain.delete mydomain

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        conn.delete_elasticsearch_domain(DomainName=DomainName)
        return {'deleted': True}
    except ClientError as e:
        return {'deleted': False, 'error': __utils__['boto3.get_error'](e)}