{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-machine-learning/json-schema/microsoft-azure-machine-learning-job-base-schema.json",
  "title": "JobBase",
  "description": "Azure Resource Manager resource envelope.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-machine-learning-jobbases-api-openapi.yml#/components/schemas/JobBase",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/JobBaseProperties",
      "description": "[Required] Additional attributes of the entity."
    }
  },
  "required": [
    "properties"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "EmailNotificationEnableType": {
      "type": "string",
      "description": "Enum to determine the email notification type.",
      "enum": [
        "JobCompleted",
        "JobFailed",
        "JobCancelled"
      ],
      "x-ms-enum": {
        "name": "EmailNotificationEnableType",
        "modelAsString": true,
        "values": [
          {
            "name": "JobCompleted",
            "value": "JobCompleted"
          },
          {
            "name": "JobFailed",
            "value": "JobFailed"
          },
          {
            "name": "JobCancelled",
            "value": "JobCancelled"
          }
        ]
      }
    },
    "IdentityConfiguration": {
      "type": "object",
      "description": "Base definition for identity configuration.",
      "properties": {
        "identityType": {
          "$ref": "#/$defs/IdentityConfigurationType",
          "description": "[Required] Specifies the type of identity framework.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "identityType"
      ]
    },
    "IdentityConfigurationType": {
      "type": "string",
      "description": "Enum to determine identity framework.",
      "enum": [
        "Managed",
        "AMLToken",
        "UserIdentity"
      ],
      "x-ms-enum": {
        "name": "IdentityConfigurationType",
        "modelAsString": true,
        "values": [
          {
            "name": "Managed",
            "value": "Managed"
          },
          {
            "name": "AMLToken",
            "value": "AMLToken"
          },
          {
            "name": "UserIdentity",
            "value": "UserIdentity"
          }
        ]
      }
    },
    "JobBaseProperties": {
      "type": "object",
      "description": "Base definition for a job.",
      "properties": {
        "componentId": {
          "type": [
            "string",
            "null"
          ],
          "description": "ARM resource ID of the component resource.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "computeId": {
          "type": [
            "string",
            "null"
          ],
          "description": "ARM resource ID of the compute resource.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display name of job.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "experimentName": {
          "type": "string",
          "description": "The name of the experiment the job belongs to. If not set, the job is placed in the \"Default\" experiment.",
          "default": "Default",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "identity": {
          "$ref": "#/$defs/IdentityConfiguration",
          "description": "Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null.\nDefaults to AmlToken if null.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "isArchived": {
          "type": "boolean",
          "description": "Is the asset archived?",
          "default": false,
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        },
        "jobType": {
          "$ref": "#/$defs/JobType",
          "description": "[Required] Specifies the type of job.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "notificationSetting": {
          "$ref": "#/$defs/NotificationSetting",
          "description": "Notification setting for the job",
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        },
        "services": {
          "type": [
            "object",
            "null"
          ],
          "description": "List of JobEndpoints.\nFor local jobs, a job endpoint will have an endpoint value of FileStreamObject.",
          "additionalProperties": {
            "$ref": "#/$defs/JobService"
          }
        },
        "status": {
          "$ref": "#/$defs/JobStatus",
          "description": "Status of the job.",
          "readOnly": true
        }
      },
      "required": [
        "jobType"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/ResourceBase"
        }
      ]
    },
    "JobService": {
      "type": "object",
      "description": "Job endpoint definition",
      "properties": {
        "endpoint": {
          "type": [
            "string",
            "null"
          ],
          "description": "Url for endpoint.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "errorMessage": {
          "type": [
            "string",
            "null"
          ],
          "description": "Any error in the service.",
          "readOnly": true
        },
        "jobServiceType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Endpoint type.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "nodes": {
          "$ref": "#/$defs/Nodes",
          "description": "Nodes that user would like to start the service on.\nIf Nodes is not set or set to null, the service will only be started on leader node."
        },
        "port": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Port for endpoint.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "properties": {
          "type": [
            "object",
            "null"
          ],
          "description": "Additional properties to set on the endpoint.",
          "additionalProperties": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Status of endpoint.",
          "readOnly": true
        }
      }
    },
    "JobStatus": {
      "type": "string",
      "description": "The status of a job.",
      "enum": [
        "NotStarted",
        "Starting",
        "Provisioning",
        "Preparing",
        "Queued",
        "Running",
        "Finalizing",
        "CancelRequested",
        "Completed",
        "Failed",
        "Canceled",
        "NotResponding",
        "Paused",
        "Unknown"
      ],
      "x-ms-enum": {
        "name": "JobStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "NotStarted",
            "value": "NotStarted",
            "description": "Run hasn't started yet."
          },
          {
            "name": "Starting",
            "value": "Starting",
            "description": "Run has started. The user has a run ID."
          },
          {
            "name": "Provisioning",
            "value": "Provisioning",
            "description": "(Not used currently) It will be used if ES is creating the compute target."
          },
          {
            "name": "Preparing",
            "value": "Preparing",
            "description": "The run environment is being prepared."
          },
          {
            "name": "Queued",
            "value": "Queued",
            "description": "The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready."
          },
          {
            "name": "Running",
            "value": "Running",
            "description": "The job started to run in the compute target."
          },
          {
            "name": "Finalizing",
            "value": "Finalizing",
            "description": "Job is completed in the target. It is in output collection state now."
          },
          {
            "name": "CancelRequested",
            "value": "CancelRequested",
            "description": "Cancellation has been requested for the job."
          },
          {
            "name": "Completed",
            "value": "Completed",
            "description": "Job completed successfully. This reflects that both the job itself and output collection states completed successfully"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Job failed."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Following cancellation request, the job is now successfully canceled."
          },
          {
            "name": "NotResponding",
            "value": "NotResponding",
            "description": "When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state.\nNotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states."
          },
          {
            "name": "Paused",
            "value": "Paused",
            "description": "The job is paused by users. Some adjustment to labeling jobs can be made only in paused state."
          },
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Default job status if not mapped to all other statuses"
          }
        ]
      }
    },
    "JobType": {
      "type": "string",
      "description": "Enum to determine the type of job.",
      "enum": [
        "AutoML",
        "Command",
        "Sweep",
        "Pipeline",
        "Spark"
      ],
      "x-ms-enum": {
        "name": "JobType",
        "modelAsString": true,
        "values": [
          {
            "name": "AutoML",
            "value": "AutoML"
          },
          {
            "name": "Command",
            "value": "Command"
          },
          {
            "name": "Sweep",
            "value": "Sweep"
          },
          {
            "name": "Pipeline",
            "value": "Pipeline"
          },
          {
            "name": "Spark",
            "value": "Spark"
          }
        ]
      }
    },
    "Nodes": {
      "type": "object",
      "description": "Abstract Nodes definition",
      "properties": {
        "nodesValueType": {
          "$ref": "#/$defs/NodesValueType",
          "description": "[Required] Type of the Nodes value",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "nodesValueType"
      ]
    },
    "NodesValueType": {
      "type": "string",
      "description": "The enumerated types for the nodes value",
      "enum": [
        "All"
      ],
      "x-ms-enum": {
        "name": "NodesValueType",
        "modelAsString": true,
        "values": [
          {
            "name": "All",
            "value": "All"
          }
        ]
      }
    },
    "NotificationSetting": {
      "type": "object",
      "description": "Configuration for notification.",
      "properties": {
        "emailOn": {
          "type": [
            "array",
            "null"
          ],
          "description": "Send email notification to user on specified notification type",
          "items": {
            "$ref": "#/$defs/EmailNotificationEnableType"
          },
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "emails": {
          "type": [
            "array",
            "null"
          ],
          "description": "This is the email recipient list which has a limitation of 499 characters in total concat with comma separator",
          "items": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "webhooks": {
          "type": [
            "object",
            "null"
          ],
          "description": "Send webhook callback to a service. Key is a user-provided name for the webhook.",
          "additionalProperties": {
            "$ref": "#/$defs/Webhook"
          },
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        }
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "description": "Fully qualified resource ID for the resource. Ex - /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
    },
    "ResourceBase": {
      "type": "object",
      "properties": {
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The asset description text."
        },
        "properties": {
          "type": [
            "object",
            "null"
          ],
          "description": "The asset property dictionary.",
          "additionalProperties": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "tags": {
          "type": [
            "object",
            "null"
          ],
          "description": "Tag dictionary. Tags can be added, removed, and updated.",
          "additionalProperties": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "Webhook": {
      "type": "object",
      "description": "Webhook base",
      "properties": {
        "eventType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Send callback on a specified notification event",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "webhookType": {
          "$ref": "#/$defs/WebhookType",
          "description": "[Required] Specifies the type of service to send a callback",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "webhookType"
      ]
    },
    "WebhookType": {
      "type": "string",
      "description": "Enum to determine the webhook callback service type.",
      "enum": [
        "AzureDevOps"
      ],
      "x-ms-enum": {
        "name": "WebhookType",
        "modelAsString": true,
        "values": [
          {
            "name": "AzureDevOps",
            "value": "AzureDevOps"
          }
        ]
      }
    }
  }
}