DATASOURCE::RAM::Groups类型用于查询用户组列表。
语法
{
  "Type": "DATASOURCE::RAM::Groups",
  "Properties": {
    "GroupName": String,
    "UserName": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| GroupName | String | 否 | 是 | 用户组名称。 | 支持使用 | 
| UserName | String | 否 | 是 | 用户组中的RAM用户名称。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回数据(Fn::GetAtt)
- GroupNames:用户组名称列表。 
- Groups:用户组详情列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| GroupNames | List | 用户组名称列表。 | 无 | 
| Groups | List | 用户组详情列表。 | 无 | 
| Comments | String | 备注信息。 | 无 | 
| GroupId | String | 用户组ID。 | 无 | 
| GroupName | String | 用户组名称。 | 无 | 
| CreateDate | String | 创建时间(UTC时间)。 | 无 | 
示例
JSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GroupName": {
      "Type": "String",
      "Description": "Filter the results by a specific group name. Supports using * and ? to fuzzy match.",
      "Default": "mdc-****"
    }
  },
  "Resources": {
    "Groups": {
      "Type": "DATASOURCE::RAM::Groups",
      "Properties": {
        "GroupName": {
          "Ref": "GroupName"
        }
      }
    }
  },
  "Outputs": {
    "GroupNames": {
      "Description": "The list of group names.",
      "Value": {
        "Fn::GetAtt": [
          "Groups",
          "GroupNames"
        ]
      }
    },
    "Groups": {
      "Description": "The list of groups.",
      "Value": {
        "Fn::GetAtt": [
          "Groups",
          "Groups"
        ]
      }
    }
  }
}该文章对您有帮助吗?