ALIYUN::ARMS::EnvServiceMonitor

更新时间:
复制为 MD 格式

ALIYUN::ARMS::EnvServiceMonitor类型用于创建环境的ServiceMonitor。

语法

{
  "Type": "ALIYUN::ARMS::EnvServiceMonitor",
  "Properties": {
    "ConfigYaml": String,
    "EnvironmentId": String,
    "AliyunLang": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ConfigYaml

String

ServiceMonitorYAML配置字符串。

EnvironmentId

String

环境实例的ID。

AliyunLang

String

语言。

有效值:zhen。默认值:zh。

返回值

Fn::GetAtt

  • EnvServiceMonitorName:ServiceMonitor的名称。

  • EnvironmentId:环境实例的ID。

  • ConfigYaml:ServiceMonitorYAML配置字符串。

  • Namespace:ServiceMonitor的命名空间。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EnvironmentId:
    Type: String
    Description:
      en: The ID of the environment instance.
      zh: 环境实例的ID。
    Required: true
  ConfigYaml:
    Type: String
    Description:
      en: The YAML configuration string of the ServiceMonitor.
      zh: ServiceMonitor的YAML配置字符串。
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ARMS::EnvServiceMonitor
    Properties:
      EnvironmentId:
        Ref: EnvironmentId
      ConfigYaml:
        Ref: ConfigYaml
Outputs:
  EnvServiceMonitorName:
    Description:
      en: The name of the ServiceMonitor.
      zh: ServiceMonitor的名称。
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvServiceMonitorName
  EnvironmentId:
    Description:
      en: The ID of the environment instance.
      zh: 环境实例的ID。
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvironmentId
  ConfigYaml:
    Description:
      en: The YAML configuration string of the ServiceMonitor.
      zh: ServiceMonitor的YAML配置字符串。
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ConfigYaml
  Namespace:
    Description:
      en: The namespace of the ServiceMonitor.
      zh: ServiceMonitor的命名空间。
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Namespace
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "EnvironmentId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the environment instance.",
        "zh": "环境实例的ID。"
      },
      "Required": true
    },
    "ConfigYaml": {
      "Type": "String",
      "Description": {
        "en": "The YAML configuration string of the ServiceMonitor.",
        "zh": "ServiceMonitor的YAML配置字符串。"
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ARMS::EnvServiceMonitor",
      "Properties": {
        "EnvironmentId": {
          "Ref": "EnvironmentId"
        },
        "ConfigYaml": {
          "Ref": "ConfigYaml"
        }
      }
    }
  },
  "Outputs": {
    "EnvServiceMonitorName": {
      "Description": {
        "en": "The name of the ServiceMonitor.",
        "zh": "ServiceMonitor的名称。"
      },
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvServiceMonitorName"
        ]
      }
    },
    "EnvironmentId": {
      "Description": {
        "en": "The ID of the environment instance.",
        "zh": "环境实例的ID。"
      },
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvironmentId"
        ]
      }
    },
    "ConfigYaml": {
      "Description": {
        "en": "The YAML configuration string of the ServiceMonitor.",
        "zh": "ServiceMonitor的YAML配置字符串。"
      },
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ConfigYaml"
        ]
      }
    },
    "Namespace": {
      "Description": {
        "en": "The namespace of the ServiceMonitor.",
        "zh": "ServiceMonitor的命名空间。"
      },
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Namespace"
        ]
      }
    }
  }
}