amazonka-cognito-idp-2.0: Amazon Cognito Identity Provider SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CognitoIdentityProvider.CreateGroup

Description

Creates a new group in the specified user pool.

Calling this action requires developer credentials.

Synopsis

Creating a Request

data CreateGroup Source #

See: newCreateGroup smart constructor.

Constructors

CreateGroup' 

Fields

  • description :: Maybe Text

    A string containing the description of the group.

  • precedence :: Maybe Natural

    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.

  • roleArn :: Maybe Text

    The role Amazon Resource Name (ARN) for the group.

  • groupName :: Text

    The name of the group. Must be unique.

  • userPoolId :: Text

    The user pool ID for the user pool.

Instances

Instances details
ToJSON CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

ToHeaders CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Methods

toHeaders :: CreateGroup -> [Header] #

ToPath CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

ToQuery CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

AWSRequest CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Associated Types

type AWSResponse CreateGroup #

Generic CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Associated Types

type Rep CreateGroup :: Type -> Type #

Read CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Show CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

NFData CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Methods

rnf :: CreateGroup -> () #

Eq CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Hashable CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

type AWSResponse CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

type Rep CreateGroup Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

type Rep CreateGroup = D1 ('MetaData "CreateGroup" "Amazonka.CognitoIdentityProvider.CreateGroup" "amazonka-cognito-idp-2.0-D1ERgMvEVPG9z8cOLXdU2" 'False) (C1 ('MetaCons "CreateGroup'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "precedence") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "roleArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "groupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "userPoolId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newCreateGroup Source #

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:

CreateGroup, createGroup_description - A string containing the description of the group.

CreateGroup, createGroup_precedence - 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.

CreateGroup, createGroup_roleArn - The role Amazon Resource Name (ARN) for the group.

CreateGroup, createGroup_groupName - The name of the group. Must be unique.

CreateGroup, createGroup_userPoolId - The user pool ID for the user pool.

Request Lenses

createGroup_description :: Lens' CreateGroup (Maybe Text) Source #

A string containing the description of the group.

createGroup_precedence :: Lens' CreateGroup (Maybe Natural) Source #

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.

createGroup_roleArn :: Lens' CreateGroup (Maybe Text) Source #

The role Amazon Resource Name (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.

Constructors

CreateGroupResponse' 

Fields

Instances

Instances details
Generic CreateGroupResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Associated Types

type Rep CreateGroupResponse :: Type -> Type #

Read CreateGroupResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Show CreateGroupResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

NFData CreateGroupResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

Methods

rnf :: CreateGroupResponse -> () #

Eq CreateGroupResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

type Rep CreateGroupResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateGroup

type Rep CreateGroupResponse = D1 ('MetaData "CreateGroupResponse" "Amazonka.CognitoIdentityProvider.CreateGroup" "amazonka-cognito-idp-2.0-D1ERgMvEVPG9z8cOLXdU2" 'False) (C1 ('MetaCons "CreateGroupResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "group'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe GroupType)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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