{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CognitoIdentity.CreateIdentityPool
(
CreateIdentityPool (..),
newCreateIdentityPool,
createIdentityPool_samlProviderARNs,
createIdentityPool_supportedLoginProviders,
createIdentityPool_allowClassicFlow,
createIdentityPool_developerProviderName,
createIdentityPool_identityPoolTags,
createIdentityPool_openIdConnectProviderARNs,
createIdentityPool_cognitoIdentityProviders,
createIdentityPool_identityPoolName,
createIdentityPool_allowUnauthenticatedIdentities,
IdentityPool (..),
newIdentityPool,
identityPool_samlProviderARNs,
identityPool_supportedLoginProviders,
identityPool_allowClassicFlow,
identityPool_developerProviderName,
identityPool_identityPoolTags,
identityPool_openIdConnectProviderARNs,
identityPool_cognitoIdentityProviders,
identityPool_identityPoolId,
identityPool_identityPoolName,
identityPool_allowUnauthenticatedIdentities,
)
where
import Amazonka.CognitoIdentity.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateIdentityPool = CreateIdentityPool'
{
CreateIdentityPool -> Maybe [Text]
samlProviderARNs :: Prelude.Maybe [Prelude.Text],
CreateIdentityPool -> Maybe (HashMap Text Text)
supportedLoginProviders :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateIdentityPool -> Maybe Bool
allowClassicFlow :: Prelude.Maybe Prelude.Bool,
CreateIdentityPool -> Maybe Text
developerProviderName :: Prelude.Maybe Prelude.Text,
CreateIdentityPool -> Maybe (HashMap Text Text)
identityPoolTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateIdentityPool -> Maybe [Text]
openIdConnectProviderARNs :: Prelude.Maybe [Prelude.Text],
CreateIdentityPool -> Maybe [CognitoIdentityProvider]
cognitoIdentityProviders :: Prelude.Maybe [CognitoIdentityProvider],
CreateIdentityPool -> Text
identityPoolName :: Prelude.Text,
CreateIdentityPool -> Bool
allowUnauthenticatedIdentities :: Prelude.Bool
}
deriving (CreateIdentityPool -> CreateIdentityPool -> Bool
(CreateIdentityPool -> CreateIdentityPool -> Bool)
-> (CreateIdentityPool -> CreateIdentityPool -> Bool)
-> Eq CreateIdentityPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIdentityPool -> CreateIdentityPool -> Bool
$c/= :: CreateIdentityPool -> CreateIdentityPool -> Bool
== :: CreateIdentityPool -> CreateIdentityPool -> Bool
$c== :: CreateIdentityPool -> CreateIdentityPool -> Bool
Prelude.Eq, ReadPrec [CreateIdentityPool]
ReadPrec CreateIdentityPool
Int -> ReadS CreateIdentityPool
ReadS [CreateIdentityPool]
(Int -> ReadS CreateIdentityPool)
-> ReadS [CreateIdentityPool]
-> ReadPrec CreateIdentityPool
-> ReadPrec [CreateIdentityPool]
-> Read CreateIdentityPool
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIdentityPool]
$creadListPrec :: ReadPrec [CreateIdentityPool]
readPrec :: ReadPrec CreateIdentityPool
$creadPrec :: ReadPrec CreateIdentityPool
readList :: ReadS [CreateIdentityPool]
$creadList :: ReadS [CreateIdentityPool]
readsPrec :: Int -> ReadS CreateIdentityPool
$creadsPrec :: Int -> ReadS CreateIdentityPool
Prelude.Read, Int -> CreateIdentityPool -> ShowS
[CreateIdentityPool] -> ShowS
CreateIdentityPool -> String
(Int -> CreateIdentityPool -> ShowS)
-> (CreateIdentityPool -> String)
-> ([CreateIdentityPool] -> ShowS)
-> Show CreateIdentityPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIdentityPool] -> ShowS
$cshowList :: [CreateIdentityPool] -> ShowS
show :: CreateIdentityPool -> String
$cshow :: CreateIdentityPool -> String
showsPrec :: Int -> CreateIdentityPool -> ShowS
$cshowsPrec :: Int -> CreateIdentityPool -> ShowS
Prelude.Show, (forall x. CreateIdentityPool -> Rep CreateIdentityPool x)
-> (forall x. Rep CreateIdentityPool x -> CreateIdentityPool)
-> Generic CreateIdentityPool
forall x. Rep CreateIdentityPool x -> CreateIdentityPool
forall x. CreateIdentityPool -> Rep CreateIdentityPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIdentityPool x -> CreateIdentityPool
$cfrom :: forall x. CreateIdentityPool -> Rep CreateIdentityPool x
Prelude.Generic)
newCreateIdentityPool ::
Prelude.Text ->
Prelude.Bool ->
CreateIdentityPool
newCreateIdentityPool :: Text -> Bool -> CreateIdentityPool
newCreateIdentityPool
Text
pIdentityPoolName_
Bool
pAllowUnauthenticatedIdentities_ =
CreateIdentityPool' :: Maybe [Text]
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe [Text]
-> Maybe [CognitoIdentityProvider]
-> Text
-> Bool
-> CreateIdentityPool
CreateIdentityPool'
{ $sel:samlProviderARNs:CreateIdentityPool' :: Maybe [Text]
samlProviderARNs =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:supportedLoginProviders:CreateIdentityPool' :: Maybe (HashMap Text Text)
supportedLoginProviders = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:allowClassicFlow:CreateIdentityPool' :: Maybe Bool
allowClassicFlow = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:developerProviderName:CreateIdentityPool' :: Maybe Text
developerProviderName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityPoolTags:CreateIdentityPool' :: Maybe (HashMap Text Text)
identityPoolTags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:openIdConnectProviderARNs:CreateIdentityPool' :: Maybe [Text]
openIdConnectProviderARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:cognitoIdentityProviders:CreateIdentityPool' :: Maybe [CognitoIdentityProvider]
cognitoIdentityProviders = Maybe [CognitoIdentityProvider]
forall a. Maybe a
Prelude.Nothing,
$sel:identityPoolName:CreateIdentityPool' :: Text
identityPoolName = Text
pIdentityPoolName_,
$sel:allowUnauthenticatedIdentities:CreateIdentityPool' :: Bool
allowUnauthenticatedIdentities =
Bool
pAllowUnauthenticatedIdentities_
}
createIdentityPool_samlProviderARNs :: Lens.Lens' CreateIdentityPool (Prelude.Maybe [Prelude.Text])
createIdentityPool_samlProviderARNs :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_samlProviderARNs = (CreateIdentityPool -> Maybe [Text])
-> (CreateIdentityPool -> Maybe [Text] -> CreateIdentityPool)
-> Lens
CreateIdentityPool CreateIdentityPool (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Maybe [Text]
samlProviderARNs :: Maybe [Text]
$sel:samlProviderARNs:CreateIdentityPool' :: CreateIdentityPool -> Maybe [Text]
samlProviderARNs} -> Maybe [Text]
samlProviderARNs) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Maybe [Text]
a -> CreateIdentityPool
s {$sel:samlProviderARNs:CreateIdentityPool' :: Maybe [Text]
samlProviderARNs = Maybe [Text]
a} :: CreateIdentityPool) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateIdentityPool -> f CreateIdentityPool)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateIdentityPool
-> f CreateIdentityPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIdentityPool_supportedLoginProviders :: Lens.Lens' CreateIdentityPool (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIdentityPool_supportedLoginProviders :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_supportedLoginProviders = (CreateIdentityPool -> Maybe (HashMap Text Text))
-> (CreateIdentityPool
-> Maybe (HashMap Text Text) -> CreateIdentityPool)
-> Lens
CreateIdentityPool
CreateIdentityPool
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Maybe (HashMap Text Text)
supportedLoginProviders :: Maybe (HashMap Text Text)
$sel:supportedLoginProviders:CreateIdentityPool' :: CreateIdentityPool -> Maybe (HashMap Text Text)
supportedLoginProviders} -> Maybe (HashMap Text Text)
supportedLoginProviders) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Maybe (HashMap Text Text)
a -> CreateIdentityPool
s {$sel:supportedLoginProviders:CreateIdentityPool' :: Maybe (HashMap Text Text)
supportedLoginProviders = Maybe (HashMap Text Text)
a} :: CreateIdentityPool) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIdentityPool -> f CreateIdentityPool)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIdentityPool
-> f CreateIdentityPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIdentityPool_allowClassicFlow :: Lens.Lens' CreateIdentityPool (Prelude.Maybe Prelude.Bool)
createIdentityPool_allowClassicFlow :: (Maybe Bool -> f (Maybe Bool))
-> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_allowClassicFlow = (CreateIdentityPool -> Maybe Bool)
-> (CreateIdentityPool -> Maybe Bool -> CreateIdentityPool)
-> Lens
CreateIdentityPool CreateIdentityPool (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Maybe Bool
allowClassicFlow :: Maybe Bool
$sel:allowClassicFlow:CreateIdentityPool' :: CreateIdentityPool -> Maybe Bool
allowClassicFlow} -> Maybe Bool
allowClassicFlow) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Maybe Bool
a -> CreateIdentityPool
s {$sel:allowClassicFlow:CreateIdentityPool' :: Maybe Bool
allowClassicFlow = Maybe Bool
a} :: CreateIdentityPool)
createIdentityPool_developerProviderName :: Lens.Lens' CreateIdentityPool (Prelude.Maybe Prelude.Text)
createIdentityPool_developerProviderName :: (Maybe Text -> f (Maybe Text))
-> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_developerProviderName = (CreateIdentityPool -> Maybe Text)
-> (CreateIdentityPool -> Maybe Text -> CreateIdentityPool)
-> Lens
CreateIdentityPool CreateIdentityPool (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Maybe Text
developerProviderName :: Maybe Text
$sel:developerProviderName:CreateIdentityPool' :: CreateIdentityPool -> Maybe Text
developerProviderName} -> Maybe Text
developerProviderName) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Maybe Text
a -> CreateIdentityPool
s {$sel:developerProviderName:CreateIdentityPool' :: Maybe Text
developerProviderName = Maybe Text
a} :: CreateIdentityPool)
createIdentityPool_identityPoolTags :: Lens.Lens' CreateIdentityPool (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIdentityPool_identityPoolTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_identityPoolTags = (CreateIdentityPool -> Maybe (HashMap Text Text))
-> (CreateIdentityPool
-> Maybe (HashMap Text Text) -> CreateIdentityPool)
-> Lens
CreateIdentityPool
CreateIdentityPool
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Maybe (HashMap Text Text)
identityPoolTags :: Maybe (HashMap Text Text)
$sel:identityPoolTags:CreateIdentityPool' :: CreateIdentityPool -> Maybe (HashMap Text Text)
identityPoolTags} -> Maybe (HashMap Text Text)
identityPoolTags) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Maybe (HashMap Text Text)
a -> CreateIdentityPool
s {$sel:identityPoolTags:CreateIdentityPool' :: Maybe (HashMap Text Text)
identityPoolTags = Maybe (HashMap Text Text)
a} :: CreateIdentityPool) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIdentityPool -> f CreateIdentityPool)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIdentityPool
-> f CreateIdentityPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIdentityPool_openIdConnectProviderARNs :: Lens.Lens' CreateIdentityPool (Prelude.Maybe [Prelude.Text])
createIdentityPool_openIdConnectProviderARNs :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_openIdConnectProviderARNs = (CreateIdentityPool -> Maybe [Text])
-> (CreateIdentityPool -> Maybe [Text] -> CreateIdentityPool)
-> Lens
CreateIdentityPool CreateIdentityPool (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Maybe [Text]
openIdConnectProviderARNs :: Maybe [Text]
$sel:openIdConnectProviderARNs:CreateIdentityPool' :: CreateIdentityPool -> Maybe [Text]
openIdConnectProviderARNs} -> Maybe [Text]
openIdConnectProviderARNs) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Maybe [Text]
a -> CreateIdentityPool
s {$sel:openIdConnectProviderARNs:CreateIdentityPool' :: Maybe [Text]
openIdConnectProviderARNs = Maybe [Text]
a} :: CreateIdentityPool) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateIdentityPool -> f CreateIdentityPool)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateIdentityPool
-> f CreateIdentityPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIdentityPool_cognitoIdentityProviders :: Lens.Lens' CreateIdentityPool (Prelude.Maybe [CognitoIdentityProvider])
createIdentityPool_cognitoIdentityProviders :: (Maybe [CognitoIdentityProvider]
-> f (Maybe [CognitoIdentityProvider]))
-> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_cognitoIdentityProviders = (CreateIdentityPool -> Maybe [CognitoIdentityProvider])
-> (CreateIdentityPool
-> Maybe [CognitoIdentityProvider] -> CreateIdentityPool)
-> Lens
CreateIdentityPool
CreateIdentityPool
(Maybe [CognitoIdentityProvider])
(Maybe [CognitoIdentityProvider])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Maybe [CognitoIdentityProvider]
cognitoIdentityProviders :: Maybe [CognitoIdentityProvider]
$sel:cognitoIdentityProviders:CreateIdentityPool' :: CreateIdentityPool -> Maybe [CognitoIdentityProvider]
cognitoIdentityProviders} -> Maybe [CognitoIdentityProvider]
cognitoIdentityProviders) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Maybe [CognitoIdentityProvider]
a -> CreateIdentityPool
s {$sel:cognitoIdentityProviders:CreateIdentityPool' :: Maybe [CognitoIdentityProvider]
cognitoIdentityProviders = Maybe [CognitoIdentityProvider]
a} :: CreateIdentityPool) ((Maybe [CognitoIdentityProvider]
-> f (Maybe [CognitoIdentityProvider]))
-> CreateIdentityPool -> f CreateIdentityPool)
-> ((Maybe [CognitoIdentityProvider]
-> f (Maybe [CognitoIdentityProvider]))
-> Maybe [CognitoIdentityProvider]
-> f (Maybe [CognitoIdentityProvider]))
-> (Maybe [CognitoIdentityProvider]
-> f (Maybe [CognitoIdentityProvider]))
-> CreateIdentityPool
-> f CreateIdentityPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CognitoIdentityProvider]
[CognitoIdentityProvider]
[CognitoIdentityProvider]
[CognitoIdentityProvider]
-> Iso
(Maybe [CognitoIdentityProvider])
(Maybe [CognitoIdentityProvider])
(Maybe [CognitoIdentityProvider])
(Maybe [CognitoIdentityProvider])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[CognitoIdentityProvider]
[CognitoIdentityProvider]
[CognitoIdentityProvider]
[CognitoIdentityProvider]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIdentityPool_identityPoolName :: Lens.Lens' CreateIdentityPool Prelude.Text
createIdentityPool_identityPoolName :: (Text -> f Text) -> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_identityPoolName = (CreateIdentityPool -> Text)
-> (CreateIdentityPool -> Text -> CreateIdentityPool)
-> Lens CreateIdentityPool CreateIdentityPool Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Text
identityPoolName :: Text
$sel:identityPoolName:CreateIdentityPool' :: CreateIdentityPool -> Text
identityPoolName} -> Text
identityPoolName) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Text
a -> CreateIdentityPool
s {$sel:identityPoolName:CreateIdentityPool' :: Text
identityPoolName = Text
a} :: CreateIdentityPool)
createIdentityPool_allowUnauthenticatedIdentities :: Lens.Lens' CreateIdentityPool Prelude.Bool
createIdentityPool_allowUnauthenticatedIdentities :: (Bool -> f Bool) -> CreateIdentityPool -> f CreateIdentityPool
createIdentityPool_allowUnauthenticatedIdentities = (CreateIdentityPool -> Bool)
-> (CreateIdentityPool -> Bool -> CreateIdentityPool)
-> Lens CreateIdentityPool CreateIdentityPool Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIdentityPool' {Bool
allowUnauthenticatedIdentities :: Bool
$sel:allowUnauthenticatedIdentities:CreateIdentityPool' :: CreateIdentityPool -> Bool
allowUnauthenticatedIdentities} -> Bool
allowUnauthenticatedIdentities) (\s :: CreateIdentityPool
s@CreateIdentityPool' {} Bool
a -> CreateIdentityPool
s {$sel:allowUnauthenticatedIdentities:CreateIdentityPool' :: Bool
allowUnauthenticatedIdentities = Bool
a} :: CreateIdentityPool)
instance Core.AWSRequest CreateIdentityPool where
type AWSResponse CreateIdentityPool = IdentityPool
request :: CreateIdentityPool -> Request CreateIdentityPool
request = Service -> CreateIdentityPool -> Request CreateIdentityPool
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateIdentityPool
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateIdentityPool)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateIdentityPool))
-> Logger
-> Service
-> Proxy CreateIdentityPool
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateIdentityPool)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
(\Int
s ResponseHeaders
h Object
x -> Object -> Either String IdentityPool
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance Prelude.Hashable CreateIdentityPool
instance Prelude.NFData CreateIdentityPool
instance Core.ToHeaders CreateIdentityPool where
toHeaders :: CreateIdentityPool -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateIdentityPool -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSCognitoIdentityService.CreateIdentityPool" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateIdentityPool where
toJSON :: CreateIdentityPool -> Value
toJSON CreateIdentityPool' {Bool
Maybe Bool
Maybe [Text]
Maybe [CognitoIdentityProvider]
Maybe Text
Maybe (HashMap Text Text)
Text
allowUnauthenticatedIdentities :: Bool
identityPoolName :: Text
cognitoIdentityProviders :: Maybe [CognitoIdentityProvider]
openIdConnectProviderARNs :: Maybe [Text]
identityPoolTags :: Maybe (HashMap Text Text)
developerProviderName :: Maybe Text
allowClassicFlow :: Maybe Bool
supportedLoginProviders :: Maybe (HashMap Text Text)
samlProviderARNs :: Maybe [Text]
$sel:allowUnauthenticatedIdentities:CreateIdentityPool' :: CreateIdentityPool -> Bool
$sel:identityPoolName:CreateIdentityPool' :: CreateIdentityPool -> Text
$sel:cognitoIdentityProviders:CreateIdentityPool' :: CreateIdentityPool -> Maybe [CognitoIdentityProvider]
$sel:openIdConnectProviderARNs:CreateIdentityPool' :: CreateIdentityPool -> Maybe [Text]
$sel:identityPoolTags:CreateIdentityPool' :: CreateIdentityPool -> Maybe (HashMap Text Text)
$sel:developerProviderName:CreateIdentityPool' :: CreateIdentityPool -> Maybe Text
$sel:allowClassicFlow:CreateIdentityPool' :: CreateIdentityPool -> Maybe Bool
$sel:supportedLoginProviders:CreateIdentityPool' :: CreateIdentityPool -> Maybe (HashMap Text Text)
$sel:samlProviderARNs:CreateIdentityPool' :: CreateIdentityPool -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SamlProviderARNs" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
samlProviderARNs,
(Text
"SupportedLoginProviders" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
supportedLoginProviders,
(Text
"AllowClassicFlow" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
allowClassicFlow,
(Text
"DeveloperProviderName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
developerProviderName,
(Text
"IdentityPoolTags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
identityPoolTags,
(Text
"OpenIdConnectProviderARNs" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
openIdConnectProviderARNs,
(Text
"CognitoIdentityProviders" Text -> [CognitoIdentityProvider] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([CognitoIdentityProvider] -> Pair)
-> Maybe [CognitoIdentityProvider] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CognitoIdentityProvider]
cognitoIdentityProviders,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"IdentityPoolName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identityPoolName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"AllowUnauthenticatedIdentities"
Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
allowUnauthenticatedIdentities
)
]
)
instance Core.ToPath CreateIdentityPool where
toPath :: CreateIdentityPool -> ByteString
toPath = ByteString -> CreateIdentityPool -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateIdentityPool where
toQuery :: CreateIdentityPool -> QueryString
toQuery = QueryString -> CreateIdentityPool -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty