{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.CognitoIdentity.DescribeIdentityPool
(
describeIdentityPool
, DescribeIdentityPool
, dipIdentityPoolId
, identityPool
, IdentityPool
, ipSamlProviderARNs
, ipSupportedLoginProviders
, ipDeveloperProviderName
, ipOpenIdConnectProviderARNs
, ipCognitoIdentityProviders
, ipIdentityPoolId
, ipIdentityPoolName
, ipAllowUnauthenticatedIdentities
) where
import Network.AWS.CognitoIdentity.Types
import Network.AWS.CognitoIdentity.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeIdentityPool = DescribeIdentityPool'
{ _dipIdentityPoolId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeIdentityPool
:: Text
-> DescribeIdentityPool
describeIdentityPool pIdentityPoolId_ =
DescribeIdentityPool' {_dipIdentityPoolId = pIdentityPoolId_}
dipIdentityPoolId :: Lens' DescribeIdentityPool Text
dipIdentityPoolId = lens _dipIdentityPoolId (\ s a -> s{_dipIdentityPoolId = a})
instance AWSRequest DescribeIdentityPool where
type Rs DescribeIdentityPool = IdentityPool
request = postJSON cognitoIdentity
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable DescribeIdentityPool where
instance NFData DescribeIdentityPool where
instance ToHeaders DescribeIdentityPool where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSCognitoIdentityService.DescribeIdentityPool" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeIdentityPool where
toJSON DescribeIdentityPool'{..}
= object
(catMaybes
[Just ("IdentityPoolId" .= _dipIdentityPoolId)])
instance ToPath DescribeIdentityPool where
toPath = const "/"
instance ToQuery DescribeIdentityPool where
toQuery = const mempty