{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-functions/json-schema/microsoft-azure-functions-recommendation-collection-schema.json",
  "title": "RecommendationCollection",
  "description": "Collection of recommendations.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-functions-recommendations-api-openapi.yml#/components/schemas/RecommendationCollection",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The Recommendation items on this page",
      "items": {
        "$ref": "#/$defs/Recommendation"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "Channels": {
      "type": "string",
      "description": "List of channels that this recommendation can apply.",
      "enum": [
        "Notification",
        "Api",
        "Email",
        "Webhook",
        "All"
      ],
      "x-ms-enum": {
        "name": "Channels",
        "modelAsString": false
      }
    },
    "NotificationLevel": {
      "type": "string",
      "description": "Level indicating how critical this recommendation can impact.",
      "enum": [
        "Critical",
        "Warning",
        "Information",
        "NonUrgentSuggestion"
      ],
      "x-ms-enum": {
        "name": "NotificationLevel",
        "modelAsString": false
      }
    },
    "ProxyOnlyResource": {
      "type": "object",
      "description": "Azure proxy only resource. This resource is not tracked by Azure Resource Manager.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource Id.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Resource Name.",
          "readOnly": true
        },
        "kind": {
          "type": "string",
          "description": "Kind of resource."
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        }
      }
    },
    "Recommendation": {
      "type": "object",
      "description": "Represents a recommendation result generated by the recommendation engine.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/RecommendationProperties",
          "description": "Recommendation resource specific properties",
          "x-ms-client-flatten": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyOnlyResource"
        }
      ]
    },
    "RecommendationProperties": {
      "type": "object",
      "description": "Recommendation resource specific properties",
      "properties": {
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when this instance was created."
        },
        "recommendationId": {
          "type": "string",
          "format": "uuid",
          "description": "A GUID value that each recommendation object is associated with."
        },
        "resourceId": {
          "type": "string",
          "description": "Full ARM resource ID string that this recommendation object is associated with."
        },
        "resourceScope": {
          "$ref": "#/$defs/ResourceScopeType",
          "description": "Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site."
        },
        "ruleName": {
          "type": "string",
          "description": "Unique name of the rule."
        },
        "displayName": {
          "type": "string",
          "description": "UI friendly name of the rule (may not be unique)."
        },
        "message": {
          "type": "string",
          "description": "Recommendation text."
        },
        "level": {
          "$ref": "#/$defs/NotificationLevel",
          "description": "Level indicating how critical this recommendation can impact."
        },
        "channels": {
          "$ref": "#/$defs/Channels",
          "description": "List of channels that this recommendation can apply."
        },
        "categoryTags": {
          "type": "array",
          "description": "The list of category tags that this recommendation belongs to.",
          "items": {
            "type": "string"
          },
          "readOnly": true
        },
        "actionName": {
          "type": "string",
          "description": "Name of action recommended by this object."
        },
        "enabled": {
          "type": "integer",
          "format": "int32",
          "description": "True if this recommendation is still valid (i.e. \"actionable\"). False if it is invalid."
        },
        "states": {
          "type": "array",
          "description": "The list of states of this recommendation. If it's null then it should be considered \"Active\".",
          "items": {
            "type": "string"
          }
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The beginning time in UTC of a range that the recommendation refers to."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end time in UTC of a range that the recommendation refers to."
        },
        "nextNotificationTime": {
          "type": "string",
          "format": "date-time",
          "description": "When to notify this recommendation next in UTC. Null means that this will never be notified anymore."
        },
        "notificationExpirationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time in UTC when this notification expires."
        },
        "notifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet."
        },
        "score": {
          "type": "number",
          "format": "double",
          "description": "A metric value measured by the rule."
        },
        "isDynamic": {
          "type": "boolean",
          "description": "True if this is associated with a dynamically added rule"
        },
        "extensionName": {
          "type": "string",
          "description": "Extension name of the portal if exists."
        },
        "bladeName": {
          "type": "string",
          "description": "Deep link to a blade on the portal."
        },
        "forwardLink": {
          "type": "string",
          "description": "Forward link to an external document associated with the rule."
        }
      }
    },
    "ResourceScopeType": {
      "type": "string",
      "description": "Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site.",
      "enum": [
        "ServerFarm",
        "Subscription",
        "WebSite"
      ],
      "x-ms-enum": {
        "name": "ResourceScopeType",
        "modelAsString": true,
        "values": [
          {
            "name": "ServerFarm",
            "value": "ServerFarm"
          },
          {
            "name": "Subscription",
            "value": "Subscription"
          },
          {
            "name": "WebSite",
            "value": "WebSite"
          }
        ]
      }
    }
  }
}