ALIYUN::ARMS::ApplyAlertRuleTemplate类型用于创建Prometheus告警规则。
语法
{
"Type": "ALIYUN::ARMS::ApplyAlertRuleTemplate",
"Properties": {
"ClusterIds": List,
"TemplateIds": List,
"Update": Boolean
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ClusterIds | List | 否 | 是 | Prometheus集群列表。 | 限制:1~100个。 |
TemplateIds | List | 否 | 是 | Prometheus告警规则模板列表 | 限制:1~100个。 |
Update | Boolean | 否 | 是 | 是否更新已创建的警报规则。 | 取值:
|
返回值
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"
}
}
}
}
}
文档内容是否对您有帮助?