ALIYUN::BastionHost::HostAccountUserGroupAttachment类型用于将主机绑定到用户组。
语法
{
"Type": "ALIYUN::BastionHost::HostAccountUserGroupAttachment",
"Properties": {
"Hosts": List,
"InstanceId": String,
"UserGroupId": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Hosts |
List |
是 |
否 |
指定要为用户组授权的主机ID和主机账户ID。 |
长度限制:最小1,最大10 |
|
InstanceId |
String |
是 |
否 |
堡垒主机实例的ID。 |
无 |
|
UserGroupId |
String |
是 |
否 |
用户组的ID。 |
无 |
Hosts语法
"Hosts": [
{
"HostId": String,
"HostAccountIds": List
}
]
Hosts属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
HostId |
String |
是 |
否 |
主机的ID。 |
无 |
|
HostAccountIds |
List |
否 |
否 |
主机账户的ID列表。 |
长度限制:最小1,最大10 |
返回值
Fn::GetAtt
无
示例
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: Specify the host ID and host account ID that you want to authorize for the user group.
zh: 指定要为用户组授权的主机ID和主机账户ID。
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: Specify the host IDs and host account IDs that you want to authorize for 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
{
"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": "Specify the host ID and host account ID that you want to authorize for the user group.",
"zh": "指定要为用户组授权的主机ID和主机账户ID。"
},
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "Specify the host IDs and host account IDs that you want to authorize for 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"
}
}
}
}
}