Microsoft.AlertsManagement actionRules

Bicep リソース定義

actionRules リソースの種類は、次の目的でデプロイできます。

各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。

リソース形式

Microsoft.AlertsManagement/actionRules リソースを作成するには、次の Bicep をテンプレートに追加します。

resource symbolicname 'Microsoft.AlertsManagement/actionRules@2021-08-08' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    actions: [
      {
        actionType: 'string'
        // For remaining properties, see Action objects
      }
    ]
    conditions: [
      {
        field: 'string'
        operator: 'string'
        values: [
          'string'
        ]
      }
    ]
    description: 'string'
    enabled: bool
    schedule: {
      effectiveFrom: 'string'
      effectiveUntil: 'string'
      recurrences: [
        {
          endTime: 'string'
          startTime: 'string'
          recurrenceType: 'string'
          // For remaining properties, see Recurrence objects
        }
      ]
      timeZone: 'string'
    }
    scopes: [
      'string'
    ]
  }
}

アクション オブジェクト

actionType プロパティを設定して、オブジェクトの種類を指定します。

AddActionGroups の場合は、次を使用します。

  actionType: 'AddActionGroups'
  actionGroupIds: [
    'string'
  ]

RemoveAllActionGroups の場合は、次の値を使用します。

  actionType: 'RemoveAllActionGroups'

Recurrence オブジェクト

recurrenceType プロパティを設定して、オブジェクトの種類を指定します。

Daily の場合は、次の値を使用します。

  recurrenceType: 'Daily'

[月単位] の場合は、次の値を使用します。

  recurrenceType: 'Monthly'
  daysOfMonth: [
    int
  ]

週単位の場合は、次の値を使用します。

  recurrenceType: 'Weekly'
  daysOfWeek: [
    'string'
  ]

プロパティの値

actionRules

名前 説明
name リソース名 string (必須)
location リソースの場所 string (必須)
tags リソース タグ タグ名と値のディクショナリ。 「テンプレートのタグ」を参照してください
properties アラート処理ルールのプロパティ。 AlertProcessingRuleProperties

AlertProcessingRuleProperties

名前 説明
actions 適用するアクション。 Action[] (必須)
条件 アラートをフィルター処理する条件。 Condition[]
description アラート処理ルールの説明。 string
enabled 指定されたアラート処理ルールが有効か無効か示します。 [bool]
schedule アラート処理ルールのスケジュール設定。 [スケジュール]
スコープ アラート処理ルールが適用されるスコープ。 string[] (必須)

アクション

名前 説明
actionType オブジェクトの種類を設定する AddActionGroups
RemoveAllActionGroups (必須)

AddActionGroups

名前 説明
actionType 適用する必要があるアクション。 'AddActionGroups' (必須)
actionGroupIds アラート処理ルールに追加するアクション グループ ID の一覧。 string[] (必須)

RemoveAllActionGroups

名前 説明
actionType 適用する必要があるアクション。 'RemoveAllActionGroups' (必須)

条件

名前 説明
フィールド 特定の条件のフィールド。 'AlertContext'
'AlertRuleId'
'AlertRuleName'
'Description'
'MonitorCondition'
'MonitorService'
'Severity'
'SignalType'
'TargetResource'
'TargetResourceGroup'
'TargetResourceType'
operator 特定の条件の演算子。 'Contains'
'DoesNotContain'
'Equals'
'NotEquals'
特定の条件に一致する値の一覧。 string[]

スケジュール

名前 説明
effectiveFrom スケジュールは、時間から有効になります。 タイムゾーンサフィックスのない ISO-8601 形式でDate-Timeします。 string
effectiveUntil スケジュールは時間まで有効です。 タイムゾーンサフィックスのない ISO-8601 形式でDate-Timeします。 string
再発 繰り返しの一覧。 Recurrence[]
timeZone タイム ゾーンのスケジュール設定。 string

繰り返し

名前 説明
endTime 繰り返しの終了時刻。 string
startTime 繰り返しの開始時刻。 string
recurrenceType オブジェクトの種類を設定する 毎日
毎月
毎週 (必須)

DailyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 'Daily' (必須)

MonthlyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 '月単位' (必須)
daysOfMonth 毎月の定期的なパターンの値を指定します。 int[] (必須)

WeeklyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 'Weekly' (必須)
daysOfWeek 週単位の繰り返しパターンの値を指定します。 次のいずれかを含む文字列配列:
'Friday'
'Monday'
'Saturday'
'日曜日'
'木曜日'
'Tuesday'
'水曜' (必須)

クイック スタート テンプレート

次のクイックスタート テンプレートでは、このリソースの種類をデプロイします。

Template 説明
Azure Monitor を使用してバックアップ アラートの通知を設定する

Azure へのデプロイ
このテンプレートを使用すると、アラート処理ルールとアクション グループをデプロイすることで、Azure Monitor を使用して Recovery Services コンテナーの電子メール通知を設定できます

