ALIYUN::BastionHost::UserGroup

更新时间:
复制为 MD 格式

ALIYUN::BastionHost::UserGroup类型用于创建用户组。

语法

{
  "Type": "ALIYUN::BastionHost::UserGroup",
  "Properties": {
    "InstanceId": String,
    "UserGroupName": String,
    "Comment": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

堡垒主机实例的ID。

UserGroupName

String

用户组的名称。

Comment

String

用户组的备注。

返回值

Fn::GetAtt

UserGroupId:用户组的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description:
      en: The ID of the BastionHost instance.
      zh: 堡垒主机实例的ID。
    Required: true
  UserGroupName:
    Type: String
    Description:
      en: The name of the user group.
      zh: 用户组的名称。
    Required: true
Resources:
  UserGroup:
    Type: ALIYUN::BastionHost::UserGroup
    Properties:
      InstanceId:
        Ref: InstanceId
      UserGroupName:
        Ref: UserGroupName
Outputs:
  UserGroupId:
    Description:
      en: The ID of the user group.
      zh: 用户组的ID。
    Value:
      Fn::GetAtt:
        - UserGroup
        - UserGroupId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the BastionHost instance.",
        "zh": "堡垒主机实例的ID。"
      },
      "Required": true
    },
    "UserGroupName": {
      "Type": "String",
      "Description": {
        "en": "The name of the user group.",
        "zh": "用户组的名称。"
      },
      "Required": true
    }
  },
  "Resources": {
    "UserGroup": {
      "Type": "ALIYUN::BastionHost::UserGroup",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "UserGroupName": {
          "Ref": "UserGroupName"
        }
      }
    }
  },
  "Outputs": {
    "UserGroupId": {
      "Description": {
        "en": "The ID of the user group.",
        "zh": "用户组的ID。"
      },
      "Value": {
        "Fn::GetAtt": [
          "UserGroup",
          "UserGroupId"
        ]
      }
    }
  }
}