Amazon Cognito Identity Provider
  1. Root
Amazon Cognito Identity Provider
  • Root
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
  1. Root

/

POST
/
Creates a new group in the specified user pool.
Calling this action requires developer credentials.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/' \
--header 'X-Amz-Target;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "GroupName": "string",
    "UserPoolId": "string",
    "Description": "string",
    "RoleArn": "string",
    "Precedence": 0
}'
Response Response Example
200 - Example 1
{
    "Group": {
        "GroupName": "string",
        "UserPoolId": "string",
        "Description": "string",
        "RoleArn": "string",
        "Precedence": 0,
        "LastModifiedDate": "string",
        "CreationDate": "string"
    }
}

Request

Header Params
X-Amz-Target
string 
required
Body Params application/json
GroupName
string 
required
The name of the group. Must be unique.
>= 1 characters<= 128 characters
Match pattern:
[\p{L}\p{M}\p{S}\p{N}\p{P}]+
UserPoolId
string 
required
The user pool ID for the user pool.
>= 1 characters<= 55 characters
Match pattern:
[\w-]+_[0-9a-zA-Z]+
Description
string 
optional
A string containing the description of the group.
<= 2048 characters
RoleArn
string 
optional
The role Amazon Resource Name (ARN) for the group.
>= 20 characters<= 2048 characters
Match pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?
Precedence
integer 
optional
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 Precedence values take precedence over groups with higher or null Precedence 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 cognito:roles and cognito:preferred_role claims.
Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens.
The default Precedence value is null. The maximum Precedence value is 2^31-1.
>= 0
Examples

Responses

🟢200Success
application/json
Body
Group
object 
optional
The group object for the group.
GroupName
string 
optional
The name of the group.
>= 1 characters<= 128 characters
Match pattern:
[\p{L}\p{M}\p{S}\p{N}\p{P}]+
UserPoolId
string 
optional
The user pool ID for the user pool.
>= 1 characters<= 55 characters
Match pattern:
[\w-]+_[0-9a-zA-Z]+
Description
string 
optional
A string containing the description of the group.
<= 2048 characters
RoleArn
string 
optional
The role Amazon Resource Name (ARN) for the group.
>= 20 characters<= 2048 characters
Match pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?
Precedence
integer 
optional
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 Precedence values take precedence over groups with higher ornull Precedence 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 cognito:roles and cognito:preferred_role claims.
Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens.
The default Precedence value is null.
>= 0
LastModifiedDate
string <date-time>
optional
The date the group was last modified.
CreationDate
string <date-time>
optional
The date the group was created.
🟠480InvalidParameterException
🟠481GroupExistsException
🟠482ResourceNotFoundException
🟠483TooManyRequestsException
🟠484LimitExceededException
🟠485NotAuthorizedException
🟠486InternalErrorException
Modified at 2023-08-15 07:11:06
Previous
/
Next
/
Built with