ALIYUN::CMS::MonitoringAgentProcess类型用于创建进程监控。
语法
{
"Type": "ALIYUN::CMS::MonitoringAgentProcess",
"Properties": {
"ProcessName": String,
"InstanceId": String,
"ProcessUser": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
ProcessName | String | 否 | 否 | 进程名称 | 无 |
InstanceId | String | 是 | 否 | 实例ID | 无 |
ProcessUser | String | 否 | 否 | 执行进程的用户 | 无 |
返回值
Fn::GetAtt
Id:进程ID。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ProcessName": {
"Type": "String",
"Description": "The name of the process."
},
"InstanceId": {
"Type": "String",
"Description": "The ID of the instance."
},
"ProcessUser": {
"Type": "String",
"Description": "The user who launched the process."
}
},
"Resources": {
"MonitoringAgentProcess": {
"Type": "ALIYUN::CMS::MonitoringAgentProcess",
"Properties": {
"ProcessName": {
"Ref": "ProcessName"
},
"InstanceId": {
"Ref": "InstanceId"
},
"ProcessUser": {
"Ref": "ProcessUser"
}
}
}
},
"Outputs": {
"Id": {
"Description": "The process ID.",
"Value": {
"Fn::GetAtt": [
"MonitoringAgentProcess",
"Id"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ProcessName:
Type: String
Description: The name of the process.
InstanceId:
Type: String
Description: The ID of the instance.
ProcessUser:
Type: String
Description: The user who launched the process.
Resources:
MonitoringAgentProcess:
Type: 'ALIYUN::CMS::MonitoringAgentProcess'
Properties:
ProcessName:
Ref: ProcessName
InstanceId:
Ref: InstanceId
ProcessUser:
Ref: ProcessUser
Outputs:
Id:
Description: The process ID.
Value:
'Fn::GetAtt':
- MonitoringAgentProcess
- Id