{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-policy/json-schema/microsoft-azure-policy-policy-set-definition-version-schema.json",
  "title": "PolicySetDefinitionVersion",
  "description": "The policy set definition version.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-policy-openapi.yml#/components/schemas/PolicySetDefinitionVersion",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/PolicySetDefinitionVersionProperties"
    },
    "id": {
      "readOnly": true,
      "type": "string",
      "description": "The ID of the policy set definition version."
    },
    "name": {
      "readOnly": true,
      "type": "string",
      "description": "The name of the policy set definition version."
    },
    "type": {
      "readOnly": true,
      "type": "string",
      "description": "The type of the resource (Microsoft.Authorization/policySetDefinitions/versions)."
    },
    "systemData": {
      "$ref": "#/$defs/systemData"
    }
  },
  "x-ms-azure-resource": true,
  "$defs": {
    "PolicyDefinitionGroup": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the group."
        },
        "displayName": {
          "type": "string",
          "description": "The group's display name."
        },
        "category": {
          "type": "string",
          "description": "The group's category."
        },
        "description": {
          "type": "string",
          "description": "The group's description."
        },
        "additionalMetadataId": {
          "type": "string",
          "description": "A resource ID of a resource that contains additional metadata about the group."
        }
      },
      "required": [
        "name"
      ],
      "description": "The policy definition group."
    },
    "PolicyDefinitionReference": {
      "type": "object",
      "properties": {
        "policyDefinitionId": {
          "type": "string",
          "description": "The ID of the policy definition or policy set definition."
        },
        "definitionVersion": {
          "type": "string",
          "description": "The version of the policy definition to use."
        },
        "latestDefinitionVersion": {
          "type": "string",
          "description": "The latest version of the policy definition available. This is only present if requested via the $expand query parameter.",
          "readOnly": true
        },
        "effectiveDefinitionVersion": {
          "type": "string",
          "description": "The effective version of the policy definition in use. This is only present if requested via the $expand query parameter.",
          "readOnly": true
        },
        "parameters": {
          "$ref": "./policyAssignments.json#/definitions/ParameterValues"
        },
        "policyDefinitionReferenceId": {
          "type": "string",
          "description": "A unique id (within the policy set definition) for this policy definition reference."
        },
        "groupNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The name of the groups that this policy definition reference belongs to."
        }
      },
      "required": [
        "policyDefinitionId"
      ],
      "description": "The policy definition reference."
    },
    "PolicySetDefinitionVersionProperties": {
      "type": "object",
      "properties": {
        "policyType": {
          "type": "string",
          "description": "The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.",
          "enum": [
            "NotSpecified",
            "BuiltIn",
            "Custom",
            "Static"
          ],
          "x-ms-enum": {
            "name": "policyType",
            "modelAsString": true
          }
        },
        "displayName": {
          "type": "string",
          "description": "The display name of the policy set definition."
        },
        "description": {
          "type": "string",
          "description": "The policy set definition description."
        },
        "metadata": {
          "type": "object",
          "description": "The policy set definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs."
        },
        "parameters": {
          "$ref": "./policyDefinitions.json#/definitions/ParameterDefinitions"
        },
        "policyDefinitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PolicyDefinitionReference"
          },
          "x-ms-identifiers": [
            "policyDefinitionReferenceId"
          ],
          "description": "An array of policy definition references."
        },
        "policyDefinitionGroups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PolicyDefinitionGroup"
          },
          "x-ms-identifiers": [
            "name"
          ],
          "description": "The metadata describing groups of policy definition references within the policy set definition."
        },
        "version": {
          "type": "string",
          "description": "The policy set definition version in #.#.# format."
        }
      },
      "required": [
        "policyDefinitions"
      ],
      "description": "The policy set definition properties."
    },
    "systemData": {
      "type": "object",
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      },
      "readOnly": true
    }
  }
}