{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cost-management/json-schema/microsoft-azure-cost-management-alerts-result-schema.json",
  "title": "AlertsResult",
  "description": "Result of alerts.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-cost-management-alerts-api-openapi.yml#/components/schemas/AlertsResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "List of alerts.",
      "items": {
        "$ref": "#/$defs/Alert"
      },
      "readOnly": true
    },
    "nextLink": {
      "type": "string",
      "description": "URL to get the next set of alerts results if there are any.",
      "readOnly": true
    }
  },
  "$defs": {
    "Alert": {
      "type": "object",
      "description": "An individual alert.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/AlertProperties",
          "description": "Alert properties.",
          "x-ms-client-flatten": true
        },
        "eTag": {
          "$ref": "#/$defs/Azure.Core.eTag",
          "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not."
        }
      },
      "allOf": [
        {
          "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
        }
      ]
    },
    "AlertCategory": {
      "type": "string",
      "description": "Alert category",
      "enum": [
        "Cost",
        "Usage",
        "Billing",
        "System"
      ],
      "x-ms-enum": {
        "name": "AlertCategory",
        "modelAsString": true,
        "values": [
          {
            "name": "Cost",
            "value": "Cost"
          },
          {
            "name": "Usage",
            "value": "Usage"
          },
          {
            "name": "Billing",
            "value": "Billing"
          },
          {
            "name": "System",
            "value": "System"
          }
        ]
      }
    },
    "AlertCriteria": {
      "type": "string",
      "description": "Criteria that triggered alert",
      "enum": [
        "CostThresholdExceeded",
        "UsageThresholdExceeded",
        "CreditThresholdApproaching",
        "CreditThresholdReached",
        "QuotaThresholdApproaching",
        "QuotaThresholdReached",
        "MultiCurrency",
        "ForecastCostThresholdExceeded",
        "ForecastUsageThresholdExceeded",
        "InvoiceDueDateApproaching",
        "InvoiceDueDateReached",
        "CrossCloudNewDataAvailable",
        "CrossCloudCollectionError",
        "GeneralThresholdError"
      ],
      "x-ms-enum": {
        "name": "AlertCriteria",
        "modelAsString": true,
        "values": [
          {
            "name": "CostThresholdExceeded",
            "value": "CostThresholdExceeded"
          },
          {
            "name": "UsageThresholdExceeded",
            "value": "UsageThresholdExceeded"
          },
          {
            "name": "CreditThresholdApproaching",
            "value": "CreditThresholdApproaching"
          },
          {
            "name": "CreditThresholdReached",
            "value": "CreditThresholdReached"
          },
          {
            "name": "QuotaThresholdApproaching",
            "value": "QuotaThresholdApproaching"
          },
          {
            "name": "QuotaThresholdReached",
            "value": "QuotaThresholdReached"
          },
          {
            "name": "MultiCurrency",
            "value": "MultiCurrency"
          },
          {
            "name": "ForecastCostThresholdExceeded",
            "value": "ForecastCostThresholdExceeded"
          },
          {
            "name": "ForecastUsageThresholdExceeded",
            "value": "ForecastUsageThresholdExceeded"
          },
          {
            "name": "InvoiceDueDateApproaching",
            "value": "InvoiceDueDateApproaching"
          },
          {
            "name": "InvoiceDueDateReached",
            "value": "InvoiceDueDateReached"
          },
          {
            "name": "CrossCloudNewDataAvailable",
            "value": "CrossCloudNewDataAvailable"
          },
          {
            "name": "CrossCloudCollectionError",
            "value": "CrossCloudCollectionError"
          },
          {
            "name": "GeneralThresholdError",
            "value": "GeneralThresholdError"
          }
        ]
      }
    },
    "AlertOperator": {
      "type": "string",
      "description": "operator used to compare currentSpend with amount",
      "enum": [
        "None",
        "EqualTo",
        "GreaterThan",
        "GreaterThanOrEqualTo",
        "LessThan",
        "LessThanOrEqualTo"
      ],
      "x-ms-enum": {
        "name": "AlertOperator",
        "modelAsString": true,
        "values": [
          {
            "name": "None",
            "value": "None"
          },
          {
            "name": "EqualTo",
            "value": "EqualTo"
          },
          {
            "name": "GreaterThan",
            "value": "GreaterThan"
          },
          {
            "name": "GreaterThanOrEqualTo",
            "value": "GreaterThanOrEqualTo"
          },
          {
            "name": "LessThan",
            "value": "LessThan"
          },
          {
            "name": "LessThanOrEqualTo",
            "value": "LessThanOrEqualTo"
          }
        ]
      }
    },
    "AlertProperties": {
      "type": "object",
      "description": "Alert properties.",
      "properties": {
        "definition": {
          "$ref": "#/$defs/AlertPropertiesDefinition",
          "description": "defines the type of alert"
        },
        "description": {
          "type": "string",
          "description": "Alert description"
        },
        "source": {
          "$ref": "#/$defs/AlertSource",
          "description": "Source of alert"
        },
        "details": {
          "$ref": "#/$defs/AlertPropertiesDetails",
          "description": "Alert details"
        },
        "costEntityId": {
          "type": "string",
          "description": "related budget"
        },
        "status": {
          "$ref": "#/$defs/AlertStatus",
          "description": "alert status"
        },
        "creationTime": {
          "type": "string",
          "description": "dateTime in which alert was created"
        },
        "closeTime": {
          "type": "string",
          "description": "dateTime in which alert was closed"
        },
        "modificationTime": {
          "type": "string",
          "description": "dateTime in which alert was last modified"
        },
        "statusModificationUserName": {
          "type": "string",
          "description": "User who last modified the alert"
        },
        "statusModificationTime": {
          "type": "string",
          "description": "dateTime in which the alert status was last modified"
        }
      }
    },
    "AlertPropertiesDefinition": {
      "type": "object",
      "description": "defines the type of alert",
      "properties": {
        "type": {
          "$ref": "#/$defs/AlertType",
          "description": "type of alert"
        },
        "category": {
          "$ref": "#/$defs/AlertCategory",
          "description": "Alert category"
        },
        "criteria": {
          "$ref": "#/$defs/AlertCriteria",
          "description": "Criteria that triggered alert"
        }
      }
    },
    "AlertPropertiesDetails": {
      "type": "object",
      "description": "Alert details",
      "properties": {
        "timeGrainType": {
          "$ref": "#/$defs/AlertTimeGrainType",
          "description": "Type of timegrain cadence"
        },
        "periodStartDate": {
          "type": "string",
          "description": "datetime of periodStartDate"
        },
        "triggeredBy": {
          "type": "string",
          "description": "notificationId that triggered this alert"
        },
        "resourceGroupFilter": {
          "type": "array",
          "description": "array of resourceGroups to filter by",
          "items": {}
        },
        "resourceFilter": {
          "type": "array",
          "description": "array of resources to filter by",
          "items": {}
        },
        "meterFilter": {
          "type": "array",
          "description": "array of meters to filter by",
          "items": {}
        },
        "tagFilter": {
          "description": "tags to filter by"
        },
        "threshold": {
          "type": "number",
          "format": "decimal",
          "description": "notification threshold percentage as a decimal which activated this alert"
        },
        "operator": {
          "$ref": "#/$defs/AlertOperator",
          "description": "operator used to compare currentSpend with amount"
        },
        "amount": {
          "type": "number",
          "format": "decimal",
          "description": "budget threshold amount"
        },
        "unit": {
          "type": "string",
          "description": "unit of currency being used"
        },
        "currentSpend": {
          "type": "number",
          "format": "decimal",
          "description": "current spend"
        },
        "contactEmails": {
          "type": "array",
          "description": "list of emails to contact",
          "items": {
            "type": "string"
          }
        },
        "contactGroups": {
          "type": "array",
          "description": "list of action groups to broadcast to",
          "items": {
            "type": "string"
          }
        },
        "contactRoles": {
          "type": "array",
          "description": "list of contact roles",
          "items": {
            "type": "string"
          }
        },
        "overridingAlert": {
          "type": "string",
          "description": "overriding alert"
        },
        "departmentName": {
          "type": "string",
          "description": "department name"
        },
        "companyName": {
          "type": "string",
          "description": "company name"
        },
        "enrollmentNumber": {
          "type": "string",
          "description": "enrollment number"
        },
        "enrollmentStartDate": {
          "type": "string",
          "description": "datetime of enrollmentStartDate"
        },
        "enrollmentEndDate": {
          "type": "string",
          "description": "datetime of enrollmentEndDate"
        },
        "invoicingThreshold": {
          "type": "number",
          "format": "decimal",
          "description": "invoicing threshold"
        }
      }
    },
    "AlertSource": {
      "type": "string",
      "description": "Source of alert",
      "enum": [
        "Preset",
        "User"
      ],
      "x-ms-enum": {
        "name": "AlertSource",
        "modelAsString": true,
        "values": [
          {
            "name": "Preset",
            "value": "Preset"
          },
          {
            "name": "User",
            "value": "User"
          }
        ]
      }
    },
    "AlertStatus": {
      "type": "string",
      "description": "alert status",
      "enum": [
        "None",
        "Active",
        "Overridden",
        "Resolved",
        "Dismissed"
      ],
      "x-ms-enum": {
        "name": "AlertStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "None",
            "value": "None"
          },
          {
            "name": "Active",
            "value": "Active"
          },
          {
            "name": "Overridden",
            "value": "Overridden"
          },
          {
            "name": "Resolved",
            "value": "Resolved"
          },
          {
            "name": "Dismissed",
            "value": "Dismissed"
          }
        ]
      }
    },
    "AlertTimeGrainType": {
      "type": "string",
      "description": "Type of timegrain cadence",
      "enum": [
        "None",
        "Monthly",
        "Quarterly",
        "Annually",
        "BillingMonth",
        "BillingQuarter",
        "BillingAnnual"
      ],
      "x-ms-enum": {
        "name": "AlertTimeGrainType",
        "modelAsString": true,
        "values": [
          {
            "name": "None",
            "value": "None"
          },
          {
            "name": "Monthly",
            "value": "Monthly"
          },
          {
            "name": "Quarterly",
            "value": "Quarterly"
          },
          {
            "name": "Annually",
            "value": "Annually"
          },
          {
            "name": "BillingMonth",
            "value": "BillingMonth"
          },
          {
            "name": "BillingQuarter",
            "value": "BillingQuarter"
          },
          {
            "name": "BillingAnnual",
            "value": "BillingAnnual"
          }
        ]
      }
    },
    "AlertType": {
      "type": "string",
      "description": "type of alert",
      "enum": [
        "Budget",
        "Invoice",
        "Credit",
        "Quota",
        "General",
        "xCloud",
        "BudgetForecast"
      ],
      "x-ms-enum": {
        "name": "AlertType",
        "modelAsString": true,
        "values": [
          {
            "name": "Budget",
            "value": "Budget"
          },
          {
            "name": "Invoice",
            "value": "Invoice"
          },
          {
            "name": "Credit",
            "value": "Credit"
          },
          {
            "name": "Quota",
            "value": "Quota"
          },
          {
            "name": "General",
            "value": "General"
          },
          {
            "name": "xCloud",
            "value": "xCloud"
          },
          {
            "name": "BudgetForecast",
            "value": "BudgetForecast"
          }
        ]
      }
    },
    "Azure.Core.eTag": {
      "type": "string",
      "description": "The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource.\nIt lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed.\n\nIt is a string of ASCII characters placed between double quotes, like \"675af34563dc-tr34\"."
    }
  }
}