DATASOURCE::CMS::MonitorGroups

更新时间:
复制 MD 格式

DATASOURCE::CMS::MonitorGroups类型用于查询应用分组基本信息。

语法

{
  "Type": "DATASOURCE::CMS::MonitorGroups",
  "Properties": {
    "Type": String,
    "DynamicTagRuleId": String,
    "MonitorGroupName": String,
    "GroupId": Integer,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Type

String

否

是

应用分组类型。

取值:

  • custom:自建的应用分组。

  • ehpc_cluster:从EHPC集群同步的应用分组。

  • kubernetes:从容器服务Kubernetes版同步的应用分组。

DynamicTagRuleId

String

否

是

智能标签规则ID。

无

MonitorGroupName

String

否

是

应用分组名称。

无

GroupId

Integer

否

是

应用分组ID。

无

RefreshOptions

String

否

是

当资源栈更新时,数据源资源的刷新策略。

取值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • GroupIds:应用分组ID列表。

  • MonitorGroups:应用分组列表。

属性名称

类型

描述

约束

GroupIds

List

应用分组ID列表。

无

MonitorGroups

List

应用分组列表。

无

Tags

List

应用分组的标签。

无

BindUrl

String

从容器服务Kubernetes版同步过来的URL地址。

无

TemplateIds

List

应用分组应用过的报警模板。

无

ContactGroups

List

报警联系组。

无

ServiceId

String

阿里云服务ID。

无

DynamicTagRuleId

String

智能标签规则ID。

无

MonitorGroupName

String

应用分组名称。

无

GmtModified

String

修改应用分组的时间戳。

单位:毫秒。

CreateTime

String

创建应用分组的时间。

单位:毫秒。

Type

String

应用分组类型。

无

GroupId

String

应用分组ID。

无

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  ExtensionDataSource:
    Type: 'DATASOURCE::CMS::MonitorGroups'
    Properties:
      Type:
        Ref: Type
Parameters:
  Type:
    Type: String
    Description: >-
      The type of the application group. Valid values:

      custom: a self-managed application group.

      ehpc_cluster: an application group that is synchronized from an Elastic
      High Performance Computing (E-HPC) cluster.

      kubernetes: an application group that is synchronized from a Container
      Service for Kubernetes (ACK) cluster.
Outputs:
  GroupIds:
    Description: The list of group IDs.
    Value:
      'Fn::GetAtt':
        - ExtensionDataSource
        - GroupIds
  MonitorGroups:
    Description: The list of monitor groups.
    Value:
      'Fn::GetAtt':
        - ExtensionDataSource
        - MonitorGroups

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::CMS::MonitorGroups",
      "Properties": {
        "Type": {
          "Ref": "Type"
        }
      }
    }
  },
  "Parameters": {
    "Type": {
      "Type": "String",
      "Description": "The type of the application group. Valid values:\ncustom: a self-managed application group.\nehpc_cluster: an application group that is synchronized from an Elastic High Performance Computing (E-HPC) cluster.\nkubernetes: an application group that is synchronized from a Container Service for Kubernetes (ACK) cluster."
    }
  },
  "Outputs": {
    "GroupIds": {
      "Description": "The list of group IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GroupIds"
        ]
      }
    },
    "MonitorGroups": {
      "Description": "The list of monitor groups.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MonitorGroups"
        ]
      }
    }
  }
}