module Network.AWS.CognitoIdentity.UpdateIdentityPool
(
updateIdentityPool
, UpdateIdentityPool
, uipSupportedLoginProviders
, uipDeveloperProviderName
, uipOpenIdConnectProviderARNs
, uipIdentityPoolId
, uipIdentityPoolName
, uipAllowUnauthenticatedIdentities
, identityPool
, IdentityPool
, ipSupportedLoginProviders
, ipDeveloperProviderName
, ipOpenIdConnectProviderARNs
, ipIdentityPoolId
, ipIdentityPoolName
, ipAllowUnauthenticatedIdentities
) where
import Network.AWS.CognitoIdentity.Types
import Network.AWS.CognitoIdentity.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateIdentityPool = UpdateIdentityPool'
{ _uipSupportedLoginProviders :: !(Maybe (Map Text Text))
, _uipDeveloperProviderName :: !(Maybe Text)
, _uipOpenIdConnectProviderARNs :: !(Maybe [Text])
, _uipIdentityPoolId :: !Text
, _uipIdentityPoolName :: !Text
, _uipAllowUnauthenticatedIdentities :: !Bool
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateIdentityPool
:: Text
-> Text
-> Bool
-> UpdateIdentityPool
updateIdentityPool pIdentityPoolId_ pIdentityPoolName_ pAllowUnauthenticatedIdentities_ =
UpdateIdentityPool'
{ _uipSupportedLoginProviders = Nothing
, _uipDeveloperProviderName = Nothing
, _uipOpenIdConnectProviderARNs = Nothing
, _uipIdentityPoolId = pIdentityPoolId_
, _uipIdentityPoolName = pIdentityPoolName_
, _uipAllowUnauthenticatedIdentities = pAllowUnauthenticatedIdentities_
}
uipSupportedLoginProviders :: Lens' UpdateIdentityPool (HashMap Text Text)
uipSupportedLoginProviders = lens _uipSupportedLoginProviders (\ s a -> s{_uipSupportedLoginProviders = a}) . _Default . _Map;
uipDeveloperProviderName :: Lens' UpdateIdentityPool (Maybe Text)
uipDeveloperProviderName = lens _uipDeveloperProviderName (\ s a -> s{_uipDeveloperProviderName = a});
uipOpenIdConnectProviderARNs :: Lens' UpdateIdentityPool [Text]
uipOpenIdConnectProviderARNs = lens _uipOpenIdConnectProviderARNs (\ s a -> s{_uipOpenIdConnectProviderARNs = a}) . _Default . _Coerce;
uipIdentityPoolId :: Lens' UpdateIdentityPool Text
uipIdentityPoolId = lens _uipIdentityPoolId (\ s a -> s{_uipIdentityPoolId = a});
uipIdentityPoolName :: Lens' UpdateIdentityPool Text
uipIdentityPoolName = lens _uipIdentityPoolName (\ s a -> s{_uipIdentityPoolName = a});
uipAllowUnauthenticatedIdentities :: Lens' UpdateIdentityPool Bool
uipAllowUnauthenticatedIdentities = lens _uipAllowUnauthenticatedIdentities (\ s a -> s{_uipAllowUnauthenticatedIdentities = a});
instance AWSRequest UpdateIdentityPool where
type Rs UpdateIdentityPool = IdentityPool
request = postJSON cognitoIdentity
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance ToHeaders UpdateIdentityPool where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSCognitoIdentityService.UpdateIdentityPool" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateIdentityPool where
toJSON UpdateIdentityPool'{..}
= object
(catMaybes
[("SupportedLoginProviders" .=) <$>
_uipSupportedLoginProviders,
("DeveloperProviderName" .=) <$>
_uipDeveloperProviderName,
("OpenIdConnectProviderARNs" .=) <$>
_uipOpenIdConnectProviderARNs,
Just ("IdentityPoolId" .= _uipIdentityPoolId),
Just ("IdentityPoolName" .= _uipIdentityPoolName),
Just
("AllowUnauthenticatedIdentities" .=
_uipAllowUnauthenticatedIdentities)])
instance ToPath UpdateIdentityPool where
toPath = const "/"
instance ToQuery UpdateIdentityPool where
toQuery = const mempty