Amazon Cognito · JSON Structure

User Pools Create Group Request Structure

CreateGroupRequest schema from Amazon Cognito API

Type: object Properties: 5 Required: 2
AuthenticationIdentityOAuthOIDCSAMLUser ManagementFederated Identity

CreateGroupRequest is a JSON Structure definition published by Amazon Cognito, describing 5 properties, of which 2 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

GroupName UserPoolId Description RoleArn Precedence

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-cognito/refs/heads/main/json-structure/user-pools-create-group-request-structure.json",
  "name": "CreateGroupRequest",
  "description": "CreateGroupRequest schema from Amazon Cognito API",
  "type": "object",
  "properties": {
    "GroupName": {
      "allOf": [
        {
          "$ref": "#/components/schemas/GroupNameType"
        },
        {
          "description": "The name of the group. Must be unique."
        }
      ]
    },
    "UserPoolId": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserPoolIdType"
        },
        {
          "description": "The user pool ID for the user pool."
        }
      ]
    },
    "Description": {
      "allOf": [
        {
          "$ref": "#/components/schemas/DescriptionType"
        },
        {
          "description": "A string containing the description of the group."
        }
      ]
    },
    "RoleArn": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ArnType"
        },
        {
          "description": "The role Amazon Resource Name (ARN) for the group."
        }
      ]
    },
    "Precedence": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PrecedenceType"
        },
        {
          "description": "<p>A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower <code>Precedence</code> values take precedence over groups with higher or null <code>Precedence</code> values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the <code>cognito:roles</code> and <code>cognito:preferred_role</code> claims.</p> <p>Two groups can have the same <code>Precedence</code> value. If this happens, neither group takes precedence over the other. If two groups with the same <code>Precedence</code> have the same role ARN, that role is used in the <code>cognito:preferred_role</code> claim in tokens for users in each group. If the two groups have different role ARNs, the <code>cognito:preferred_role</code> claim isn't set in users' tokens.</p> <p>The default <code>Precedence</code> value is null. The maximum <code>Precedence</code> value is <code>2^31-1</code>.</p>"
        }
      ]
    }
  },
  "required": [
    "GroupName",
    "UserPoolId"
  ]
}