{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-sql-database/json-schema/microsoft-azure-sql-database-job-step-schema.json",
  "title": "JobStep",
  "description": "A job step.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-sql-database-jobsteps-api-openapi.yml#/components/schemas/JobStep",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/JobStepProperties",
      "description": "Resource properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "Azure.Core.uuid": {
      "type": "string",
      "format": "uuid",
      "description": "Universally Unique Identifier"
    },
    "JobStepAction": {
      "type": "object",
      "description": "The action to be executed by a job step.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of action being executed by the job step.",
          "default": "TSql",
          "enum": [
            "TSql"
          ],
          "x-ms-enum": {
            "name": "JobStepActionType",
            "modelAsString": true,
            "values": [
              {
                "name": "TSql",
                "value": "TSql",
                "description": "TSql"
              }
            ]
          }
        },
        "source": {
          "type": "string",
          "description": "The source of the action to execute.",
          "default": "Inline",
          "enum": [
            "Inline"
          ],
          "x-ms-enum": {
            "name": "JobStepActionSource",
            "modelAsString": true,
            "values": [
              {
                "name": "Inline",
                "value": "Inline",
                "description": "Inline"
              }
            ]
          }
        },
        "value": {
          "type": "string",
          "description": "The action value, for example the text of the T-SQL script to execute."
        }
      },
      "required": [
        "value"
      ]
    },
    "JobStepExecutionOptions": {
      "type": "object",
      "description": "The execution options of a job step.",
      "properties": {
        "timeoutSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "Execution timeout for the job step.",
          "default": 43200
        },
        "retryAttempts": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum number of times the job step will be reattempted if the first attempt fails.",
          "default": 10
        },
        "initialRetryIntervalSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "Initial delay between retries for job step execution.",
          "default": 1
        },
        "maximumRetryIntervalSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum amount of time to wait between retries for job step execution.",
          "default": 120
        },
        "retryIntervalBackoffMultiplier": {
          "type": "number",
          "format": "float",
          "description": "The backoff multiplier for the time between retries.",
          "default": 2
        }
      }
    },
    "JobStepOutput": {
      "type": "object",
      "description": "The output configuration of a job step.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The output destination type.",
          "default": "SqlDatabase",
          "enum": [
            "SqlDatabase"
          ],
          "x-ms-enum": {
            "name": "JobStepOutputType",
            "modelAsString": true,
            "values": [
              {
                "name": "SqlDatabase",
                "value": "SqlDatabase",
                "description": "SqlDatabase"
              }
            ]
          }
        },
        "subscriptionId": {
          "$ref": "#/$defs/Azure.Core.uuid",
          "description": "The output destination subscription id."
        },
        "resourceGroupName": {
          "type": "string",
          "description": "The output destination resource group."
        },
        "serverName": {
          "type": "string",
          "description": "The output destination server name."
        },
        "databaseName": {
          "type": "string",
          "description": "The output destination database."
        },
        "schemaName": {
          "type": "string",
          "description": "The output destination schema.",
          "default": "dbo"
        },
        "tableName": {
          "type": "string",
          "description": "The output destination table."
        },
        "credential": {
          "type": "string",
          "description": "The resource ID of the credential to use to connect to the output destination."
        }
      },
      "required": [
        "serverName",
        "databaseName",
        "tableName"
      ]
    },
    "JobStepProperties": {
      "type": "object",
      "description": "Properties of a job step.",
      "properties": {
        "stepId": {
          "type": "integer",
          "format": "int32",
          "description": "The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified."
        },
        "targetGroup": {
          "type": "string",
          "description": "The resource ID of the target group that the job step will be executed on."
        },
        "credential": {
          "type": "string",
          "description": "The resource ID of the job credential that will be used to connect to the targets."
        },
        "action": {
          "$ref": "#/$defs/JobStepAction",
          "description": "The action payload of the job step."
        },
        "output": {
          "$ref": "#/$defs/JobStepOutput",
          "description": "Output destination properties of the job step."
        },
        "executionOptions": {
          "$ref": "#/$defs/JobStepExecutionOptions",
          "description": "Execution options for the job step."
        }
      },
      "required": [
        "targetGroup",
        "action"
      ]
    },
    "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",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    }
  }
}