你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Bicep 资源定义
可以使用目标操作部署修正资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.PolicyInsights/remediations 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.PolicyInsights/remediations@2018-07-01-preview' = {
scope: resourceSymbolicName or scope
name: 'string'
properties: {
deploymentStatus: {
failedDeployments: int
successfulDeployments: int
totalDeployments: int
}
filters: {
locations: [
'string'
]
}
policyAssignmentId: 'string'
policyDefinitionReferenceId: 'string'
}
}
属性值
名字 |
描述 |
价值 |
failedDeployments |
修正失败所需的部署数。 |
int |
successfulDeployments |
修正成功所需的部署数。 |
int |
totalDeployments |
修正所需的部署数。 |
int |
名字 |
描述 |
价值 |
地点 |
要修正的资源位置。 |
string[] |
名字 |
描述 |
价值 |
deploymentStatus |
修正创建的所有部署的部署状态摘要。 |
RemediationDeploymentSummary |
过滤 器 |
将应用于确定要修正的资源的筛选器。 |
RemediationFilters |
policyAssignmentId |
应修正的策略分配的资源 ID。 |
字符串 |
policyDefinitionReferenceId |
应修正的单个定义的策略定义引用 ID。 当正在修正的策略分配分配分配策略集定义时是必需的。 |
字符串 |
ARM 模板资源定义
可以使用目标操作部署修正资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.PolicyInsights/remediations 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.PolicyInsights/remediations",
"apiVersion": "2018-07-01-preview",
"name": "string",
"properties": {
"deploymentStatus": {
"failedDeployments": "int",
"successfulDeployments": "int",
"totalDeployments": "int"
},
"filters": {
"locations": [ "string" ]
},
"policyAssignmentId": "string",
"policyDefinitionReferenceId": "string"
}
}
属性值
名字 |
描述 |
价值 |
apiVersion |
API 版本 |
'2018-07-01-preview' |
名字 |
资源名称 |
string (必需) |
性能 |
修正的属性。 |
RemediationProperties |
类型 |
资源类型 |
“Microsoft.PolicyInsights/remediations” |
名字 |
描述 |
价值 |
failedDeployments |
修正失败所需的部署数。 |
int |
successfulDeployments |
修正成功所需的部署数。 |
int |
totalDeployments |
修正所需的部署数。 |
int |
名字 |
描述 |
价值 |
地点 |
要修正的资源位置。 |
string[] |
名字 |
描述 |
价值 |
deploymentStatus |
修正创建的所有部署的部署状态摘要。 |
RemediationDeploymentSummary |
过滤 器 |
将应用于确定要修正的资源的筛选器。 |
RemediationFilters |
policyAssignmentId |
应修正的策略分配的资源 ID。 |
字符串 |
policyDefinitionReferenceId |
应修正的单个定义的策略定义引用 ID。 当正在修正的策略分配分配分配策略集定义时是必需的。 |
字符串 |
可以使用目标操作部署修正资源类型:
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
若要创建 Microsoft.PolicyInsights/remediations 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.PolicyInsights/remediations@2018-07-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
deploymentStatus = {
failedDeployments = int
successfulDeployments = int
totalDeployments = int
}
filters = {
locations = [
"string"
]
}
policyAssignmentId = "string"
policyDefinitionReferenceId = "string"
}
})
}
属性值
名字 |
描述 |
价值 |
名字 |
资源名称 |
string (必需) |
parent_id |
要向其应用此扩展资源的资源的 ID。 |
string (必需) |
性能 |
修正的属性。 |
RemediationProperties |
类型 |
资源类型 |
“Microsoft.PolicyInsights/remediations@2018-07-01-preview” |
名字 |
描述 |
价值 |
failedDeployments |
修正失败所需的部署数。 |
int |
successfulDeployments |
修正成功所需的部署数。 |
int |
totalDeployments |
修正所需的部署数。 |
int |
名字 |
描述 |
价值 |
地点 |
要修正的资源位置。 |
string[] |
名字 |
描述 |
价值 |
deploymentStatus |
修正创建的所有部署的部署状态摘要。 |
RemediationDeploymentSummary |
过滤 器 |
将应用于确定要修正的资源的筛选器。 |
RemediationFilters |
policyAssignmentId |
应修正的策略分配的资源 ID。 |
字符串 |
policyDefinitionReferenceId |
应修正的单个定义的策略定义引用 ID。 当正在修正的策略分配分配分配策略集定义时是必需的。 |
字符串 |