Copyright | (c) 2013-2021 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 |
Creates a new group in the specified user pool.
Calling this action requires developer credentials.
Synopsis
- data CreateGroup = CreateGroup' {
- precedence :: Maybe Natural
- description :: Maybe Text
- roleArn :: Maybe Text
- groupName :: Text
- userPoolId :: Text
- newCreateGroup :: Text -> Text -> CreateGroup
- createGroup_precedence :: Lens' CreateGroup (Maybe Natural)
- createGroup_description :: Lens' CreateGroup (Maybe Text)
- createGroup_roleArn :: Lens' CreateGroup (Maybe Text)
- createGroup_groupName :: Lens' CreateGroup Text
- createGroup_userPoolId :: Lens' CreateGroup Text
- data CreateGroupResponse = CreateGroupResponse' {
- group' :: Maybe GroupType
- httpStatus :: Int
- newCreateGroupResponse :: Int -> CreateGroupResponse
- createGroupResponse_group :: Lens' CreateGroupResponse (Maybe GroupType)
- createGroupResponse_httpStatus :: Lens' CreateGroupResponse Int
Creating a Request
data CreateGroup Source #
See: newCreateGroup
smart constructor.
CreateGroup' | |
|
Instances
Create a value of CreateGroup
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:precedence:CreateGroup'
, createGroup_precedence
- 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.
$sel:description:CreateGroup'
, createGroup_description
- A string containing the description of the group.
$sel:roleArn:CreateGroup'
, createGroup_roleArn
- The role ARN for the group.
$sel:groupName:CreateGroup'
, createGroup_groupName
- The name of the group. Must be unique.
$sel:userPoolId:CreateGroup'
, createGroup_userPoolId
- The user pool ID for the user pool.
Request Lenses
createGroup_precedence :: 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.
createGroup_description :: Lens' CreateGroup (Maybe Text) Source #
A string containing the description of the group.
createGroup_roleArn :: Lens' CreateGroup (Maybe Text) Source #
The role ARN for the group.
createGroup_groupName :: Lens' CreateGroup Text Source #
The name of the group. Must be unique.
createGroup_userPoolId :: Lens' CreateGroup Text Source #
The user pool ID for the user pool.
Destructuring the Response
data CreateGroupResponse Source #
See: newCreateGroupResponse
smart constructor.
CreateGroupResponse' | |
|
Instances
newCreateGroupResponse Source #
Create a value of CreateGroupResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:group':CreateGroupResponse'
, createGroupResponse_group
- The group object for the group.
$sel:httpStatus:CreateGroupResponse'
, createGroupResponse_httpStatus
- The response's http status code.
Response Lenses
createGroupResponse_group :: Lens' CreateGroupResponse (Maybe GroupType) Source #
The group object for the group.
createGroupResponse_httpStatus :: Lens' CreateGroupResponse Int Source #
The response's http status code.