amazonka-cognito-idp-1.6.0: Amazon Cognito Identity Provider SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CognitoIdentityProvider.CreateGroup

Contents

Description

Creates a new group in the specified user pool.

Requires developer credentials.

Synopsis

Creating a Request

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 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 - 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 #

See: createGroup smart constructor.

Instances

Eq CreateGroup # 
Data CreateGroup # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateGroup -> c CreateGroup #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateGroup #

toConstr :: CreateGroup -> Constr #

dataTypeOf :: CreateGroup -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateGroup) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateGroup) #

gmapT :: (forall b. Data b => b -> b) -> CreateGroup -> CreateGroup #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateGroup -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateGroup -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateGroup -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateGroup -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateGroup -> m CreateGroup #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGroup -> m CreateGroup #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGroup -> m CreateGroup #

Read CreateGroup # 
Show CreateGroup # 
Generic CreateGroup # 

Associated Types

type Rep CreateGroup :: * -> * #

Hashable CreateGroup # 
ToJSON CreateGroup # 
NFData CreateGroup # 

Methods

rnf :: CreateGroup -> () #

AWSRequest CreateGroup # 
ToHeaders CreateGroup # 

Methods

toHeaders :: CreateGroup -> [Header] #

ToPath CreateGroup # 
ToQuery CreateGroup # 
type Rep CreateGroup # 
type Rep CreateGroup = D1 * (MetaData "CreateGroup" "Network.AWS.CognitoIdentityProvider.CreateGroup" "amazonka-cognito-idp-1.6.0-HX2vHucaSbyYp7rG4n6Wk" False) (C1 * (MetaCons "CreateGroup'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cgPrecedence") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Nat))) (S1 * (MetaSel (Just Symbol "_cgDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cgRoleARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cgGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cgUserPoolId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))))
type Rs CreateGroup # 

Request Lenses

cgPrecedence :: Lens' CreateGroup (Maybe Natural) #

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) #

A string containing the description of the group.

cgRoleARN :: Lens' CreateGroup (Maybe Text) #

The role ARN for the group.

cgGroupName :: Lens' CreateGroup Text #

The name of the group. Must be unique.

cgUserPoolId :: Lens' CreateGroup Text #

The user pool ID for the user pool.

Destructuring the Response

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:

data CreateGroupResponse #

See: createGroupResponse smart constructor.

Instances

Eq CreateGroupResponse # 
Data CreateGroupResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateGroupResponse -> c CreateGroupResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateGroupResponse #

toConstr :: CreateGroupResponse -> Constr #

dataTypeOf :: CreateGroupResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateGroupResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateGroupResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateGroupResponse -> CreateGroupResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateGroupResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateGroupResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateGroupResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateGroupResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateGroupResponse -> m CreateGroupResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGroupResponse -> m CreateGroupResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGroupResponse -> m CreateGroupResponse #

Read CreateGroupResponse # 
Show CreateGroupResponse # 
Generic CreateGroupResponse # 
NFData CreateGroupResponse # 

Methods

rnf :: CreateGroupResponse -> () #

type Rep CreateGroupResponse # 
type Rep CreateGroupResponse = D1 * (MetaData "CreateGroupResponse" "Network.AWS.CognitoIdentityProvider.CreateGroup" "amazonka-cognito-idp-1.6.0-HX2vHucaSbyYp7rG4n6Wk" False) (C1 * (MetaCons "CreateGroupResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cgrsGroup") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe GroupType))) (S1 * (MetaSel (Just Symbol "_cgrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

cgrsGroup :: Lens' CreateGroupResponse (Maybe GroupType) #

The group object for the group.

cgrsResponseStatus :: Lens' CreateGroupResponse Int #

  • - | The response status code.