Use the ALIYUN::BastionHost::HostAccountUserGroupAttachment resource to attach hosts to a user group.
Syntax
{
"Type": "ALIYUN::BastionHost::HostAccountUserGroupAttachment",
"Properties": {
"Hosts": List,
"InstanceId": String,
"UserGroupId": String
}
}
Properties
|
Parameter |
Type |
Required |
Updatable |
Description |
Constraints |
|
Hosts |
List |
Yes |
No |
The host IDs and host account IDs to attach to the user group. |
Length: 1 to 10. |
|
InstanceId |
String |
Yes |
No |
The ID of the Bastion Host instance. |
None |
|
UserGroupId |
String |
Yes |
No |
The ID of the user group. |
None |
Hosts syntax
"Hosts": [
{
"HostId": String,
"HostAccountIds": List
}
]
Hosts properties
|
Parameter |
Type |
Required |
Updatable |
Description |
Constraints |
|
HostId |
String |
Yes |
No |
The ID of the host. |
None |
|
HostAccountIds |
List |
No |
No |
The IDs of the host accounts. |
Length: 1 to 10. |
Return values
Fn::GetAtt
None.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Hosts:
AssociationPropertyMetadata:
Parameter:
AssociationPropertyMetadata:
Parameters:
HostId:
Type: String
Description:
en: The ID of the host.
zh: 主机的ID。
Required: true
HostAccountIds:
AssociationPropertyMetadata:
Parameter:
Type: String
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: The IDs of the host accounts.
zh: 主机账户的ID列表。
Required: false
MinLength: 1
MaxLength: 10
Type: Json
Description:
en: The host IDs and host account IDs to attach to the user group.
zh: 指定要为用户组授权的主机ID和主机账户ID。
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: The host IDs and host account IDs to attach to the user group.
zh: 指定要为用户组授权的主机ID和主机账户ID。
Required: true
MinLength: 1
MaxLength: 10
InstanceId:
Type: String
Description:
en: The ID of the Bastion Host instance.
zh: 堡垒主机实例的ID。
Required: true
UserGroupId:
Type: String
Description:
en: The ID of the user group.
zh: 用户组的ID。
Required: true
Resources:
HostAccountUserGroupAttachment:
Type: ALIYUN::BastionHost::HostAccountUserGroupAttachment
Properties:
Hosts:
Ref: Hosts
InstanceId:
Ref: InstanceId
UserGroupId:
Ref: UserGroupId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Hosts": {
"AssociationPropertyMetadata": {
"Parameter": {
"AssociationPropertyMetadata": {
"Parameters": {
"HostId": {
"Type": "String",
"Description": {
"en": "The ID of the host.",
"zh": "主机的ID。"
},
"Required": true
},
"HostAccountIds": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The IDs of the host accounts.",
"zh": "主机账户的ID列表。"
},
"Required": false,
"MinLength": 1,
"MaxLength": 10
}
}
},
"Type": "Json",
"Description": {
"en": "The host IDs and host account IDs to attach to the user group.",
"zh": "指定要为用户组授权的主机ID和主机账户ID。"
},
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The host IDs and host account IDs to attach to the user group.",
"zh": "指定要为用户组授权的主机ID和主机账户ID。"
},
"Required": true,
"MinLength": 1,
"MaxLength": 10
},
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the BastionHost instance.",
"zh": "堡垒主机实例的ID。"
},
"Required": true
},
"UserGroupId": {
"Type": "String",
"Description": {
"en": "The ID of the user group.",
"zh": "用户组的ID。"
},
"Required": true
}
},
"Resources": {
"HostAccountUserGroupAttachment": {
"Type": "ALIYUN::BastionHost::HostAccountUserGroupAttachment",
"Properties": {
"Hosts": {
"Ref": "Hosts"
},
"InstanceId": {
"Ref": "InstanceId"
},
"UserGroupId": {
"Ref": "UserGroupId"
}
}
}
}
}
该文章对您有帮助吗?