すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::ARMS::ApplyAlertRuleTemplate

最終更新日:Jan 23, 2025

ALIYUN::ARMS::ApplyAlertRuleTemplate は、CloudMonitor Managed Service for Prometheus のアラート ルールを作成するために使用されます。

構文

{
  "Type": "ALIYUN::ARMS::ApplyAlertRuleTemplate",
  "Properties": {
    "ClusterIds": List,
    "TemplateIds": List,
    "Update": Boolean
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

ClusterIds

List

いいえ

はい

Prometheus クラスター。

1 ~ 100 個のクラスターを指定できます。

TemplateIds

List

いいえ

はい

Prometheus アラート ルール テンプレート。

1 ~ 100 個のテンプレートを指定できます。

Update

Boolean

いいえ

はい

作成されたアラート ルールを更新するかどうかを指定します。

有効な値:

  • true

  • false (デフォルト)

戻り値

Fn::GetAtt

なし。

YAML 形式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterIds:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: The ID of the Prometheus Instance.
        Required: true
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: The IDs list of Prometheus Instances.
    Required: false
    MinLength: 1
    MaxLength: 100
  TemplateIds:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: The ID of the Prometheus alert rule template.
        Required: true
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: The IDs list of Prometheus alert rule templates.
    Required: false
    MinLength: 1
    MaxLength: 100
Resources:
  ApplyAlertRuleTemplate:
    Type: ALIYUN::ARMS::ApplyAlertRuleTemplate
    Properties:
      ClusterIds:
        Ref: ClusterIds
      TemplateIds:
        Ref: TemplateIds

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterIds": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "The ID of the Prometheus Instance."
          },
          "Required": true
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "The IDs list of Prometheus Instances."
      },
      "Required": false,
      "MinLength": 1,
      "MaxLength": 100
    },
    "TemplateIds": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "The ID of the Prometheus alert rule template."
          },
          "Required": true
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "The IDs list of Prometheus alert rule templates."
      },
      "Required": false,
      "MinLength": 1,
      "MaxLength": 100
    }
  },
  "Resources": {
    "ApplyAlertRuleTemplate": {
      "Type": "ALIYUN::ARMS::ApplyAlertRuleTemplate",
      "Properties": {
        "ClusterIds": {
          "Ref": "ClusterIds"
        },
        "TemplateIds": {
          "Ref": "TemplateIds"
        }
      }
    }
  }
}