microsoft.alertsManagement smartDetectorAlertRules
Bicep 資源定義
smartDetectorAlertRules 資源類型可以部署到:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
備註
如需部署監視解決方案的指引,請參閱 使用 Bicep 建立監視資源。
資源格式
若要建立 microsoft.alertsManagement/smartDetectorAlertRules 資源,請將下列 Bicep 新增至您的範本。
resource symbolicname 'microsoft.alertsManagement/smartDetectorAlertRules@2021-04-01' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
properties: {
actionGroups: {
customEmailSubject: 'string'
customWebhookPayload: 'string'
groupIds: [
'string'
]
}
description: 'string'
detector: {
id: 'string'
parameters: {}
}
frequency: 'string'
scope: [
'string'
]
severity: 'string'
state: 'string'
throttling: {
duration: 'string'
}
}
}
屬性值
smartDetectorAlertRules
名稱 | 描述 | 值 |
---|---|---|
NAME | 資源名稱 | 需要字串 () |
location | 資源位置。 | 字串 |
tags | 資源標籤。 | 標記名稱和值的字典。 請參閱 範本中的標籤 |
properties | 警示規則的屬性。 | AlertRuleProperties |
AlertRuleProperties
名稱 | 描述 | 值 |
---|---|---|
actionGroups | 警示規則動作。 | 需要 ActionGroupsInformation () |
description | 警示規則描述。 | 字串 |
探測器 | 警示規則的偵測器。 | 需要偵測器 () |
frequency | ISO8601 格式的警示規則頻率。 時間細微性必須以分鐘為單位,且最小值為 1 分鐘,視偵測器而定。 | 需要字串 () |
scope | 警示規則資源範圍。 | string[] (必要) |
severity | 警示規則嚴重性。 | 'Sev0' 'Sev1' 'Sev2' 'Sev3' 'Sev4' (必要) |
state | 警示規則狀態。 | 'Disabled' 必要 ('Enabled') |
節流 | 警示規則節流資訊。 | ThrottlingInformation |
ActionGroupsInformation
名稱 | 描述 | 值 |
---|---|---|
customEmailSubject | 選用的自訂電子郵件主體,用於電子郵件通知。 | 字串 |
customWebhookPayload | 要在 Web 攔截通知中使用的選擇性自訂 Web 攔截承載。 | 字串 |
groupIds | 動作群組資源識別碼。 | string[] (必要) |
偵測器
名稱 | 描述 | 值 |
---|---|---|
id | 偵測器識別碼。 | 需要字串 () |
parameters | 偵測器的參數。' | object |
ThrottlingInformation
名稱 | 描述 | 值 |
---|---|---|
duration | ISO8601 格式的必要持續時間 () 等待,然後再再次通知警示規則。 時間細微性必須以分鐘為單位,最小值為 0 分鐘 | 字串 |
ARM 範本資源定義
smartDetectorAlertRules 資源類型可以部署到:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
備註
如需部署監視解決方案的指引,請參閱 使用 Bicep 建立監視資源。
資源格式
若要建立 microsoft.alertsManagement/smartDetectorAlertRules 資源,請將下列 JSON 新增至範本。
{
"type": "microsoft.alertsManagement/smartDetectorAlertRules",
"apiVersion": "2021-04-01",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"actionGroups": {
"customEmailSubject": "string",
"customWebhookPayload": "string",
"groupIds": [ "string" ]
},
"description": "string",
"detector": {
"id": "string",
"parameters": {}
},
"frequency": "string",
"scope": [ "string" ],
"severity": "string",
"state": "string",
"throttling": {
"duration": "string"
}
}
}
屬性值
smartDetectorAlertRules
名稱 | 描述 | 值 |
---|---|---|
type | 資源類型 | 'microsoft.alertsManagement/smartDetectorAlertRules' |
apiVersion | 資源 API 版本 | '2021-04-01' |
NAME | 資源名稱 | 需要字串 () |
location | 資源位置。 | 字串 |
tags | 資源標籤。 | 標記名稱和值的字典。 請參閱 範本中的標籤 |
properties | 警示規則的屬性。 | AlertRuleProperties |
AlertRuleProperties
名稱 | 描述 | 值 |
---|---|---|
actionGroups | 警示規則動作。 | 需要 ActionGroupsInformation () |
description | 警示規則描述。 | 字串 |
探測器 | 警示規則的偵測器。 | 需要偵測器 () |
frequency | ISO8601 格式的警示規則頻率。 時間細微性必須以分鐘為單位,且最小值為 1 分鐘,視偵測器而定。 | 需要字串 () |
scope | 警示規則資源範圍。 | string[] (必要) |
severity | 警示規則嚴重性。 | 'Sev0' 'Sev1' 'Sev2' 'Sev3' 'Sev4' (必要) |
state | 警示規則狀態。 | 'Disabled' 必要 ('Enabled') |
節流 | 警示規則節流資訊。 | ThrottlingInformation |
ActionGroupsInformation
名稱 | 描述 | 值 |
---|---|---|
customEmailSubject | 選用的自訂電子郵件主體,用於電子郵件通知。 | 字串 |
customWebhookPayload | 要在 Web 攔截通知中使用的選擇性自訂 Web 攔截承載。 | 字串 |
groupIds | 動作群組資源識別碼。 | string[] (必要) |
偵測器
名稱 | 描述 | 值 |
---|---|---|
id | 偵測器識別碼。 | 需要字串 () |
parameters | 偵測器的參數。' | object |
ThrottlingInformation
名稱 | 描述 | 值 |
---|---|---|
duration | ISO8601 格式的必要持續時間 () 等待,然後再再次通知警示規則。 時間細微性必須以分鐘為單位,最小值為 0 分鐘 | 字串 |
Terraform (AzAPI 提供者) 資源定義
smartDetectorAlertRules 資源類型可以部署到:
- 資源群組
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 microsoft.alertsManagement/smartDetectorAlertRules 資源,請將下列 Terraform 新增至您的範本。
resource "azapi_resource" "symbolicname" {
type = "microsoft.alertsManagement/smartDetectorAlertRules@2021-04-01"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
body = jsonencode({
properties = {
actionGroups = {
customEmailSubject = "string"
customWebhookPayload = "string"
groupIds = [
"string"
]
}
description = "string"
detector = {
id = "string"
parameters = {}
}
frequency = "string"
scope = [
"string"
]
severity = "string"
state = "string"
throttling = {
duration = "string"
}
}
})
}
屬性值
smartDetectorAlertRules
名稱 | 描述 | 值 |
---|---|---|
type | 資源類型 | 「microsoft.alertsManagement/smartDetectorAlertRules@2021-04-01」 |
NAME | 資源名稱 | 需要字串 () |
location | 資源位置。 | 字串 |
parent_id | 若要部署至資源群組,請使用該資源群組的識別碼。 | 需要字串 () |
tags | 資源標籤。 | 標記名稱和值的字典。 |
properties | 警示規則的屬性。 | AlertRuleProperties |
AlertRuleProperties
名稱 | 描述 | 值 |
---|---|---|
actionGroups | 警示規則動作。 | 需要 ActionGroupsInformation () |
description | 警示規則描述。 | 字串 |
探測器 | 警示規則的偵測器。 | 需要偵測器 () |
frequency | ISO8601 格式的警示規則頻率。 時間細微性必須以分鐘為單位,且最小值為 1 分鐘,視偵測器而定。 | 需要字串 () |
scope | 警示規則資源範圍。 | string[] (必要) |
severity | 警示規則嚴重性。 | 「Sev0」 「Sev1」 「Sev2」 「Sev3」 「Sev4」 (必要) |
state | 警示規則狀態。 | 「Disabled」 「已啟用」 (必要) |
節流 | 警示規則節流資訊。 | ThrottlingInformation |
ActionGroupsInformation
名稱 | 描述 | 值 |
---|---|---|
customEmailSubject | 選用的自訂電子郵件主體,用於電子郵件通知。 | 字串 |
customWebhookPayload | 要在 Web 攔截通知中使用的選擇性自訂 Web 攔截承載。 | 字串 |
groupIds | 動作群組資源識別碼。 | string[] (必要) |
偵測器
名稱 | 描述 | 值 |
---|---|---|
id | 偵測器識別碼。 | 需要字串 () |
parameters | 偵測器的參數。' | object |
ThrottlingInformation
名稱 | 描述 | 值 |
---|---|---|
duration | ISO8601 格式的必要持續時間 () 等待,然後再再次通知警示規則。 時間細微性必須以分鐘為單位,最小值為 0 分鐘 | 字串 |