ALIYUN::CMS::MonitoringAgentProcess は、プロセス監視タスクを作成するために使用されます。
構文
{
"Type": "ALIYUN::CMS::MonitoringAgentProcess",
"Properties": {
"ProcessName": String,
"InstanceId": String,
"ProcessUser": String
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
InstanceId | String | はい | いいえ | インスタンスの ID です。 | なし |
ProcessName | String | いいえ | いいえ | プロセスの名前です。 | なし |
ProcessUser | String | いいえ | いいえ | プロセスを起動するユーザーです。 | なし |
戻り値
Fn::GetAtt
Id: プロセス監視タスクの ID です。
例
YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Description: Test CMS MonitoringAgentProcess
Parameters:
InstanceId:
Type: String
Description: The ID of the instance.
Default: i-***
ProcessName:
Type: String
Description: The name of the process.
Default: mytest
ProcessUser:
Type: String
Default: root
Resources:
MonitoringAgentProcess:
Type: ALIYUN::CMS::MonitoringAgentProcess
Properties:
ProcessName:
Ref: ProcessName
InstanceId:
Ref: ECS
ProcessUser:
Ref: ProcessUser
Outputs:
Id:
Value:
Fn::GetAtt:
- MonitoringAgentProcess
- IdJSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test CMS MonitoringAgentProcess",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": "The ID of the instance.",
"Default": "i-***"
},
"ProcessName": {
"Type": "String",
"Description": "The name of the process.",
"Default": "mytest"
},
"ProcessUser": {
"Type": "String",
"Default": "root"
}
},
"Resources": {
"MonitoringAgentProcess": {
"Type": "ALIYUN::CMS::MonitoringAgentProcess",
"Properties": {
"ProcessName": {
"Ref": "ProcessName"
},
"InstanceId": {
"Ref": "ECS"
},
"ProcessUser": {
"Ref": "ProcessUser"
}
}
}
},
"Outputs": {
"Id": {
"Value": {
"Fn::GetAtt": [
"MonitoringAgentProcess",
"Id"
]
}
}
}
}