{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-deployment-stack-validate-result-schema.json",
  "title": "DeploymentStackValidateResult",
  "description": "The Deployment stack validation result.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-deploymentstacksatmanagementgroup-api-openapi.yml#/components/schemas/DeploymentStackValidateResult",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "String Id used to locate any resource on Azure.",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Name of this resource.",
      "readOnly": true
    },
    "type": {
      "type": "string",
      "description": "Type of this resource.",
      "readOnly": true
    },
    "systemData": {
      "$ref": "#/$defs/systemData",
      "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
      "readOnly": true
    },
    "error": {
      "$ref": "#/$defs/ErrorDetail",
      "description": "The error detail.",
      "readOnly": true
    },
    "properties": {
      "$ref": "#/$defs/DeploymentStackValidateProperties",
      "description": "The validation result details."
    }
  },
  "$defs": {
    "ActionOnUnmanage": {
      "type": "object",
      "description": "Defines the behavior of resources that are no longer managed after the stack is updated or deleted.",
      "properties": {
        "resources": {
          "$ref": "#/$defs/UnmanageActionResourceMode",
          "description": "Specifies an action for a newly unmanaged resource."
        },
        "resourceGroups": {
          "$ref": "#/$defs/UnmanageActionResourceGroupMode",
          "description": "Specifies an action for a newly unmanaged resource group."
        },
        "managementGroups": {
          "$ref": "#/$defs/UnmanageActionManagementGroupMode",
          "description": "Specifies an action for a newly unmanaged resource management group."
        },
        "resourcesWithoutDeleteSupport": {
          "$ref": "#/$defs/ResourcesWithoutDeleteSupportAction",
          "description": "Some resources do not support deletion.  This flag will denote how the stack should handle those resources."
        }
      },
      "required": [
        "resources"
      ]
    },
    "DenySettings": {
      "type": "object",
      "description": "Defines how resources deployed by the Deployment stack are locked.",
      "properties": {
        "mode": {
          "$ref": "#/$defs/DenySettingsMode",
          "description": "denySettings Mode that defines denied actions."
        },
        "excludedPrincipals": {
          "type": "array",
          "description": "List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.",
          "items": {
            "type": "string"
          }
        },
        "excludedActions": {
          "type": "array",
          "description": "List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.",
          "items": {
            "type": "string"
          }
        },
        "applyToChildScopes": {
          "type": "boolean",
          "description": "DenySettings will be applied to child resource scopes of every managed resource with a deny assignment."
        }
      },
      "required": [
        "mode"
      ]
    },
    "DenySettingsMode": {
      "type": "string",
      "description": "denySettings Mode that defines denied actions.",
      "enum": [
        "denyDelete",
        "denyWriteAndDelete",
        "none"
      ],
      "x-ms-enum": {
        "name": "DenySettingsMode",
        "modelAsString": true,
        "values": [
          {
            "name": "DenyDelete",
            "value": "denyDelete",
            "description": "Authorized users are able to read and modify the resources, but cannot delete."
          },
          {
            "name": "DenyWriteAndDelete",
            "value": "denyWriteAndDelete",
            "description": "Authorized users can read from a resource, but cannot modify or delete it."
          },
          {
            "name": "None",
            "value": "none",
            "description": "No denyAssignments have been applied."
          }
        ]
      }
    },
    "DeploymentExtension": {
      "type": "object",
      "description": "Details about the usage of a deployment extension.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The extension name."
        },
        "version": {
          "type": "string",
          "description": "The extension version."
        },
        "configId": {
          "type": "string",
          "description": "The configuration ID of the extension usage. It uniquely identifies a target the extension deploys to."
        },
        "config": {
          "$ref": "#/$defs/DeploymentExtensionConfig",
          "description": "The configuration used for deployment. The keys of this object should align with the extension config schema."
        }
      },
      "required": [
        "name",
        "version"
      ]
    },
    "DeploymentExtensionConfig": {
      "type": "object",
      "description": "The configuration of a deployment extension. The keys of this object should align with the extension config schema.",
      "additionalProperties": {
        "$ref": "#/$defs/DeploymentExtensionConfigItem"
      }
    },
    "DeploymentExtensionConfigItem": {
      "type": "object",
      "description": "The value or how to get a value for an extension config property.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of the value.",
          "readOnly": true
        },
        "value": {
          "description": "The value of the config item. The type is determined by the extension config schema."
        },
        "keyVaultReference": {
          "$ref": "#/$defs/KeyVaultParameterReference",
          "description": "The key vault reference of the config item."
        }
      }
    },
    "DeploymentParameter": {
      "type": "object",
      "description": "Deployment parameter for the template.",
      "properties": {
        "value": {
          "description": "Input value to the parameter."
        },
        "type": {
          "type": "string",
          "description": "Type of the value."
        },
        "reference": {
          "$ref": "#/$defs/KeyVaultParameterReference",
          "description": "Azure Key Vault parameter reference."
        },
        "expression": {
          "type": "string",
          "description": "Input expression to the parameter.",
          "x-ms-mutability": [
            "update",
            "create"
          ]
        }
      }
    },
    "DeploymentStackValidateProperties": {
      "type": "object",
      "description": "The Deployment stack validation result details.",
      "properties": {
        "actionOnUnmanage": {
          "$ref": "#/$defs/ActionOnUnmanage",
          "description": "Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted."
        },
        "correlationId": {
          "type": "string",
          "description": "The correlation id of the Deployment stack validate operation. It is in GUID format and is used for tracing."
        },
        "denySettings": {
          "$ref": "#/$defs/DenySettings",
          "description": "The Deployment stack deny settings."
        },
        "deploymentScope": {
          "type": "string",
          "description": "The Deployment stack deployment scope."
        },
        "description": {
          "type": "string",
          "description": "The Deployment stack validation description."
        },
        "parameters": {
          "type": "object",
          "description": "Deployment parameters.",
          "additionalProperties": {
            "$ref": "#/$defs/DeploymentParameter"
          }
        },
        "templateLink": {
          "$ref": "#/$defs/DeploymentStacksTemplateLink",
          "description": "The URI of the template."
        },
        "validatedResources": {
          "type": "array",
          "description": "The array of resources that were validated.",
          "items": {
            "$ref": "#/$defs/ResourceReference"
          }
        },
        "deploymentExtensions": {
          "type": "array",
          "description": "The deployment extensions.",
          "items": {
            "$ref": "#/$defs/DeploymentExtension"
          }
        },
        "validationLevel": {
          "$ref": "#/$defs/ValidationLevel",
          "description": "The validation level of the deployment stack"
        }
      }
    },
    "DeploymentStacksTemplateLink": {
      "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 resourceId 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."
        },
        "queryString": {
          "type": "string",
          "description": "The query string (for example, a SAS token) to be used with the templateLink URI."
        },
        "contentVersion": {
          "type": "string",
          "description": "If included, must match the ContentVersion in the template."
        }
      }
    },
    "ErrorAdditionalInfo": {
      "type": "object",
      "description": "The resource management error additional info.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The additional info type.",
          "readOnly": true
        },
        "info": {
          "type": "object",
          "description": "The additional info.",
          "readOnly": true
        }
      }
    },
    "ErrorDetail": {
      "type": "object",
      "description": "The error detail.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The error code.",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "description": "The error message.",
          "readOnly": true
        },
        "target": {
          "type": "string",
          "description": "The error target.",
          "readOnly": true
        },
        "details": {
          "type": "array",
          "description": "The error details.",
          "items": {
            "$ref": "#/$defs/ErrorDetail"
          },
          "readOnly": true,
          "x-ms-identifiers": [
            "message",
            "target"
          ]
        },
        "additionalInfo": {
          "type": "array",
          "description": "The error additional info.",
          "items": {
            "$ref": "#/$defs/ErrorAdditionalInfo"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "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 resourceId."
        }
      },
      "required": [
        "id"
      ]
    },
    "ResourceReference": {
      "type": "object",
      "description": "The resourceId model.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ARM Resource ID of a resource managed by the deployment stack.",
          "readOnly": true
        },
        "extension": {
          "$ref": "#/$defs/DeploymentExtension",
          "description": "The extension the resource was deployed with.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The resource type.",
          "readOnly": true
        },
        "identifiers": {
          "type": "object",
          "description": "The extensible resource identifiers.",
          "additionalProperties": {},
          "readOnly": true
        },
        "apiVersion": {
          "type": "string",
          "description": "The API version the resource was deployed with",
          "readOnly": true
        }
      }
    },
    "ResourcesWithoutDeleteSupportAction": {
      "type": "string",
      "description": "Specifies an action for resources that do not support deletion.",
      "enum": [
        "detach",
        "fail"
      ],
      "x-ms-enum": {
        "name": "ResourcesWithoutDeleteSupportAction",
        "modelAsString": true,
        "values": [
          {
            "name": "Detach",
            "value": "detach",
            "description": "Detach the specified resources from the deployment stack and continue."
          },
          {
            "name": "Fail",
            "value": "fail",
            "description": "Fail the deployment stack if resources cannot be deleted."
          }
        ]
      }
    },
    "UnmanageActionManagementGroupMode": {
      "type": "string",
      "description": "Specifies an action for a newly unmanaged resource.",
      "enum": [
        "delete",
        "detach"
      ],
      "x-ms-enum": {
        "name": "UnmanageActionManagementGroupMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Delete",
            "value": "delete",
            "description": "Delete the management groups from Azure."
          },
          {
            "name": "Detach",
            "value": "detach",
            "description": "Keep the management groups in Azure."
          }
        ]
      }
    },
    "UnmanageActionResourceGroupMode": {
      "type": "string",
      "description": "Specifies an action for a newly unmanaged resource group.",
      "enum": [
        "delete",
        "detach"
      ],
      "x-ms-enum": {
        "name": "UnmanageActionResourceGroupMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Delete",
            "value": "delete",
            "description": "Delete the resource groups from Azure."
          },
          {
            "name": "Detach",
            "value": "detach",
            "description": "Keep the resource groups in Azure."
          }
        ]
      }
    },
    "UnmanageActionResourceMode": {
      "type": "string",
      "description": "Specifies an action for a newly unmanaged resource.",
      "enum": [
        "delete",
        "detach"
      ],
      "x-ms-enum": {
        "name": "UnmanageActionResourceMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Delete",
            "value": "delete",
            "description": "Delete the resources from Azure"
          },
          {
            "name": "Detach",
            "value": "detach",
            "description": "Keep the resources in Azure"
          }
        ]
      }
    },
    "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."
          }
        ]
      }
    },
    "systemData": {
      "type": "object",
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      },
      "readOnly": true
    }
  }
}