{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-role-definition-schema.json",
  "title": "RoleDefinition",
  "description": "Role definition.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-roledefinitions-api-openapi.yml#/components/schemas/RoleDefinition",
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "The role definition ID."
    },
    "name": {
      "type": "string",
      "readOnly": true,
      "description": "The role definition name."
    },
    "type": {
      "type": "string",
      "readOnly": true,
      "description": "The role definition type."
    },
    "properties": {
      "x-ms-client-flatten": true,
      "$ref": "#/$defs/RoleDefinitionProperties",
      "description": "Role definition properties."
    }
  },
  "type": "object",
  "$defs": {
    "Permission": {
      "properties": {
        "actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Allowed actions."
        },
        "notActions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Denied actions."
        },
        "dataActions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Allowed Data actions."
        },
        "notDataActions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Denied Data actions."
        }
      },
      "type": "object",
      "description": "Role definition permissions."
    },
    "RoleDefinitionProperties": {
      "properties": {
        "roleName": {
          "type": "string",
          "description": "The role name."
        },
        "description": {
          "type": "string",
          "description": "The role definition description."
        },
        "type": {
          "type": "string",
          "description": "The role type.",
          "x-ms-client-name": "roleType"
        },
        "permissions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Permission"
          },
          "x-ms-identifiers": [],
          "description": "Role definition permissions."
        },
        "assignableScopes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Role definition assignable scopes."
        },
        "createdOn": {
          "readOnly": true,
          "type": "string",
          "description": "Time it was created",
          "format": "date-time"
        },
        "updatedOn": {
          "readOnly": true,
          "type": "string",
          "description": "Time it was updated",
          "format": "date-time"
        },
        "createdBy": {
          "readOnly": true,
          "type": "string",
          "description": "Id of the user who created the assignment"
        },
        "updatedBy": {
          "readOnly": true,
          "type": "string",
          "description": "Id of the user who updated the assignment"
        }
      },
      "type": "object",
      "description": "Role definition properties."
    }
  }
}