ALIYUN::CMS::MonitorGroupInstances は、アプリケーション グループにリソースを追加する際に使用します。
構文
{
"Type": "ALIYUN::CMS::MonitorGroupInstances",
"Properties": {
"Instances": List,
"GroupId": String
}
}プロパティ
プロパティ名 | タイプ | 必須 | 更新可否 | 説明 | 制約 |
Instances | List | はい | いいえ | リソースインスタンス。 | 詳細については、「Instances プロパティ」をご参照ください。 |
GroupId | String | はい | いいえ | アプリケーション グループの ID。 | なし |
Instances の構文
"Instances": [
{
"InstanceName": String,
"Category": String,
"InstanceId": String,
"RegionId": String
}
]Instances プロパティ
プロパティ名 | タイプ | 必須 | 更新可否 | 説明 | 制約 |
InstanceName | String | はい | いいえ | インスタンス名。 | なし |
Category | String | はい | いいえ | リソースインスタンスが属するクラウドサービスの名前または仕様。 | 有効な値:
|
InstanceId | String | はい | いいえ | リソースインスタンスの ID。 | なし |
RegionId | String | はい | いいえ | インスタンスのリージョン ID。 | なし |
戻り値
Fn::GetAtt
GroupId:アプリケーション グループの ID。
例
YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
GroupId:
Type: String
Description: アプリケーション グループの ID。
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: アプリケーション グループの ID。
Value:
Fn::GetAtt:
- MonitorGroupInstances
- GroupIdJSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceId"
},
"GroupId": {
"Type": "String",
"Description": "アプリケーション グループの ID。"
}
},
"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": "アプリケーション グループの ID。",
"Value": {
"Fn::GetAtt": [
"MonitorGroupInstances",
"GroupId"
]
}
}
}
}