ALIYUN::CMS::MonitorGroupInstances is used to add instances to an application group.
Syntax
{
"Type": "ALIYUN::CMS::MonitorGroupInstances",
"Properties": {
"Instances": List,
"GroupId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Instances | List | Yes | No | The instances. | For more information, see Instances properties. |
GroupId | String | Yes | No | The ID of the application group. | None |
Instances syntax
"Instances": [
{
"InstanceName": String,
"Category": String,
"InstanceId": String,
"RegionId": String
}
]
Instances properties
Property | Type | Required | Editable | Description | Constraint |
InstanceName | String | Yes | No | The name of the instance. | None |
Category | String | Yes | No | The service name or specifications of the instance. | Valid values:
|
InstanceId | String | Yes | No | The ID of the instance. | None |
RegionId | String | Yes | No | The region ID of the instance. | None |
Return values
Fn::GetAtt
GroupId: the ID of the application group.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
GroupId:
Type: String
Description: The ID of the application group.
Resources:
MonitorGroupInstances:
Type: ALIYUN::CMS::MonitorGroupInstances
Properties:
Instances:
- InstanceName: TestECS
Category: ecs
InstanceId:
Ref: InstanceId
RegionId:
Ref: ALIYUN::Region
GroupId:
Ref: GroupId
Outputs:
GroupId:
Description: The ID of the application group.
Value:
Fn::GetAtt:
- MonitorGroupInstances
- GroupId
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceId"
},
"GroupId": {
"Type": "String",
"Description": "The ID of the application group."
}
},
"Resources": {
"MonitorGroupInstances": {
"Type": "ALIYUN::CMS::MonitorGroupInstances",
"Properties": {
"Instances": [
{
"InstanceName": "TestECS",
"Category": "ecs",
"InstanceId": {
"Ref": "InstanceId"
},
"RegionId": {
"Ref": "ALIYUN::Region"
}
}
],
"GroupId": {
"Ref": "GroupId"
}
}
}
},
"Outputs": {
"GroupId": {
"Description": "The ID of the application group.",
"Value": {
"Fn::GetAtt": [
"MonitorGroupInstances",
"GroupId"
]
}
}
}
}