Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a new group in the specified user pool.
Requires developer credentials.
Synopsis
- createGroup :: Text -> Text -> CreateGroup
- data CreateGroup
- cgPrecedence :: Lens' CreateGroup (Maybe Natural)
- cgDescription :: Lens' CreateGroup (Maybe Text)
- cgRoleARN :: Lens' CreateGroup (Maybe Text)
- cgGroupName :: Lens' CreateGroup Text
- cgUserPoolId :: Lens' CreateGroup Text
- createGroupResponse :: Int -> CreateGroupResponse
- data CreateGroupResponse
- cgrsGroup :: Lens' CreateGroupResponse (Maybe GroupType)
- cgrsResponseStatus :: Lens' CreateGroupResponse Int
Creating a Request
Creates a value of CreateGroup
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cgPrecedence
- A nonnegative 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 lowerPrecedence
values take precedence over groups with higher or nullPrecedence
values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN will be used in thecognito:roles
andcognito:preferred_role
claims in the user's tokens. Two groups can have the samePrecedence
value. If this happens, neither group takes precedence over the other. If two groups with the samePrecedence
have the same role ARN, that role is used in thecognito:preferred_role
claim in tokens for users in each group. If the two groups have different role ARNs, thecognito:preferred_role
claim is not set in users' tokens. The defaultPrecedence
value is null.cgDescription
- A string containing the description of the group.cgRoleARN
- The role ARN for the group.cgGroupName
- The name of the group. Must be unique.cgUserPoolId
- The user pool ID for the user pool.
data CreateGroup Source #
See: createGroup
smart constructor.
Instances
Request Lenses
cgPrecedence :: Lens' CreateGroup (Maybe Natural) Source #
A nonnegative 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 will be used in the cognito:roles
and cognito:preferred_role
claims in the user's tokens. 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 is not set in users' tokens. The default Precedence
value is null.
cgDescription :: Lens' CreateGroup (Maybe Text) Source #
A string containing the description of the group.
cgGroupName :: Lens' CreateGroup Text Source #
The name of the group. Must be unique.
cgUserPoolId :: Lens' CreateGroup Text Source #
The user pool ID for the user pool.
Destructuring the Response
Creates a value of CreateGroupResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cgrsGroup
- The group object for the group.cgrsResponseStatus
- -- | The response status code.
data CreateGroupResponse Source #
See: createGroupResponse
smart constructor.
Instances
Response Lenses
cgrsResponseStatus :: Lens' CreateGroupResponse Int Source #
- - | The response status code.