ALIYUN::ARMS::EnvServiceMonitor类型用于创建环境的ServiceMonitor。
语法
{
"Type": "ALIYUN::ARMS::EnvServiceMonitor",
"Properties": {
"ConfigYaml": String,
"EnvironmentId": String,
"AliyunLang": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ConfigYaml |
String |
是 |
是 |
ServiceMonitor的YAML配置字符串。 |
无 |
|
EnvironmentId |
String |
是 |
否 |
环境实例的ID。 |
无 |
|
AliyunLang |
String |
否 |
否 |
语言。 |
有效值:zh和en。默认值:zh。 |
返回值
Fn::GetAtt
-
EnvServiceMonitorName:ServiceMonitor的名称。
-
EnvironmentId:环境实例的ID。
-
ConfigYaml:ServiceMonitor的YAML配置字符串。
-
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"
]
}
}
}
}
该文章对您有帮助吗?