Microsoft.Authorization policyExemptions
Bicep 資源定義
policyExemptions 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.Authorization/policyExemptions 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.Authorization/policyExemptions@2022-07-01-preview' = {
scope: resourceSymbolicName or scope
name: 'string'
properties: {
assignmentScopeValidation: 'string'
description: 'string'
displayName: 'string'
exemptionCategory: 'string'
expiresOn: 'string'
metadata: any(...)
policyAssignmentId: 'string'
policyDefinitionReferenceIds: [
'string'
]
resourceSelectors: [
{
name: 'string'
selectors: [
{
in: [
'string'
]
kind: 'string'
notIn: [
'string'
]
}
]
}
]
}
}
屬性值
Microsoft.Authorization/policyExemptions
名字 | 描述 | 價值 |
---|---|---|
名字 | 資源名稱 | 字串 (必要) |
性能 | 原則豁免的屬性。 | PolicyExemptionProperties (必要) |
範圍 | 在與部署範圍不同的範圍內建立資源時,請使用 。 | 將此屬性設定為資源的符號名稱,以套用 擴充資源。 |
PolicyExemptionProperties
名字 | 描述 | 價值 |
---|---|---|
assignmentScopeValidation | 驗證豁免的選項位於指派範圍或指派範圍內。 | 'Default' 'DoNotValidate' |
描述 | 原則豁免的描述。 | 字串 |
displayName | 原則豁免的顯示名稱。 | 字串 |
exemptionCategory | 原則豁免類別。 可能的值為「豁免」和「緩和」。 | 「已緩和」 “豁免”(必要) |
expiresOn | 原則豁免的到期日期和時間 (UTC ISO 8601 格式 yyyy-MM-ddTHH:mm:ssZ)。 | 字串 |
元數據 | 原則豁免元數據。 元數據是開放式物件,通常是索引鍵值組的集合。 | 任何 |
policyAssignmentId | 要豁免的原則指派標識碼。 | 字串 (必要) |
policyDefinitionReferenceIds | 當相關聯的原則指派是原則集定義的指派時,原則定義參考標識符清單。 | string[] |
resourceSelectors | 依資源屬性篩選原則的資源選取器清單。 | ResourceSelector[] |
ResourceSelector
名字 | 描述 | 價值 |
---|---|---|
名字 | 資源選取器的名稱。 | 字串 |
選擇 | 選取器表達式的清單。 | 選取器[] |
選擇器
名字 | 描述 | 價值 |
---|---|---|
在 | 要篩選的值清單。 | string[] |
類 | 選取器種類。 | 'policyDefinitionReferenceId' 'resourceLocation' 'resourceType' 'resourceWithoutLocation' |
notIn | 要篩選掉的值清單。 | string[] |
ARM 樣本資源定義
policyExemptions 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.Authorization/policyExemptions 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.Authorization/policyExemptions",
"apiVersion": "2022-07-01-preview",
"name": "string",
"properties": {
"assignmentScopeValidation": "string",
"description": "string",
"displayName": "string",
"exemptionCategory": "string",
"expiresOn": "string",
"metadata": {},
"policyAssignmentId": "string",
"policyDefinitionReferenceIds": [ "string" ],
"resourceSelectors": [
{
"name": "string",
"selectors": [
{
"in": [ "string" ],
"kind": "string",
"notIn": [ "string" ]
}
]
}
]
}
}
屬性值
Microsoft.Authorization/policyExemptions
名字 | 描述 | 價值 |
---|---|---|
apiVersion | API 版本 | '2022-07-01-preview' |
名字 | 資源名稱 | 字串 (必要) |
性能 | 原則豁免的屬性。 | PolicyExemptionProperties (必要) |
類型 | 資源類型 | 'Microsoft.Authorization/policyExemptions' |
PolicyExemptionProperties
名字 | 描述 | 價值 |
---|---|---|
assignmentScopeValidation | 驗證豁免的選項位於指派範圍或指派範圍內。 | 'Default' 'DoNotValidate' |
描述 | 原則豁免的描述。 | 字串 |
displayName | 原則豁免的顯示名稱。 | 字串 |
exemptionCategory | 原則豁免類別。 可能的值為「豁免」和「緩和」。 | 「已緩和」 “豁免”(必要) |
expiresOn | 原則豁免的到期日期和時間 (UTC ISO 8601 格式 yyyy-MM-ddTHH:mm:ssZ)。 | 字串 |
元數據 | 原則豁免元數據。 元數據是開放式物件,通常是索引鍵值組的集合。 | 任何 |
policyAssignmentId | 要豁免的原則指派標識碼。 | 字串 (必要) |
policyDefinitionReferenceIds | 當相關聯的原則指派是原則集定義的指派時,原則定義參考標識符清單。 | string[] |
resourceSelectors | 依資源屬性篩選原則的資源選取器清單。 | ResourceSelector[] |
ResourceSelector
名字 | 描述 | 價值 |
---|---|---|
名字 | 資源選取器的名稱。 | 字串 |
選擇 | 選取器表達式的清單。 | 選取器[] |
選擇器
名字 | 描述 | 價值 |
---|---|---|
在 | 要篩選的值清單。 | string[] |
類 | 選取器種類。 | 'policyDefinitionReferenceId' 'resourceLocation' 'resourceType' 'resourceWithoutLocation' |
notIn | 要篩選掉的值清單。 | string[] |
使用範例
Terraform (AzAPI 提供者) 資源定義
policyExemptions 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.Authorization/policyExemptions 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Authorization/policyExemptions@2022-07-01-preview"
name = "string"
parent_id = "string"
body = {
properties = {
assignmentScopeValidation = "string"
description = "string"
displayName = "string"
exemptionCategory = "string"
expiresOn = "string"
metadata = ?
policyAssignmentId = "string"
policyDefinitionReferenceIds = [
"string"
]
resourceSelectors = [
{
name = "string"
selectors = [
{
in = [
"string"
]
kind = "string"
notIn = [
"string"
]
}
]
}
]
}
}
}
屬性值
Microsoft.Authorization/policyExemptions
名字 | 描述 | 價值 |
---|---|---|
名字 | 資源名稱 | 字串 (必要) |
parent_id | 要套用此延伸模組資源之資源的標識碼。 | 字串 (必要) |
性能 | 原則豁免的屬性。 | PolicyExemptionProperties (必要) |
類型 | 資源類型 | “Microsoft.Authorization/policyExemptions@2022-07-01-preview” |
PolicyExemptionProperties
名字 | 描述 | 價值 |
---|---|---|
assignmentScopeValidation | 驗證豁免的選項位於指派範圍或指派範圍內。 | 'Default' 'DoNotValidate' |
描述 | 原則豁免的描述。 | 字串 |
displayName | 原則豁免的顯示名稱。 | 字串 |
exemptionCategory | 原則豁免類別。 可能的值為「豁免」和「緩和」。 | 「已緩和」 “豁免”(必要) |
expiresOn | 原則豁免的到期日期和時間 (UTC ISO 8601 格式 yyyy-MM-ddTHH:mm:ssZ)。 | 字串 |
元數據 | 原則豁免元數據。 元數據是開放式物件,通常是索引鍵值組的集合。 | 任何 |
policyAssignmentId | 要豁免的原則指派標識碼。 | 字串 (必要) |
policyDefinitionReferenceIds | 當相關聯的原則指派是原則集定義的指派時,原則定義參考標識符清單。 | string[] |
resourceSelectors | 依資源屬性篩選原則的資源選取器清單。 | ResourceSelector[] |
ResourceSelector
名字 | 描述 | 價值 |
---|---|---|
名字 | 資源選取器的名稱。 | 字串 |
選擇 | 選取器表達式的清單。 | 選取器[] |
選擇器
名字 | 描述 | 價值 |
---|---|---|
在 | 要篩選的值清單。 | string[] |
類 | 選取器種類。 | 'policyDefinitionReferenceId' 'resourceLocation' 'resourceType' 'resourceWithoutLocation' |
notIn | 要篩選掉的值清單。 | string[] |