{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-advisor/json-schema/microsoft-azure-advisor-config-data-schema.json",
  "title": "ConfigData",
  "description": "The Advisor configuration data structure.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-advisor-subscriptions-api-openapi.yml#/components/schemas/ConfigData",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ConfigDataProperties",
      "description": "The Advisor configuration data structure.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "$defs": {
    "Category": {
      "type": "string",
      "description": "The category of the recommendation.",
      "enum": [
        "HighAvailability",
        "Security",
        "Performance",
        "Cost",
        "OperationalExcellence"
      ],
      "x-ms-enum": {
        "name": "Category",
        "modelAsString": true,
        "values": [
          {
            "name": "HighAvailability",
            "value": "HighAvailability"
          },
          {
            "name": "Security",
            "value": "Security"
          },
          {
            "name": "Performance",
            "value": "Performance"
          },
          {
            "name": "Cost",
            "value": "Cost"
          },
          {
            "name": "OperationalExcellence",
            "value": "OperationalExcellence"
          }
        ]
      }
    },
    "ConfigDataProperties": {
      "type": "object",
      "description": "Configuration data properties",
      "properties": {
        "exclude": {
          "type": "boolean",
          "description": "Exclude the resource from Advisor evaluations. Valid values: False (default) or True."
        },
        "lowCpuThreshold": {
          "$ref": "#/$defs/CpuThreshold",
          "description": "Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20."
        },
        "duration": {
          "$ref": "#/$defs/Duration",
          "description": "Minimum duration for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 7 (default), 14, 21, 30, 60 or 90."
        },
        "digests": {
          "type": "array",
          "description": "Advisor digest configuration. Valid only for subscriptions",
          "items": {
            "$ref": "#/$defs/DigestConfig"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "CpuThreshold": {
      "type": "string",
      "description": "Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20.",
      "enum": [
        "5",
        "10",
        "15",
        "20"
      ],
      "x-ms-enum": {
        "name": "CpuThreshold",
        "modelAsString": true,
        "values": [
          {
            "name": "5",
            "value": "5"
          },
          {
            "name": "10",
            "value": "10"
          },
          {
            "name": "15",
            "value": "15"
          },
          {
            "name": "20",
            "value": "20"
          }
        ]
      }
    },
    "DigestConfig": {
      "type": "object",
      "description": "Advisor Digest configuration entity",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of digest configuration. Value is case-insensitive and must be unique within a subscription."
        },
        "actionGroupResourceId": {
          "type": "string",
          "description": "Action group resource id used by digest."
        },
        "frequency": {
          "type": "integer",
          "format": "int32",
          "description": "Frequency that digest will be triggered, in days. Value must be between 7 and 30 days inclusive."
        },
        "categories": {
          "type": "array",
          "description": "Categories to send digest for. If categories are not provided, then digest will be sent for all categories.",
          "items": {
            "$ref": "#/$defs/Category"
          }
        },
        "language": {
          "type": "string",
          "description": "Language for digest content body. Value must be ISO 639-1 code for one of Azure portal supported languages. Otherwise, it will be converted into one. Default value is English (en)."
        },
        "state": {
          "$ref": "#/$defs/DigestConfigState",
          "description": "State of digest configuration."
        }
      }
    },
    "DigestConfigState": {
      "type": "string",
      "description": "State of digest configuration.",
      "enum": [
        "Active",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "DigestConfigState",
        "modelAsString": true,
        "values": [
          {
            "name": "Active",
            "value": "Active"
          },
          {
            "name": "Disabled",
            "value": "Disabled"
          }
        ]
      }
    },
    "Duration": {
      "type": "string",
      "description": "Minimum duration for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 7 (default), 14, 21, 30, 60 or 90.",
      "enum": [
        "7",
        "14",
        "21",
        "30",
        "60",
        "90"
      ],
      "x-ms-enum": {
        "name": "Duration",
        "modelAsString": true,
        "values": [
          {
            "name": "7",
            "value": "7"
          },
          {
            "name": "14",
            "value": "14"
          },
          {
            "name": "21",
            "value": "21"
          },
          {
            "name": "30",
            "value": "30"
          },
          {
            "name": "60",
            "value": "60"
          },
          {
            "name": "90",
            "value": "90"
          }
        ]
      }
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "type": "object",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    }
  }
}