ARM テンプレート リソース定義

actionRules リソースの種類は、次の目的でデプロイできます。

各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。

リソース形式

Microsoft.AlertsManagement/actionRules リソースを作成するには、次の JSON をテンプレートに追加します。

{
  "type": "Microsoft.AlertsManagement/actionRules",
  "apiVersion": "2021-08-08",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "actions": [
      {
        "actionType": "string"
        // For remaining properties, see Action objects
      }
    ],
    "conditions": [
      {
        "field": "string",
        "operator": "string",
        "values": [ "string" ]
      }
    ],
    "description": "string",
    "enabled": "bool",
    "schedule": {
      "effectiveFrom": "string",
      "effectiveUntil": "string",
      "recurrences": [
        {
          "endTime": "string",
          "startTime": "string",
          "recurrenceType": "string"
          // For remaining properties, see Recurrence objects
        }
      ],
      "timeZone": "string"
    },
    "scopes": [ "string" ]
  }
}

アクション オブジェクト

actionType プロパティを設定して、オブジェクトの種類を指定します。

AddActionGroups の場合は、次を使用します。

  "actionType": "AddActionGroups",
  "actionGroupIds": [ "string" ]

RemoveAllActionGroups の場合は、次の値を使用します。

  "actionType": "RemoveAllActionGroups"

Recurrence オブジェクト

recurrenceType プロパティを設定して、オブジェクトの種類を指定します。

Daily の場合は、次の値を使用します。

  "recurrenceType": "Daily"

月単位の場合は、次の値を使用します。

  "recurrenceType": "Monthly",
  "daysOfMonth": [ "int" ]

週単位の場合は、次の値を使用します。

  "recurrenceType": "Weekly",
  "daysOfWeek": [ "string" ]

プロパティの値

actionRules

名前 説明
type リソースの種類 'Microsoft.AlertsManagement/actionRules'
apiVersion リソース API のバージョン '2021-08-08'
name リソース名 string (必須)
location リソースの場所 string (必須)
tags リソース タグ タグの名前と値のディクショナリ。 「テンプレート内のタグ」を参照してください
properties アラート処理ルールのプロパティ。 AlertProcessingRuleProperties

AlertProcessingRuleProperties

名前 説明
actions 適用するアクション。 Action[] (必須)
条件 アラートをフィルター処理する条件。 Condition[]
description アラート処理ルールの説明。 string
enabled 指定されたアラート処理ルールが有効または無効になっているかどうかを示します。 [bool]
schedule アラート処理ルールのスケジュール設定。 [スケジュール]
スコープ アラート処理ルールが適用されるスコープ。 string[] (必須)

アクション

名前 説明
actionType オブジェクトの種類を設定する AddActionGroups
RemoveAllActionGroups (必須)

AddActionGroups

名前 説明
actionType 適用する必要があるアクション。 'AddActionGroups' (必須)
actionGroupIds アラート処理ルールに追加するアクション グループ ID の一覧。 string[] (必須)

RemoveAllActionGroups

名前 説明
actionType 適用する必要があるアクション。 'RemoveAllActionGroups' (必須)

条件

名前 説明
フィールド 特定の条件のフィールド。 'AlertContext'
'AlertRuleId'
'AlertRuleName'
'Description'
'MonitorCondition'
'MonitorService'
'Severity'
'SignalType'
'TargetResource'
'TargetResourceGroup'
'TargetResourceType'
operator 指定された条件の演算子。 'Contains'
'DoesNotContain'
'Equals'
'NotEquals'
指定された条件に一致する値の一覧。 string[]

スケジュール

名前 説明
effectiveFrom スケジュールは時間から有効になります。 iso-8601 形式でタイムゾーンサフィックスを付けずにDate-Timeします。 string
effectiveUntil スケジュールは時間まで有効です。 iso-8601 形式でタイムゾーンサフィックスを付けずにDate-Timeします。 string
再発 繰り返しの一覧。 Recurrence[]
timeZone タイム ゾーンのスケジュール設定。 string

繰り返し

名前 説明
endTime 繰り返しの終了時刻。 string
startTime 繰り返しの開始時刻。 string
recurrenceType オブジェクトの種類を設定する 毎日
毎月
週単位 (必須)

DailyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 'Daily' (必須)

MonthlyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 '月単位' (必須)
daysOfMonth 毎月の繰り返しパターンの値を指定します。 int[] (必須)

WeeklyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 'Weekly' (必須)
daysOfWeek 週単位の繰り返しパターンの値を指定します。 次のいずれかを含む文字列配列:
'Friday'
'Monday'
'土曜日'
'Sunday'
'木曜日'
'火曜日'
'水曜日' (必須)

クイック スタート テンプレート

次のクイックスタート テンプレートでは、このリソースの種類をデプロイします。

Template 説明
Azure Monitor を使用したバックアップ アラートのセットアップ通知

