你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.Resources deploymentStacks 2024-03-01

Bicep 资源定义

可以使用目标操作部署 deploymentStacks 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Resources/deploymentStacks 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Resources/deploymentStacks@2024-03-01' = {
  location: 'string'
  name: 'string'
  properties: {
    actionOnUnmanage: {
      managementGroups: 'string'
      resourceGroups: 'string'
      resources: 'string'
    }
    bypassStackOutOfSyncError: bool
    debugSetting: {
      detailLevel: 'string'
    }
    denySettings: {
      applyToChildScopes: bool
      excludedActions: [
        'string'
      ]
      excludedPrincipals: [
        'string'
      ]
      mode: 'string'
    }
    deploymentScope: 'string'
    description: 'string'
    error: {}
    parameters: {
      {customized property}: {
        reference: {
          keyVault: {
            id: 'string'
          }
          secretName: 'string'
          secretVersion: 'string'
        }
        type: 'string'
        value: any(Azure.Bicep.Types.Concrete.AnyType)
      }
    }
    parametersLink: {
      contentVersion: 'string'
      uri: 'string'
    }
    template: any(Azure.Bicep.Types.Concrete.AnyType)
    templateLink: {
      contentVersion: 'string'
      id: 'string'
      queryString: 'string'
      relativePath: 'string'
      uri: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

ActionOnUnmanage

名字 描述 价值
managementGroups 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”
resourceGroups 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”
资源 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”(必需)

DenySettings

名字 描述 价值
applyToChildScopes DenySettings 将应用于具有拒绝分配的每个托管资源的子资源范围。 bool
excludedActions 从 denySettings 中排除的基于角色的管理操作的列表。 最多允许 200 个操作。 如果 denySetting 模式设置为“denyWriteAndDelete”,则以下操作会自动追加到“excludedActions”:“*/read”和“Microsoft.Authorization/locks/delete”。 如果 denySetting 模式设置为“denyDelete”,则以下操作会自动追加到“excludedActions”:“Microsoft.Authorization/locks/delete”。 将删除重复的操作。 string[]
excludedPrincipals 从锁中排除的 AAD 主体 ID 的列表。 最多允许 5 个主体。 string[]
模式 定义被拒绝操作的 denySettings 模式。 “denyDelete”
'denyWriteAndDelete'
“none”(必需)

DeploymentParameterAutoGenerated

名字 描述 价值
参考 Azure Key Vault 参数引用。 KeyVaultParameterReferenceAutoGenerated
类型 值的类型。 字符串
价值 参数的输入值。 任何

DeploymentStackProperties

名字 描述 价值
actionOnUnmanage 定义在更新或删除部署堆栈后不再管理的资源的行为。 ActionOnUnmanage (必需)
bypassStackOutOfSyncError 用于绕过指示堆栈资源列表未正确同步的服务错误的标志。 bool
debugSetting 部署的调试设置。 DeploymentStacksDebugSetting
denySettings 定义堆栈部署的资源被锁定的方式。 DenySettings (必需)
deploymentScope 应在其中创建初始部署的范围。 如果未指定范围,则默认为部署堆栈的范围。 有效范围包括:管理组(格式:'/providers/Microsoft.Management/managementGroups/{managementGroupId}')、订阅(格式:'/subscriptions/{subscriptionId}')、资源组(格式:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}')。 字符串
描述 部署堆栈说明。 最大长度为 4096 个字符。 字符串

约束:
最大长度 = 4096
错误 错误详细信息。 ErrorDetail
参数 定义模板部署参数的名称和值对。 直接在请求中提供参数值而不是链接到现有参数文件时,请使用此元素。 使用 parametersLink 属性或 parameters 属性,但不能同时使用两者。 DeploymentStackPropertiesParameters
parametersLink 参数文件的 URI。 使用此元素链接到现有参数文件。 使用 parametersLink 属性或 parameters 属性,但不能同时使用两者。 DeploymentStacksParametersLink
模板 模板内容。 如果要直接在请求中传递模板语法,而不是链接到现有模板,请使用此元素。 它可以是 JObject 或格式正确的 JSON 字符串。 使用 templateLink 属性或模板属性,但不能同时使用这两者。 任何
templateLink 模板的 URI。 使用 templateLink 属性或模板属性,但不能同时使用这两者。 DeploymentStacksTemplateLink

DeploymentStackPropertiesParameters

名字 描述 价值

DeploymentStacksDebugSetting

名字 描述 价值
detailLevel 指定要记录以供调试的信息的类型。 允许的值不为 none、requestContent、responseContent,或两者均用逗号分隔的 requestContent 和 responseContent。 默认值为 none。 设置此值时,请仔细考虑在部署期间传入的信息类型。 通过记录有关请求或响应的信息,通过部署操作检索的敏感数据可能会公开。 字符串
名字 描述 价值
contentVersion 如果包含,则必须匹配模板中的 ContentVersion。 字符串
uri 参数文件的 URI。 string (必需)
名字 描述 价值
contentVersion 如果包含,则必须匹配模板中的 ContentVersion。 字符串
id 模板规格的 resourceId。使用 ID 或 uri 属性,但不能同时使用这两个属性。 字符串
queryString 要与 templateLink URI 一起使用的查询字符串(例如 SAS 令牌)。 字符串
relativePath relativePath 属性可用于在相对于父级的位置部署链接模板。 如果父模板与 TemplateSpec 链接,则会引用 TemplateSpec 中的项目。 如果父级与 URI 链接,则子部署将是父级和 relativePath URI 的组合。 字符串
uri 要部署的模板的 URI。 使用 URI 或 ID 属性,但不能同时使用这两个属性。 字符串

DeploymentStackTags

名字 描述 价值

ErrorDetail

名字 描述 价值

KeyVaultParameterReferenceAutoGenerated

名字 描述 价值
keyVault Azure Key Vault 参考。 KeyVaultReferenceAutoGenerated (必需)
secretName Azure Key Vault 机密名称。 string (必需)
secretVersion Azure Key Vault 机密版本。 字符串

KeyVaultReferenceAutoGenerated

名字 描述 价值
id Azure Key Vault resourceId。 string (必需)

Microsoft.Resources/deploymentStacks

名字 描述 价值
位置 部署堆栈的位置。 创建后无法更改它。 它必须是受支持的 Azure 位置之一。 字符串
名字 资源名称 字符串

约束:
最小长度 = 1
最大长度 = 90
模式 = ^[-\w\._\(\)]+$ (必需)
性能 部署堆栈属性。 DeploymentStackProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

ARM 模板资源定义

可以使用目标操作部署 deploymentStacks 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Resources/deploymentStacks 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Resources/deploymentStacks",
  "apiVersion": "2024-03-01",
  "name": "string",
  "location": "string",
  "properties": {
    "actionOnUnmanage": {
      "managementGroups": "string",
      "resourceGroups": "string",
      "resources": "string"
    },
    "bypassStackOutOfSyncError": "bool",
    "debugSetting": {
      "detailLevel": "string"
    },
    "denySettings": {
      "applyToChildScopes": "bool",
      "excludedActions": [ "string" ],
      "excludedPrincipals": [ "string" ],
      "mode": "string"
    },
    "deploymentScope": "string",
    "description": "string",
    "error": {
    },
    "parameters": {
      "{customized property}": {
        "reference": {
          "keyVault": {
            "id": "string"
          },
          "secretName": "string",
          "secretVersion": "string"
        },
        "type": "string",
        "value": {}
      }
    },
    "parametersLink": {
      "contentVersion": "string",
      "uri": "string"
    },
    "template": {},
    "templateLink": {
      "contentVersion": "string",
      "id": "string",
      "queryString": "string",
      "relativePath": "string",
      "uri": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

ActionOnUnmanage

名字 描述 价值
managementGroups 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”
resourceGroups 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”
资源 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”(必需)

DenySettings

名字 描述 价值
applyToChildScopes DenySettings 将应用于具有拒绝分配的每个托管资源的子资源范围。 bool
excludedActions 从 denySettings 中排除的基于角色的管理操作的列表。 最多允许 200 个操作。 如果 denySetting 模式设置为“denyWriteAndDelete”,则以下操作会自动追加到“excludedActions”:“*/read”和“Microsoft.Authorization/locks/delete”。 如果 denySetting 模式设置为“denyDelete”,则以下操作会自动追加到“excludedActions”:“Microsoft.Authorization/locks/delete”。 将删除重复的操作。 string[]
excludedPrincipals 从锁中排除的 AAD 主体 ID 的列表。 最多允许 5 个主体。 string[]
模式 定义被拒绝操作的 denySettings 模式。 “denyDelete”
'denyWriteAndDelete'
“none”(必需)

DeploymentParameterAutoGenerated

名字 描述 价值
参考 Azure Key Vault 参数引用。 KeyVaultParameterReferenceAutoGenerated
类型 值的类型。 字符串
价值 参数的输入值。 任何

DeploymentStackProperties

名字 描述 价值
actionOnUnmanage 定义在更新或删除部署堆栈后不再管理的资源的行为。 ActionOnUnmanage (必需)
bypassStackOutOfSyncError 用于绕过指示堆栈资源列表未正确同步的服务错误的标志。 bool
debugSetting 部署的调试设置。 DeploymentStacksDebugSetting
denySettings 定义堆栈部署的资源被锁定的方式。 DenySettings (必需)
deploymentScope 应在其中创建初始部署的范围。 如果未指定范围,则默认为部署堆栈的范围。 有效范围包括:管理组(格式:'/providers/Microsoft.Management/managementGroups/{managementGroupId}')、订阅(格式:'/subscriptions/{subscriptionId}')、资源组(格式:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}')。 字符串
描述 部署堆栈说明。 最大长度为 4096 个字符。 字符串

约束:
最大长度 = 4096
错误 错误详细信息。 ErrorDetail
参数 定义模板部署参数的名称和值对。 直接在请求中提供参数值而不是链接到现有参数文件时,请使用此元素。 使用 parametersLink 属性或 parameters 属性,但不能同时使用两者。 DeploymentStackPropertiesParameters
parametersLink 参数文件的 URI。 使用此元素链接到现有参数文件。 使用 parametersLink 属性或 parameters 属性,但不能同时使用两者。 DeploymentStacksParametersLink
模板 模板内容。 如果要直接在请求中传递模板语法,而不是链接到现有模板,请使用此元素。 它可以是 JObject 或格式正确的 JSON 字符串。 使用 templateLink 属性或模板属性,但不能同时使用这两者。 任何
templateLink 模板的 URI。 使用 templateLink 属性或模板属性,但不能同时使用这两者。 DeploymentStacksTemplateLink

DeploymentStackPropertiesParameters

名字 描述 价值

DeploymentStacksDebugSetting

名字 描述 价值
detailLevel 指定要记录以供调试的信息的类型。 允许的值不为 none、requestContent、responseContent,或两者均用逗号分隔的 requestContent 和 responseContent。 默认值为 none。 设置此值时,请仔细考虑在部署期间传入的信息类型。 通过记录有关请求或响应的信息,通过部署操作检索的敏感数据可能会公开。 字符串
名字 描述 价值
contentVersion 如果包含,则必须匹配模板中的 ContentVersion。 字符串
uri 参数文件的 URI。 string (必需)
名字 描述 价值
contentVersion 如果包含,则必须匹配模板中的 ContentVersion。 字符串
id 模板规格的 resourceId。使用 ID 或 uri 属性,但不能同时使用这两个属性。 字符串
queryString 要与 templateLink URI 一起使用的查询字符串(例如 SAS 令牌)。 字符串
relativePath relativePath 属性可用于在相对于父级的位置部署链接模板。 如果父模板与 TemplateSpec 链接,则会引用 TemplateSpec 中的项目。 如果父级与 URI 链接,则子部署将是父级和 relativePath URI 的组合。 字符串
uri 要部署的模板的 URI。 使用 URI 或 ID 属性,但不能同时使用这两个属性。 字符串

DeploymentStackTags

名字 描述 价值

ErrorDetail

名字 描述 价值

KeyVaultParameterReferenceAutoGenerated

名字 描述 价值
keyVault Azure Key Vault 参考。 KeyVaultReferenceAutoGenerated (必需)
secretName Azure Key Vault 机密名称。 string (必需)
secretVersion Azure Key Vault 机密版本。 字符串

KeyVaultReferenceAutoGenerated

名字 描述 价值
id Azure Key Vault resourceId。 string (必需)

Microsoft.Resources/deploymentStacks

名字 描述 价值
apiVersion API 版本 '2024-03-01'
位置 部署堆栈的位置。 创建后无法更改它。 它必须是受支持的 Azure 位置之一。 字符串
名字 资源名称 字符串

约束:
最小长度 = 1
最大长度 = 90
模式 = ^[-\w\._\(\)]+$ (必需)
性能 部署堆栈属性。 DeploymentStackProperties
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 “Microsoft.Resources/deploymentStacks”

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署 deploymentStacks 资源类型:

  • 管理组* 订阅* 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Resources/deploymentStacks 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Resources/deploymentStacks@2024-03-01"
  name = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = jsonencode({
    properties = {
      actionOnUnmanage = {
        managementGroups = "string"
        resourceGroups = "string"
        resources = "string"
      }
      bypassStackOutOfSyncError = bool
      debugSetting = {
        detailLevel = "string"
      }
      denySettings = {
        applyToChildScopes = bool
        excludedActions = [
          "string"
        ]
        excludedPrincipals = [
          "string"
        ]
        mode = "string"
      }
      deploymentScope = "string"
      description = "string"
      error = {
      }
      parameters = {
        {customized property} = {
          reference = {
            keyVault = {
              id = "string"
            }
            secretName = "string"
            secretVersion = "string"
          }
          type = "string"
          value = ?
        }
      }
      parametersLink = {
        contentVersion = "string"
        uri = "string"
      }
      template = ?
      templateLink = {
        contentVersion = "string"
        id = "string"
        queryString = "string"
        relativePath = "string"
        uri = "string"
      }
    }
  })
}

属性值

ActionOnUnmanage

名字 描述 价值
managementGroups 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”
resourceGroups 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”
资源 为新非托管资源指定操作。 删除将尝试从 Azure 中删除资源。 分离会将资源保留为当前状态。 “delete”
“detach”(必需)

DenySettings

名字 描述 价值
applyToChildScopes DenySettings 将应用于具有拒绝分配的每个托管资源的子资源范围。 bool
excludedActions 从 denySettings 中排除的基于角色的管理操作的列表。 最多允许 200 个操作。 如果 denySetting 模式设置为“denyWriteAndDelete”,则以下操作会自动追加到“excludedActions”:“*/read”和“Microsoft.Authorization/locks/delete”。 如果 denySetting 模式设置为“denyDelete”,则以下操作会自动追加到“excludedActions”:“Microsoft.Authorization/locks/delete”。 将删除重复的操作。 string[]
excludedPrincipals 从锁中排除的 AAD 主体 ID 的列表。 最多允许 5 个主体。 string[]
模式 定义被拒绝操作的 denySettings 模式。 “denyDelete”
'denyWriteAndDelete'
“none”(必需)

DeploymentParameterAutoGenerated

名字 描述 价值
参考 Azure Key Vault 参数引用。 KeyVaultParameterReferenceAutoGenerated
类型 值的类型。 字符串
价值 参数的输入值。 任何

DeploymentStackProperties

名字 描述 价值
actionOnUnmanage 定义在更新或删除部署堆栈后不再管理的资源的行为。 ActionOnUnmanage (必需)
bypassStackOutOfSyncError 用于绕过指示堆栈资源列表未正确同步的服务错误的标志。 bool
debugSetting 部署的调试设置。 DeploymentStacksDebugSetting
denySettings 定义堆栈部署的资源被锁定的方式。 DenySettings (必需)
deploymentScope 应在其中创建初始部署的范围。 如果未指定范围,则默认为部署堆栈的范围。 有效范围包括:管理组(格式:'/providers/Microsoft.Management/managementGroups/{managementGroupId}')、订阅(格式:'/subscriptions/{subscriptionId}')、资源组(格式:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}')。 字符串
描述 部署堆栈说明。 最大长度为 4096 个字符。 字符串

约束:
最大长度 = 4096
错误 错误详细信息。 ErrorDetail
参数 定义模板部署参数的名称和值对。 直接在请求中提供参数值而不是链接到现有参数文件时,请使用此元素。 使用 parametersLink 属性或 parameters 属性,但不能同时使用两者。 DeploymentStackPropertiesParameters
parametersLink 参数文件的 URI。 使用此元素链接到现有参数文件。 使用 parametersLink 属性或 parameters 属性,但不能同时使用两者。 DeploymentStacksParametersLink
模板 模板内容。 如果要直接在请求中传递模板语法,而不是链接到现有模板,请使用此元素。 它可以是 JObject 或格式正确的 JSON 字符串。 使用 templateLink 属性或模板属性,但不能同时使用这两者。 任何
templateLink 模板的 URI。 使用 templateLink 属性或模板属性,但不能同时使用这两者。 DeploymentStacksTemplateLink

DeploymentStackPropertiesParameters

名字 描述 价值

DeploymentStacksDebugSetting

名字 描述 价值
detailLevel 指定要记录以供调试的信息的类型。 允许的值不为 none、requestContent、responseContent,或两者均用逗号分隔的 requestContent 和 responseContent。 默认值为 none。 设置此值时,请仔细考虑在部署期间传入的信息类型。 通过记录有关请求或响应的信息,通过部署操作检索的敏感数据可能会公开。 字符串
名字 描述 价值
contentVersion 如果包含,则必须匹配模板中的 ContentVersion。 字符串
uri 参数文件的 URI。 string (必需)
名字 描述 价值
contentVersion 如果包含,则必须匹配模板中的 ContentVersion。 字符串
id 模板规格的 resourceId。使用 ID 或 uri 属性,但不能同时使用这两个属性。 字符串
queryString 要与 templateLink URI 一起使用的查询字符串(例如 SAS 令牌)。 字符串
relativePath relativePath 属性可用于在相对于父级的位置部署链接模板。 如果父模板与 TemplateSpec 链接,则会引用 TemplateSpec 中的项目。 如果父级与 URI 链接,则子部署将是父级和 relativePath URI 的组合。 字符串
uri 要部署的模板的 URI。 使用 URI 或 ID 属性,但不能同时使用这两个属性。 字符串

DeploymentStackTags

名字 描述 价值

ErrorDetail

名字 描述 价值

KeyVaultParameterReferenceAutoGenerated

名字 描述 价值
keyVault Azure Key Vault 参考。 KeyVaultReferenceAutoGenerated (必需)
secretName Azure Key Vault 机密名称。 string (必需)
secretVersion Azure Key Vault 机密版本。 字符串

KeyVaultReferenceAutoGenerated

名字 描述 价值
id Azure Key Vault resourceId。 string (必需)

Microsoft.Resources/deploymentStacks

名字 描述 价值
位置 部署堆栈的位置。 创建后无法更改它。 它必须是受支持的 Azure 位置之一。 字符串
名字 资源名称 字符串

约束:
最小长度 = 1
最大长度 = 90
模式 = ^[-\w\._\(\)]+$ (必需)
性能 部署堆栈属性。 DeploymentStackProperties
标签 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.Resources/deploymentStacks@2024-03-01”