module Network.AWS.CognitoIdentity.DescribeIdentityPool
(
describeIdentityPool
, DescribeIdentityPool
, dipIdentityPoolId
, 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
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 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