ALIYUN::CMS::MonitoringAgentProcess

更新时间:
复制 MD 格式

ALIYUN::CMS::MonitoringAgentProcess creates a process monitoring task.

Syntax

{
  "Type": "ALIYUN::CMS::MonitoringAgentProcess",
  "Properties": {
    "ProcessName": String,
    "InstanceId": String,
    "ProcessUser": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceId

String

Yes

No

The instance ID.

None

ProcessName

String

No

No

The process name.

None

ProcessUser

String

No

No

The user that runs the process.

None

Return values

Fn::GetAtt

Id: the process monitoring task ID.

Examples

YAML format

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

JSON format

{
  "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"
        ]
      }
    }
  }
}