def create(self, name, incident_preference):
        """
        This API endpoint allows you to create an alert policy

        :type name: str
        :param name: The name of the policy

        :type incident_preference: str
        :param incident_preference: Can be PER_POLICY, PER_CONDITION or
            PER_CONDITION_AND_TARGET

        :rtype: dict
        :return: The JSON response of the API

        ::

            {
                "policy": {
                    "created_at": "time",
                    "id": "integer",
                    "incident_preference": "string",
                    "name": "string",
                    "updated_at": "time"
                }
            }

        """

        data = {
            "policy": {
                "name": name,
                "incident_preference": incident_preference
            }
        }

        return self._post(
            url='{0}alerts_policies.json'.format(self.URL),
            headers=self.headers,
            data=data
        )
This API endpoint allows you to create an alert policy

        :type name: str
        :param name: The name of the policy

        :type incident_preference: str
        :param incident_preference: Can be PER_POLICY, PER_CONDITION or
            PER_CONDITION_AND_TARGET

        :rtype: dict
        :return: The JSON response of the API

        ::

            {
                "policy": {
                    "created_at": "time",
                    "id": "integer",
                    "incident_preference": "string",
                    "name": "string",
                    "updated_at": "time"
                }
            }