{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-scoped-deployment-schema.json",
  "title": "ScopedDeployment",
  "description": "Deployment operation parameters.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-deployments-api-openapi.yml#/components/schemas/ScopedDeployment",
  "type": "object",
  "properties": {
    "location": {
      "type": "string",
      "description": "The location to store the deployment data."
    },
    "properties": {
      "$ref": "#/$defs/DeploymentProperties",
      "description": "The deployment properties."
    },
    "tags": {
      "type": "object",
      "description": "Deployment tags",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "required": [
    "location",
    "properties"
  ],
  "$defs": {
    "DebugSetting": {
      "type": "object",
      "description": "The debug setting.",
      "properties": {
        "detailLevel": {
          "type": "string",
          "description": "Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations."
        }
      }
    },
    "DeploymentExtensionConfigItem": {
      "type": "object",
      "description": "Represents the value for an extension config property.",
      "properties": {
        "value": {
          "description": "The value of the extension config property."
        },
        "keyVaultReference": {
          "$ref": "#/$defs/KeyVaultParameterReference",
          "description": "The Azure Key Vault reference used to retrieve the secret value of the extension config property."
        }
      }
    },
    "DeploymentExternalInput": {
      "type": "object",
      "description": "Deployment external input for parameterization.",
      "properties": {
        "value": {
          "description": "External input value."
        }
      },
      "required": [
        "value"
      ]
    },
    "DeploymentExternalInputDefinition": {
      "type": "object",
      "description": "Deployment external input definition for parameterization.",
      "properties": {
        "kind": {
          "type": "string",
          "description": "The kind of external input."
        },
        "config": {
          "description": "Configuration for the external input."
        }
      },
      "required": [
        "kind"
      ]
    },
    "DeploymentMode": {
      "type": "string",
      "description": "The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources.",
      "enum": [
        "Incremental",
        "Complete"
      ],
      "x-ms-enum": {
        "name": "DeploymentMode",
        "modelAsString": false,
        "values": [
          {
            "name": "Incremental",
            "value": "Incremental",
            "description": "Incremental"
          },
          {
            "name": "Complete",
            "value": "Complete",
            "description": "Complete"
          }
        ]
      }
    },
    "DeploymentParameter": {
      "type": "object",
      "description": "Deployment parameter for the template.",
      "properties": {
        "value": {
          "description": "Input value to the parameter ."
        },
        "reference": {
          "$ref": "#/$defs/KeyVaultParameterReference",
          "description": "Azure Key Vault parameter reference."
        },
        "expression": {
          "type": "string",
          "description": "Input expression to the parameter.",
          "x-ms-mutability": [
            "update",
            "create"
          ]
        }
      }
    },
    "DeploymentProperties": {
      "type": "object",
      "description": "Deployment properties.",
      "properties": {
        "template": {
          "description": "The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both."
        },
        "templateLink": {
          "$ref": "#/$defs/TemplateLink",
          "description": "The URI of the template. Use either the templateLink property or the template property, but not both."
        },
        "parameters": {
          "type": "object",
          "description": "Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string.",
          "additionalProperties": {
            "$ref": "#/$defs/DeploymentParameter"
          }
        },
        "externalInputs": {
          "type": "object",
          "description": "External input values, used by external tooling for parameter evaluation.",
          "additionalProperties": {
            "$ref": "#/$defs/DeploymentExternalInput"
          },
          "x-ms-mutability": [
            "update",
            "create"
          ]
        },
        "externalInputDefinitions": {
          "type": "object",
          "description": "External input definitions, used by external tooling to define expected external input values.",
          "additionalProperties": {
            "$ref": "#/$defs/DeploymentExternalInputDefinition"
          },
          "x-ms-mutability": [
            "update",
            "create"
          ]
        },
        "parametersLink": {
          "$ref": "#/$defs/ParametersLink",
          "description": "The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both."
        },
        "extensionConfigs": {
          "type": "object",
          "description": "The configurations to use for deployment extensions. The keys of this object are deployment extension aliases as defined in the deployment template.",
          "additionalProperties": {
            "additionalProperties": {
              "$ref": "#/$defs/DeploymentExtensionConfigItem"
            },
            "type": "object"
          }
        },
        "mode": {
          "$ref": "#/$defs/DeploymentMode",
          "description": "The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources."
        },
        "debugSetting": {
          "$ref": "#/$defs/DebugSetting",
          "description": "The debug setting of the deployment."
        },
        "onErrorDeployment": {
          "$ref": "#/$defs/OnErrorDeployment",
          "description": "The deployment on error behavior."
        },
        "expressionEvaluationOptions": {
          "$ref": "#/$defs/ExpressionEvaluationOptions",
          "description": "Specifies whether template expressions are evaluated within the scope of the parent template or nested template. Only applicable to nested templates. If not specified, default value is outer."
        },
        "validationLevel": {
          "$ref": "#/$defs/ValidationLevel",
          "description": "The validation level of the deployment"
        }
      },
      "required": [
        "mode"
      ]
    },
    "ExpressionEvaluationOptions": {
      "type": "object",
      "description": "Specifies whether template expressions are evaluated within the scope of the parent template or nested template.",
      "properties": {
        "scope": {
          "$ref": "#/$defs/ExpressionEvaluationOptionsScopeType",
          "description": "The scope to be used for evaluation of parameters, variables and functions in a nested template."
        }
      }
    },
    "ExpressionEvaluationOptionsScopeType": {
      "type": "string",
      "description": "The scope to be used for evaluation of parameters, variables and functions in a nested template.",
      "enum": [
        "NotSpecified",
        "Outer",
        "Inner"
      ],
      "x-ms-enum": {
        "name": "ExpressionEvaluationOptionsScopeType",
        "modelAsString": true,
        "values": [
          {
            "name": "NotSpecified",
            "value": "NotSpecified",
            "description": "NotSpecified"
          },
          {
            "name": "Outer",
            "value": "Outer",
            "description": "Outer"
          },
          {
            "name": "Inner",
            "value": "Inner",
            "description": "Inner"
          }
        ]
      }
    },
    "KeyVaultParameterReference": {
      "type": "object",
      "description": "Azure Key Vault parameter reference.",
      "properties": {
        "keyVault": {
          "$ref": "#/$defs/KeyVaultReference",
          "description": "Azure Key Vault reference."
        },
        "secretName": {
          "type": "string",
          "description": "Azure Key Vault secret name."
        },
        "secretVersion": {
          "type": "string",
          "description": "Azure Key Vault secret version."
        }
      },
      "required": [
        "keyVault",
        "secretName"
      ]
    },
    "KeyVaultReference": {
      "type": "object",
      "description": "Azure Key Vault reference.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Azure Key Vault resource id."
        }
      },
      "required": [
        "id"
      ]
    },
    "OnErrorDeployment": {
      "type": "object",
      "description": "Deployment on error behavior.",
      "properties": {
        "type": {
          "$ref": "#/$defs/OnErrorDeploymentType",
          "description": "The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment."
        },
        "deploymentName": {
          "type": "string",
          "description": "The deployment to be used on error case."
        }
      }
    },
    "OnErrorDeploymentType": {
      "type": "string",
      "description": "The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.",
      "enum": [
        "LastSuccessful",
        "SpecificDeployment"
      ],
      "x-ms-enum": {
        "name": "OnErrorDeploymentType",
        "modelAsString": false,
        "values": [
          {
            "name": "LastSuccessful",
            "value": "LastSuccessful",
            "description": "LastSuccessful"
          },
          {
            "name": "SpecificDeployment",
            "value": "SpecificDeployment",
            "description": "SpecificDeployment"
          }
        ]
      }
    },
    "ParametersLink": {
      "type": "object",
      "description": "Entity representing the reference to the deployment parameters.",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The URI of the parameters file."
        },
        "contentVersion": {
          "type": "string",
          "description": "If included, must match the ContentVersion in the template."
        }
      },
      "required": [
        "uri"
      ]
    },
    "TemplateLink": {
      "type": "object",
      "description": "Entity representing the reference to the template.",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The URI of the template to deploy. Use either the uri or id property, but not both."
        },
        "id": {
          "type": "string",
          "description": "The resource id of a Template Spec. Use either the id or uri property, but not both."
        },
        "relativePath": {
          "type": "string",
          "description": "The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec.  If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs"
        },
        "contentVersion": {
          "type": "string",
          "description": "If included, must match the ContentVersion in the template."
        },
        "queryString": {
          "type": "string",
          "description": "The query string (for example, a SAS token) to be used with the templateLink URI."
        }
      }
    },
    "ValidationLevel": {
      "type": "string",
      "description": "The level of validation performed on the deployment.",
      "enum": [
        "Template",
        "Provider",
        "ProviderNoRbac"
      ],
      "x-ms-enum": {
        "name": "ValidationLevel",
        "modelAsString": true,
        "values": [
          {
            "name": "Template",
            "value": "Template",
            "description": "Static analysis of the template is performed."
          },
          {
            "name": "Provider",
            "value": "Provider",
            "description": "Static analysis of the template is performed and resource declarations are sent to resource providers for semantic validation. Validates that the caller has RBAC write permissions on each resource."
          },
          {
            "name": "ProviderNoRbac",
            "value": "ProviderNoRbac",
            "description": "Static analysis of the template is performed and resource declarations are sent to resource providers for semantic validation. Skips validating that the caller has RBAC write permissions on each resource."
          }
        ]
      }
    }
  }
}