{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-bicep/json-schema/microsoft-bicep-deployment-extended-schema.json",
  "title": "DeploymentExtended",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-bicep-deployments-api-openapi.yml#/components/schemas/DeploymentExtended",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the deployment"
    },
    "name": {
      "type": "string",
      "description": "The name of the deployment"
    },
    "type": {
      "type": "string",
      "description": "The type of the deployment"
    },
    "location": {
      "type": "string",
      "description": "The location of the deployment"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Deployment tags"
    },
    "properties": {
      "$ref": "#/$defs/DeploymentPropertiesExtended"
    }
  },
  "$defs": {
    "Dependency": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the dependency"
        },
        "resourceType": {
          "type": "string",
          "description": "The dependency resource type"
        },
        "resourceName": {
          "type": "string",
          "description": "The dependency resource name"
        },
        "dependsOn": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "resourceType": {
                "type": "string"
              },
              "resourceName": {
                "type": "string"
              }
            }
          },
          "description": "The list of sub-dependencies"
        }
      }
    },
    "DeploymentDiagnostic": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "Warning",
            "Info",
            "Error"
          ],
          "description": "The diagnostic level"
        },
        "code": {
          "type": "string",
          "description": "The diagnostic code"
        },
        "message": {
          "type": "string",
          "description": "The diagnostic message"
        },
        "target": {
          "type": "string",
          "description": "The diagnostic target"
        }
      }
    },
    "DeploymentPropertiesExtended": {
      "type": "object",
      "properties": {
        "provisioningState": {
          "type": "string",
          "enum": [
            "NotSpecified",
            "Accepted",
            "Running",
            "Ready",
            "Creating",
            "Created",
            "Deleting",
            "Deleted",
            "Canceled",
            "Failed",
            "Succeeded",
            "Updating"
          ],
          "description": "The state of provisioning"
        },
        "correlationId": {
          "type": "string",
          "description": "The correlation ID of the deployment"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of the template deployment"
        },
        "duration": {
          "type": "string",
          "description": "The duration of the template deployment (ISO 8601)"
        },
        "outputs": {
          "type": "object",
          "description": "Key/value pairs that represent deployment output"
        },
        "providers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Provider"
          },
          "description": "The list of resource providers needed for the deployment"
        },
        "dependencies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Dependency"
          },
          "description": "The list of deployment dependencies"
        },
        "templateLink": {
          "$ref": "#/$defs/TemplateLink"
        },
        "parameters": {
          "type": "object",
          "description": "Deployment parameters"
        },
        "parametersLink": {
          "$ref": "#/$defs/ParametersLink"
        },
        "mode": {
          "type": "string",
          "enum": [
            "Incremental",
            "Complete"
          ],
          "description": "The deployment mode"
        },
        "templateHash": {
          "type": "string",
          "description": "The hash produced for the template"
        },
        "outputResources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResourceReference"
          },
          "description": "Array of provisioned resources"
        },
        "validatedResources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResourceReference"
          },
          "description": "Array of validated resources"
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeploymentDiagnostic"
          },
          "description": "Diagnostic information collected during validation"
        },
        "onErrorDeployment": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "LastSuccessful",
                "SpecificDeployment"
              ]
            },
            "deploymentName": {
              "type": "string"
            },
            "provisioningState": {
              "type": "string"
            }
          }
        }
      }
    },
    "ParametersLink": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "The URI of the parameters file"
        },
        "contentVersion": {
          "type": "string",
          "description": "If included, must match the ContentVersion in the template."
        }
      }
    },
    "Provider": {
      "type": "object",
      "properties": {
        "namespace": {
          "type": "string",
          "description": "The namespace of the resource provider"
        },
        "resourceTypes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "resourceType": {
                "type": "string",
                "description": "The resource type"
              },
              "locations": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The locations where this resource type can be created"
              }
            }
          }
        }
      }
    },
    "ResourceReference": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The fully qualified Azure resource ID"
        },
        "resourceType": {
          "type": "string",
          "description": "The resource type"
        },
        "apiVersion": {
          "type": "string",
          "description": "The API version the resource was deployed with"
        }
      }
    },
    "TemplateLink": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "The URI of the template to deploy"
        },
        "id": {
          "type": "string",
          "description": "The resource ID of a Template Spec. Use either the id or uri property, but not both."
        },
        "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."
        },
        "relativePath": {
          "type": "string",
          "description": "The relativePath property can be used to deploy a linked template at a location relative to the parent."
        }
      }
    }
  }
}