'retrieves the alert policy id of the server based on the name of the policy
:param clc: the clc-sdk instance to use
:param module: the AnsibleModule object
:param alias: the CLC account alias
:param alert_policy_name: the alert policy name
:return: alert_policy_id: The alert policy id'

@staticmethod
def _get_alert_policy_id_by_name(clc, module, alias, alert_policy_name):

    alert_policy_id = None
    try:
        alert_policies = clc.v2.API.Call(method='GET', url=('alertPolicies/%s' % alias))
    except APIFailedResponse as ex:
        return module.fail_json(msg='Unable    to    fetch    alert    policies    for    account    :    "{0}".    {1}'.format(alias, str(ex.response_text)))
    for alert_policy in alert_policies.get('items'):
        if (alert_policy.get('name') == alert_policy_name):
            if (not alert_policy_id):
                alert_policy_id = alert_policy.get('id')
            else:
                return module.fail_json(msg=('multiple    alert    policies    were    found    with    policy    name    :    %s' % alert_policy_name))
    return alert_policy_id
