| 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 |
Network.AWS.CognitoIdentityProvider.CreateGroup
Description
Creates a new group in the specified user pool.
Requires developer credentials.
- 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
Arguments
| :: Text | |
| -> Text | |
| -> CreateGroup |
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 lowerPrecedencevalues take precedence over groups with higher or nullPrecedencevalues. 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:rolesandcognito:preferred_roleclaims in the user's tokens. Two groups can have the samePrecedencevalue. If this happens, neither group takes precedence over the other. If two groups with the samePrecedencehave the same role ARN, that role is used in thecognito:preferred_roleclaim in tokens for users in each group. If the two groups have different role ARNs, thecognito:preferred_roleclaim is not set in users' tokens. The defaultPrecedencevalue 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
Arguments
| :: Int | |
| -> CreateGroupResponse |
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.
Response Lenses
cgrsResponseStatus :: Lens' CreateGroupResponse Int Source #
- - | The response status code.