Delete an ELB policy.

    .. versionadded:: 2016.3.0

    CLI example:

    .. code-block:: bash

        salt myminion boto_elb.delete_policy myelb mypolicy

def delete_policy(name, policy_name, region=None, key=None, keyid=None,
                  profile=None):
    '''
    Delete an ELB policy.

    .. versionadded:: 2016.3.0

    CLI example:

    .. code-block:: bash

        salt myminion boto_elb.delete_policy myelb mypolicy
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    if not exists(name, region, key, keyid, profile):
        return True
    try:
        conn.delete_lb_policy(name, policy_name)
        log.info('Deleted policy %s on ELB %s', policy_name, name)
        return True
    except boto.exception.BotoServerError as e:
        log.error('Failed to delete policy %s on ELB %s: %s',
                  policy_name, name, e.message,
                  exc_info_on_loglevel=logging.DEBUG)
        return False