Azure へのデプロイ
このテンプレートを使用すると、アラート処理ルールとアクション グループをデプロイすることで、Azure Monitor を使用して Recovery Services コンテナーの電子メール通知を設定できます

Terraform (AzAPI プロバイダー) リソース定義

actionRules リソースの種類は、次の目的でデプロイできます。

  • リソース グループ

各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。

リソース形式

Microsoft.AlertsManagement/actionRules リソースを作成するには、次の Terraform をテンプレートに追加します。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AlertsManagement/actionRules@2021-08-08"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      actions = [
        {
          actionType = "string"
          // For remaining properties, see Action objects
        }
      ]
      conditions = [
        {
          field = "string"
          operator = "string"
          values = [
            "string"
          ]
        }
      ]
      description = "string"
      enabled = bool
      schedule = {
        effectiveFrom = "string"
        effectiveUntil = "string"
        recurrences = [
          {
            endTime = "string"
            startTime = "string"
            recurrenceType = "string"
            // For remaining properties, see Recurrence objects
          }
        ]
        timeZone = "string"
      }
      scopes = [
        "string"
      ]
    }
  })
}

Action オブジェクト

actionType プロパティを設定して、オブジェクトの種類を指定します。

AddActionGroups の場合は、次の値を使用します。

  actionType = "AddActionGroups"
  actionGroupIds = [
    "string"
  ]

RemoveAllActionGroups の場合は、次の値を使用します。

  actionType = "RemoveAllActionGroups"

繰り返しオブジェクト

recurrenceType プロパティを設定して、オブジェクトの種類を指定します。

Daily の場合は、次の値を使用します。

  recurrenceType = "Daily"

月単位の場合は、次の値を使用します。

  recurrenceType = "Monthly"
  daysOfMonth = [
    int
  ]

週単位の場合は、次の値を使用します。

  recurrenceType = "Weekly"
  daysOfWeek = [
    "string"
  ]

プロパティの値

actionRules

名前 説明
type リソースの種類 "Microsoft.AlertsManagement/actionRules@2021-08-08"
name リソース名 string (必須)
location リソースの場所 string (必須)
parent_id リソース グループにデプロイするには、そのリソース グループの ID を使用します。 string (必須)
tags リソース タグ タグ名と値のディクショナリ。
properties アラート処理ルールのプロパティ。 AlertProcessingRuleProperties

AlertProcessingRuleProperties

名前 説明
actions 適用するアクション。 Action[] (必須)
条件 アラートをフィルター処理する条件。 Condition[]
description アラート処理ルールの説明。 string
enabled 指定されたアラート処理ルールが有効か無効か示します。 [bool]
schedule アラート処理ルールのスケジュール設定。 [スケジュール]
スコープ アラート処理ルールが適用されるスコープ。 string[] (必須)

アクション

名前 説明
actionType オブジェクトの種類を設定する AddActionGroups
RemoveAllActionGroups (必須)

AddActionGroups

名前 説明
actionType 適用する必要があるアクション。 "AddActionGroups" (必須)
actionGroupIds アラート処理ルールに追加するアクション グループ ID の一覧。 string[] (必須)

RemoveAllActionGroups

名前 説明
actionType 適用する必要があるアクション。 "RemoveAllActionGroups" (必須)

条件

名前 説明
フィールド 特定の条件のフィールド。 "AlertContext"
"AlertRuleId"
"AlertRuleName"
"説明"
"MonitorCondition"
"MonitorService"
"重大度"
"SignalType"
"TargetResource"
"TargetResourceGroup"
"TargetResourceType"
operator 特定の条件の演算子。 "Contains"
"DoesNotContain"
"Equals"
"NotEquals"
特定の条件に一致する値の一覧。 string[]

スケジュール

名前 説明
effectiveFrom スケジュールは、時間から有効になります。 タイムゾーンサフィックスのない ISO-8601 形式でDate-Timeします。 string
effectiveUntil スケジュールは時間まで有効です。 タイムゾーンサフィックスのない ISO-8601 形式でDate-Timeします。 string
再発 繰り返しの一覧。 Recurrence[]
timeZone タイム ゾーンのスケジュール設定。 string

繰り返し

名前 説明
endTime 繰り返しの終了時刻。 string
startTime 繰り返しの開始時刻。 string
recurrenceType オブジェクトの種類を設定する 毎日
毎月
毎週 (必須)

DailyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 "Daily" (必須)

MonthlyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 "月単位" (必須)
daysOfMonth 毎月の定期的なパターンの値を指定します。 int[] (必須)

WeeklyRecurrence

名前 説明
recurrenceType 繰り返しを適用するタイミングを指定します。 "毎週" (必須)
daysOfWeek 週単位の繰り返しパターンの値を指定します。 次のいずれかを含む文字列配列:
"金曜日"
"月曜日"
"土曜日"
"日曜日"
"木曜日"
"火曜日"
"水曜日" (必須)