{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-automation/json-schema/microsoft-azure-automation-runbook-create-or-update-parameters-schema.json",
  "title": "RunbookCreateOrUpdateParameters",
  "description": "The parameters supplied to the create or update runbook operation.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-automation-runbook-api-openapi.yml#/components/schemas/RunbookCreateOrUpdateParameters",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/RunbookCreateOrUpdateProperties",
      "description": "Gets or sets runbook create or update properties.",
      "x-ms-client-flatten": true
    },
    "name": {
      "type": "string",
      "description": "Gets or sets the name of the resource."
    },
    "location": {
      "type": "string",
      "description": "Gets or sets the location of the resource."
    },
    "tags": {
      "type": "object",
      "description": "Gets or sets the tags attached to the resource.",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "required": [
    "properties"
  ],
  "$defs": {
    "ContentHash": {
      "type": "object",
      "description": "Definition of the runbook property type.",
      "properties": {
        "algorithm": {
          "type": "string",
          "description": "Gets or sets the content hash algorithm used to hash the content."
        },
        "value": {
          "type": "string",
          "description": "Gets or sets expected hash value of the content."
        }
      },
      "required": [
        "algorithm",
        "value"
      ]
    },
    "ContentLink": {
      "type": "object",
      "description": "Definition of the content link.",
      "properties": {
        "uri": {
          "type": "string",
          "description": "Gets or sets the uri of content."
        },
        "contentHash": {
          "$ref": "#/$defs/ContentHash",
          "description": "Gets or sets the hash."
        },
        "version": {
          "type": "string",
          "description": "Gets or sets the version of the content."
        }
      }
    },
    "RunbookCreateOrUpdateProperties": {
      "type": "object",
      "description": "The parameters supplied to the create or update runbook properties.",
      "properties": {
        "logVerbose": {
          "type": "boolean",
          "description": "Gets or sets verbose log option."
        },
        "logProgress": {
          "type": "boolean",
          "description": "Gets or sets progress log option."
        },
        "runtimeEnvironment": {
          "type": "string",
          "description": "Environment of the runbook."
        },
        "runbookType": {
          "$ref": "#/$defs/RunbookTypeEnum",
          "description": "Gets or sets the type of the runbook."
        },
        "draft": {
          "$ref": "#/$defs/RunbookDraft",
          "description": "Gets or sets the draft runbook properties."
        },
        "publishContentLink": {
          "$ref": "#/$defs/ContentLink",
          "description": "Gets or sets the published runbook content link."
        },
        "description": {
          "type": "string",
          "description": "Gets or sets the description of the runbook."
        },
        "logActivityTrace": {
          "type": "integer",
          "format": "int32",
          "description": "Gets or sets the activity-level tracing options of the runbook."
        }
      },
      "required": [
        "runbookType"
      ]
    },
    "RunbookDraft": {
      "type": "object",
      "properties": {
        "inEdit": {
          "type": "boolean",
          "description": "Gets or sets whether runbook is in edit mode."
        },
        "draftContentLink": {
          "$ref": "#/$defs/ContentLink",
          "description": "Gets or sets the draft runbook content link."
        },
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the creation time of the runbook draft."
        },
        "lastModifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the last modified time of the runbook draft."
        },
        "parameters": {
          "type": "object",
          "description": "Gets or sets the runbook draft parameters.",
          "additionalProperties": {
            "$ref": "#/$defs/RunbookParameter"
          }
        },
        "outputTypes": {
          "type": "array",
          "description": "Gets or sets the runbook output types.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "RunbookParameter": {
      "type": "object",
      "description": "Definition of the runbook parameter type.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Gets or sets the type of the parameter."
        },
        "isMandatory": {
          "type": "boolean",
          "description": "Gets or sets a Boolean value to indicate whether the parameter is mandatory or not."
        },
        "position": {
          "type": "integer",
          "format": "int32",
          "description": "Get or sets the position of the parameter."
        },
        "defaultValue": {
          "type": "string",
          "description": "Gets or sets the default value of parameter."
        }
      }
    },
    "RunbookTypeEnum": {
      "type": "string",
      "description": "Gets or sets the type of the runbook.",
      "enum": [
        "Script",
        "Graph",
        "PowerShellWorkflow",
        "PowerShell",
        "GraphPowerShellWorkflow",
        "GraphPowerShell",
        "Python2",
        "Python3",
        "Python",
        "PowerShell72"
      ],
      "x-ms-enum": {
        "name": "RunbookTypeEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "Script",
            "value": "Script",
            "description": "Script"
          },
          {
            "name": "Graph",
            "value": "Graph",
            "description": "Graph"
          },
          {
            "name": "PowerShellWorkflow",
            "value": "PowerShellWorkflow",
            "description": "PowerShellWorkflow"
          },
          {
            "name": "PowerShell",
            "value": "PowerShell",
            "description": "PowerShell"
          },
          {
            "name": "GraphPowerShellWorkflow",
            "value": "GraphPowerShellWorkflow",
            "description": "GraphPowerShellWorkflow"
          },
          {
            "name": "GraphPowerShell",
            "value": "GraphPowerShell",
            "description": "GraphPowerShell"
          },
          {
            "name": "Python2",
            "value": "Python2",
            "description": "Python2"
          },
          {
            "name": "Python3",
            "value": "Python3",
            "description": "Python3"
          },
          {
            "name": "Python",
            "value": "Python",
            "description": "Python"
          },
          {
            "name": "PowerShell72",
            "value": "PowerShell72",
            "description": "PowerShell72"
          }
        ]
      }
    }
  }
}