module Network.AWS.CognitoIdentity.SetIdentityPoolRoles
(
SetIdentityPoolRoles
, setIdentityPoolRoles
, siprIdentityPoolId
, siprRoles
, SetIdentityPoolRolesResponse
, setIdentityPoolRolesResponse
) where
import Network.AWS.Data (Object)
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.CognitoIdentity.Types
import qualified GHC.Exts
data SetIdentityPoolRoles = SetIdentityPoolRoles
{ _siprIdentityPoolId :: Text
, _siprRoles :: Map Text Text
} deriving (Eq, Read, Show)
setIdentityPoolRoles :: Text
-> SetIdentityPoolRoles
setIdentityPoolRoles p1 = SetIdentityPoolRoles
{ _siprIdentityPoolId = p1
, _siprRoles = mempty
}
siprIdentityPoolId :: Lens' SetIdentityPoolRoles Text
siprIdentityPoolId =
lens _siprIdentityPoolId (\s a -> s { _siprIdentityPoolId = a })
siprRoles :: Lens' SetIdentityPoolRoles (HashMap Text Text)
siprRoles = lens _siprRoles (\s a -> s { _siprRoles = a }) . _Map
data SetIdentityPoolRolesResponse = SetIdentityPoolRolesResponse
deriving (Eq, Ord, Read, Show, Generic)
setIdentityPoolRolesResponse :: SetIdentityPoolRolesResponse
setIdentityPoolRolesResponse = SetIdentityPoolRolesResponse
instance ToPath SetIdentityPoolRoles where
toPath = const "/"
instance ToQuery SetIdentityPoolRoles where
toQuery = const mempty
instance ToHeaders SetIdentityPoolRoles
instance ToJSON SetIdentityPoolRoles where
toJSON SetIdentityPoolRoles{..} = object
[ "IdentityPoolId" .= _siprIdentityPoolId
, "Roles" .= _siprRoles
]
instance AWSRequest SetIdentityPoolRoles where
type Sv SetIdentityPoolRoles = CognitoIdentity
type Rs SetIdentityPoolRoles = SetIdentityPoolRolesResponse
request = post "SetIdentityPoolRoles"
response = nullResponse SetIdentityPoolRolesResponse