Use the ALIYUN::ThreatDetection::Group resource to manage the relationship between a server and server groups.
Syntax
{
"Type": "ALIYUN::ThreatDetection::Group",
"Properties": {
"GroupName": String,
"GroupId": Integer
}
}Properties
Parameter | Type | Required | Editable | Description | Constraints |
GroupId | Integer | No | No | The ID of the server group to modify. | If you do not specify this parameter, a new server group is created. |
GroupName | String | No | Yes | The name of the server group to create or modify. | If |
Return values
Fn::GetAtt
GroupName: The name of the server group.
GroupFlag: The server group type.
GroupId: The ID of the server group.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
GroupName:
Type: String
Description:
en: |-
The name of the server group to create or modify.
> To modify a server's group membership, provide the server group name. You can call the [DescribeAllGroups](~~DescribeAllGroups~~) operation to find server group names. If you omit GroupId, a new server group is created, and this parameter is required.
Default: Null
Required: false
GroupId:
Type: Number
Description:
en: |-
The ID of the server group to modify.
> To modify a server's group membership, provide the server group ID. You can call the [DescribeAllGroups](~~DescribeAllGroups~~) operation to find server group IDs. If you omit this parameter, a new server group is created.
Default: Null
Required: false
Resources:
ExtensionResource:
Type: ALIYUN::ThreatDetection::Group
Properties:
GroupName:
Ref: GroupName
GroupId:
Ref: GroupId
Outputs:
GroupName:
Value:
Fn::GetAtt:
- ExtensionResource
- GroupName
Description: The name of the server group.
GroupId:
Value:
Fn::GetAtt:
- ExtensionResource
- GroupId
Description: The ID of the server group.
GroupFlag:
Value:
Fn::GetAtt:
- ExtensionResource
- GroupFlag
Description: The server group type.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"GroupName": {
"Type": "String",
"Description": {
"en": "The name of the server group to create or modify.\n> To modify a server's group membership, provide the server group name. You can call the [DescribeAllGroups](~~DescribeAllGroups~~) operation to find server group names. If you omit GroupId, a new server group is created, and this parameter is required."
},
"Default": null,
"Required": false
},
"GroupId": {
"Type": "Number",
"Description": {
"en": "The ID of the server group to modify.\n> To modify a server's group membership, provide the server group ID. You can call the [DescribeAllGroups](~~DescribeAllGroups~~) operation to find server group IDs. If you omit this parameter, a new server group is created."
},
"Default": null,
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ThreatDetection::Group",
"Properties": {
"GroupName": {
"Ref": "GroupName"
},
"GroupId": {
"Ref": "GroupId"
}
}
}
},
"Outputs": {
"GroupName": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GroupName"
]
},
"Description": "The name of the server group."
},
"GroupId": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GroupId"
]
},
"Description": "The ID of the server group."
},
"GroupFlag": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GroupFlag"
]
},
"Description": "The server group type."
}
}
}