对于 Bicep,请考虑 使用模块 而不是此资源类型。
Bicep 资源定义
可以使用目标作部署部署资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.Resources/deployments 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.Resources/deployments@2025-04-01' = {
scope: resourceSymbolicName or scope
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
___location: 'string'
name: 'string'
properties: {
debugSetting: {
detailLevel: 'string'
}
expressionEvaluationOptions: {
scope: 'string'
}
extensionConfigs: {
{customized property}: {
{customized property}: {
keyVaultReference: {
keyVault: {
id: 'string'
}
secretName: 'string'
secretVersion: 'string'
}
value: any(...)
}
}
}
externalInputDefinitions: {
{customized property}: {
config: any(...)
kind: 'string'
}
}
externalInputs: {
{customized property}: {
value: any(...)
}
}
mode: 'string'
onErrorDeployment: {
deploymentName: 'string'
type: 'string'
}
parameters: {
{customized property}: {
expression: 'string'
reference: {
keyVault: {
id: 'string'
}
secretName: 'string'
secretVersion: 'string'
}
value: any(...)
}
}
parametersLink: {
contentVersion: 'string'
uri: 'string'
}
template: any(...)
templateLink: {
contentVersion: 'string'
id: 'string'
queryString: 'string'
relativePath: 'string'
uri: 'string'
}
validationLevel: 'string'
}
tags: {
{customized property}: 'string'
}
}
属性值
DebugSetting
名称 |
DESCRIPTION |
价值 |
detailLevel |
指定要记录以供调试的信息的类型。 允许的值不为 none、requestContent、responseContent,或两者均用逗号分隔的 requestContent 和 responseContent。 默认值为 none。 设置此值时,请仔细考虑在部署期间传入的信息类型。 通过记录有关请求或响应的信息,可能会公开通过部署作检索的敏感数据。 |
字符串 |
DeploymentExtensionConfig
DeploymentExtensionConfigItem
DeploymentExternalInput (部署外部输入)
名称 |
DESCRIPTION |
价值 |
价值 |
外部输入值。 |
任何(必需) |
DeploymentExternalInputDefinition
名称 |
DESCRIPTION |
价值 |
配置 |
外部输入的配置。 |
任何 |
类 |
外部输入的类型。 |
string (必需) |
部署标识
DeploymentIdentityUserAssignedIdentities
DeploymentParameter
DeploymentPropertiesExtensionConfigs
DeploymentPropertiesOrDeploymentPropertiesExtended
DeploymentProperties参数
ExpressionEvaluationOptions
名称 |
DESCRIPTION |
价值 |
范围 |
用于评估嵌套模板中的参数、变量和函数的作用域。 |
“内部” “NotSpecified” “外部” |
KeyVaultParameterReference
名称 |
DESCRIPTION |
价值 |
keyVault |
Azure Key Vault 参考。 |
KeyVaultReference(必需) |
秘密名称 |
Azure Key Vault 机密名称。 |
string (必需) |
秘密版本 |
Azure Key Vault 机密版本。 |
字符串 |
KeyVaultReference
名称 |
DESCRIPTION |
价值 |
id |
Azure Key Vault 资源 ID。 |
string (必需) |
Microsoft.Resources/deployments
OnErrorDeploymentOrOnErrorDeploymentExtended
名称 |
DESCRIPTION |
价值 |
deploymentName (部署名称) |
要用于错误案例的部署。 |
字符串 |
类型 |
错误行为类型的部署。 可能的值为 LastSuccessful 和 SpecificDeployment。 |
“LastSuccessful” “SpecificDeployment” |
ParametersLink
名称 |
DESCRIPTION |
价值 |
contentVersion |
如果包含,则必须匹配模板中的 ContentVersion。 |
字符串 |
uri |
参数文件的 URI。 |
string (必需) |
TemplateLink
名称 |
DESCRIPTION |
价值 |
contentVersion |
如果包含,则必须匹配模板中的 ContentVersion。 |
字符串 |
id |
模板规格的资源 ID。请使用 ID 或 uri 属性,但不能同时使用这两个属性。 |
字符串 |
queryString |
要与 templateLink URI 一起使用的查询字符串(例如 SAS 令牌)。 |
字符串 |
relativePath |
relativePath 属性可用于在相对于父级的位置部署链接模板。 如果父模板与 TemplateSpec 链接,则会引用 TemplateSpec 中的项目。 如果父级已链接到 URI,则子部署将是父 URI 和 relativePath URI 的组合 |
字符串 |
uri |
要部署的模板的 URI。 使用 URI 或 ID 属性,但不能同时使用这两个属性。 |
字符串 |
UserAssignedIdentity
ARM 模板资源定义
可以使用目标作部署部署资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.Resources/deployments 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2025-04-01",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"___location": "string",
"properties": {
"debugSetting": {
"detailLevel": "string"
},
"expressionEvaluationOptions": {
"scope": "string"
},
"extensionConfigs": {
"{customized property}": {
"{customized property}": {
"keyVaultReference": {
"keyVault": {
"id": "string"
},
"secretName": "string",
"secretVersion": "string"
},
"value": {}
}
}
},
"externalInputDefinitions": {
"{customized property}": {
"config": {},
"kind": "string"
}
},
"externalInputs": {
"{customized property}": {
"value": {}
}
},
"mode": "string",
"onErrorDeployment": {
"deploymentName": "string",
"type": "string"
},
"parameters": {
"{customized property}": {
"expression": "string",
"reference": {
"keyVault": {
"id": "string"
},
"secretName": "string",
"secretVersion": "string"
},
"value": {}
}
},
"parametersLink": {
"contentVersion": "string",
"uri": "string"
},
"template": {},
"templateLink": {
"contentVersion": "string",
"id": "string",
"queryString": "string",
"relativePath": "string",
"uri": "string"
},
"validationLevel": "string"
},
"tags": {
"{customized property}": "string"
}
}
属性值
DebugSetting
名称 |
DESCRIPTION |
价值 |
detailLevel |
指定要记录以供调试的信息的类型。 允许的值不为 none、requestContent、responseContent,或两者均用逗号分隔的 requestContent 和 responseContent。 默认值为 none。 设置此值时,请仔细考虑在部署期间传入的信息类型。 通过记录有关请求或响应的信息,可能会公开通过部署作检索的敏感数据。 |
字符串 |
DeploymentExtensionConfig
DeploymentExtensionConfigItem
DeploymentExternalInput (部署外部输入)
名称 |
DESCRIPTION |
价值 |
价值 |
外部输入值。 |
任何(必需) |
DeploymentExternalInputDefinition
名称 |
DESCRIPTION |
价值 |
配置 |
外部输入的配置。 |
任何 |
类 |
外部输入的类型。 |
string (必需) |
部署标识
DeploymentIdentityUserAssignedIdentities
DeploymentParameter
DeploymentPropertiesExtensionConfigs
DeploymentPropertiesOrDeploymentPropertiesExtended
DeploymentProperties参数
ExpressionEvaluationOptions
名称 |
DESCRIPTION |
价值 |
范围 |
用于评估嵌套模板中的参数、变量和函数的作用域。 |
“内部” “NotSpecified” “外部” |
KeyVaultParameterReference
名称 |
DESCRIPTION |
价值 |
keyVault |
Azure Key Vault 参考。 |
KeyVaultReference(必需) |
秘密名称 |
Azure Key Vault 机密名称。 |
string (必需) |
秘密版本 |
Azure Key Vault 机密版本。 |
字符串 |
KeyVaultReference
名称 |
DESCRIPTION |
价值 |
id |
Azure Key Vault 资源 ID。 |
string (必需) |
Microsoft.Resources/deployments
名称 |
DESCRIPTION |
价值 |
apiVersion |
API 版本 |
'2025-04-01' |
身份 |
部署的托管标识配置。 |
部署标识 |
位置 |
用于存储部署数据的位置。 |
字符串 |
姓名 |
资源名称 |
字符串
约束: 最小长度 = 1 最大长度 = 64 模式 = ^[-\w\._\(\)]+$ (必需) |
属性 |
部署属性。 |
DeploymentPropertiesOrDeploymentPropertiesExtended (必需) |
标签 |
资源标记 |
标记名称和值的字典。 请参阅模板 中的 标记 |
类型 |
资源类型 |
“Microsoft.Resources/deployments” |
OnErrorDeploymentOrOnErrorDeploymentExtended
名称 |
DESCRIPTION |
价值 |
deploymentName (部署名称) |
要用于错误案例的部署。 |
字符串 |
类型 |
错误行为类型的部署。 可能的值为 LastSuccessful 和 SpecificDeployment。 |
“LastSuccessful” “SpecificDeployment” |
ParametersLink
名称 |
DESCRIPTION |
价值 |
contentVersion |
如果包含,则必须匹配模板中的 ContentVersion。 |
字符串 |
uri |
参数文件的 URI。 |
string (必需) |
TemplateLink
名称 |
DESCRIPTION |
价值 |
contentVersion |
如果包含,则必须匹配模板中的 ContentVersion。 |
字符串 |
id |
模板规格的资源 ID。请使用 ID 或 uri 属性,但不能同时使用这两个属性。 |
字符串 |
queryString |
要与 templateLink URI 一起使用的查询字符串(例如 SAS 令牌)。 |
字符串 |
relativePath |
relativePath 属性可用于在相对于父级的位置部署链接模板。 如果父模板与 TemplateSpec 链接,则会引用 TemplateSpec 中的项目。 如果父级已链接到 URI,则子部署将是父 URI 和 relativePath URI 的组合 |
字符串 |
uri |
要部署的模板的 URI。 使用 URI 或 ID 属性,但不能同时使用这两个属性。 |
字符串 |
UserAssignedIdentity
用法示例
可以使用目标作部署部署资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.Resources/deployments 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Resources/deployments@2025-04-01"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
___location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
debugSetting = {
detailLevel = "string"
}
expressionEvaluationOptions = {
scope = "string"
}
extensionConfigs = {
{customized property} = {
{customized property} = {
keyVaultReference = {
keyVault = {
id = "string"
}
secretName = "string"
secretVersion = "string"
}
value = ?
}
}
}
externalInputDefinitions = {
{customized property} = {
config = ?
kind = "string"
}
}
externalInputs = {
{customized property} = {
value = ?
}
}
mode = "string"
onErrorDeployment = {
deploymentName = "string"
type = "string"
}
parameters = {
{customized property} = {
expression = "string"
reference = {
keyVault = {
id = "string"
}
secretName = "string"
secretVersion = "string"
}
value = ?
}
}
parametersLink = {
contentVersion = "string"
uri = "string"
}
template = ?
templateLink = {
contentVersion = "string"
id = "string"
queryString = "string"
relativePath = "string"
uri = "string"
}
validationLevel = "string"
}
}
}
属性值
DebugSetting
名称 |
DESCRIPTION |
价值 |
detailLevel |
指定要记录以供调试的信息的类型。 允许的值不为 none、requestContent、responseContent,或两者均用逗号分隔的 requestContent 和 responseContent。 默认值为 none。 设置此值时,请仔细考虑在部署期间传入的信息类型。 通过记录有关请求或响应的信息,可能会公开通过部署作检索的敏感数据。 |
字符串 |
DeploymentExtensionConfig
DeploymentExtensionConfigItem
DeploymentExternalInput (部署外部输入)
名称 |
DESCRIPTION |
价值 |
价值 |
外部输入值。 |
任何(必需) |
DeploymentExternalInputDefinition
名称 |
DESCRIPTION |
价值 |
配置 |
外部输入的配置。 |
任何 |
类 |
外部输入的类型。 |
string (必需) |
部署标识
DeploymentIdentityUserAssignedIdentities
DeploymentParameter
DeploymentPropertiesExtensionConfigs
DeploymentPropertiesOrDeploymentPropertiesExtended
DeploymentProperties参数
ExpressionEvaluationOptions
名称 |
DESCRIPTION |
价值 |
范围 |
用于评估嵌套模板中的参数、变量和函数的作用域。 |
“内部” “NotSpecified” “外部” |
KeyVaultParameterReference
名称 |
DESCRIPTION |
价值 |
keyVault |
Azure Key Vault 参考。 |
KeyVaultReference(必需) |
秘密名称 |
Azure Key Vault 机密名称。 |
string (必需) |
秘密版本 |
Azure Key Vault 机密版本。 |
字符串 |
KeyVaultReference
名称 |
DESCRIPTION |
价值 |
id |
Azure Key Vault 资源 ID。 |
string (必需) |
Microsoft.Resources/deployments
名称 |
DESCRIPTION |
价值 |
身份 |
部署的托管标识配置。 |
部署标识 |
位置 |
用于存储部署数据的位置。 |
字符串 |
姓名 |
资源名称 |
字符串
约束: 最小长度 = 1 最大长度 = 64 模式 = ^[-\w\._\(\)]+$ (必需) |
parent_id |
要向其应用此扩展资源的资源的 ID。 |
string (必需) |
属性 |
部署属性。 |
DeploymentPropertiesOrDeploymentPropertiesExtended (必需) |
标签 |
资源标记 |
标记名称和值的字典。 |
类型 |
资源类型 |
“Microsoft.资源/deployments@2025-04-01” |
OnErrorDeploymentOrOnErrorDeploymentExtended
名称 |
DESCRIPTION |
价值 |
deploymentName (部署名称) |
要用于错误案例的部署。 |
字符串 |
类型 |
错误行为类型的部署。 可能的值为 LastSuccessful 和 SpecificDeployment。 |
“LastSuccessful” “SpecificDeployment” |
ParametersLink
名称 |
DESCRIPTION |
价值 |
contentVersion |
如果包含,则必须匹配模板中的 ContentVersion。 |
字符串 |
uri |
参数文件的 URI。 |
string (必需) |
TemplateLink
名称 |
DESCRIPTION |
价值 |
contentVersion |
如果包含,则必须匹配模板中的 ContentVersion。 |
字符串 |
id |
模板规格的资源 ID。请使用 ID 或 uri 属性,但不能同时使用这两个属性。 |
字符串 |
queryString |
要与 templateLink URI 一起使用的查询字符串(例如 SAS 令牌)。 |
字符串 |
relativePath |
relativePath 属性可用于在相对于父级的位置部署链接模板。 如果父模板与 TemplateSpec 链接,则会引用 TemplateSpec 中的项目。 如果父级已链接到 URI,则子部署将是父 URI 和 relativePath URI 的组合 |
字符串 |
uri |
要部署的模板的 URI。 使用 URI 或 ID 属性,但不能同时使用这两个属性。 |
字符串 |
UserAssignedIdentity