DATASOURCE::RAM::Groups is used to query Resource Access Management (RAM) user groups.

Syntax

{
  "Type": "DATASOURCE::RAM::Groups",
  "Properties": {
    "GroupName": String,
    "UserName": String
  }
}

Properties

Property Type Required Editable Description Constraint
GroupName String No Yes The name of the user group. You can use wildcard characters (* and ?) to perform fuzzy match.
UserName String No Yes The name of the RAM user in the user group. None.

Return values (Fn::GetAtt)

  • GroupNames: the names of the user groups.
  • Groups: details of the user groups.
Property Type Description Constraint
GroupNames List The names of the user groups. None.
Groups List Details of the user groups. None.
Comments String The comments on the user group. None.
GroupId String The ID of the user group. None.
GroupName String The name of the user group. None.
CreateDate String The time when the user group was created. The time is displayed in UTC. None.

Examples

JSON format

{
  "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"
        ]
      }
    }
  }
}