DATASOURCE::RAM::Users is used to query Resource Access Management (RAM) users.

Syntax

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

Properties

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

Return values (Fn::GetAtt)

  • UserNames: the names of the RAM users.
  • Users: details of the RAM users.
Property Type Description Constraint
UserNames List The names of the RAM users. None.
Users List Details of the RAM users. None.
DisplayName String The display name of the RAM user. None.
UserId String The ID of the RAM user. None.
Comments String The comments on the RAM user. None.
CreateDate String The time when the RAM user was created. The time is displayed in UTC. None.
UserName String The name of the RAM user. None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "UserName": {
      "Type": "String",
      "Description": "Filter the results by a specific user name. Supports using * and ? to fuzzy match.",
      "Default": "test*"
    }
  },
  "Resources": {
    "Users": {
      "Type": "DATASOURCE::RAM::Users",
      "Properties": {
        "UserName": {
          "Ref": "UserName"
        }
      }
    }
  },
  "Outputs": {
    "UserNames": {
      "Description": "The list of user names.",
      "Value": {
        "Fn::GetAtt": [
          "Users",
          "UserNames"
        ]
      }
    },
    "Users": {
      "Description": "The list of users.",
      "Value": {
        "Fn::GetAtt": [
          "Users",
          "Users"
        ]
      }
    }
  }
}