{-# 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.EKS.DescribeIdentityProviderConfig
(
DescribeIdentityProviderConfig (..),
newDescribeIdentityProviderConfig,
describeIdentityProviderConfig_clusterName,
describeIdentityProviderConfig_identityProviderConfig,
DescribeIdentityProviderConfigResponse (..),
newDescribeIdentityProviderConfigResponse,
describeIdentityProviderConfigResponse_identityProviderConfig,
describeIdentityProviderConfigResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EKS.Types
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 DescribeIdentityProviderConfig = DescribeIdentityProviderConfig'
{
DescribeIdentityProviderConfig -> Text
clusterName :: Prelude.Text,
DescribeIdentityProviderConfig -> IdentityProviderConfig
identityProviderConfig :: IdentityProviderConfig
}
deriving (DescribeIdentityProviderConfig
-> DescribeIdentityProviderConfig -> Bool
(DescribeIdentityProviderConfig
-> DescribeIdentityProviderConfig -> Bool)
-> (DescribeIdentityProviderConfig
-> DescribeIdentityProviderConfig -> Bool)
-> Eq DescribeIdentityProviderConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeIdentityProviderConfig
-> DescribeIdentityProviderConfig -> Bool
$c/= :: DescribeIdentityProviderConfig
-> DescribeIdentityProviderConfig -> Bool
== :: DescribeIdentityProviderConfig
-> DescribeIdentityProviderConfig -> Bool
$c== :: DescribeIdentityProviderConfig
-> DescribeIdentityProviderConfig -> Bool
Prelude.Eq, ReadPrec [DescribeIdentityProviderConfig]
ReadPrec DescribeIdentityProviderConfig
Int -> ReadS DescribeIdentityProviderConfig
ReadS [DescribeIdentityProviderConfig]
(Int -> ReadS DescribeIdentityProviderConfig)
-> ReadS [DescribeIdentityProviderConfig]
-> ReadPrec DescribeIdentityProviderConfig
-> ReadPrec [DescribeIdentityProviderConfig]
-> Read DescribeIdentityProviderConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeIdentityProviderConfig]
$creadListPrec :: ReadPrec [DescribeIdentityProviderConfig]
readPrec :: ReadPrec DescribeIdentityProviderConfig
$creadPrec :: ReadPrec DescribeIdentityProviderConfig
readList :: ReadS [DescribeIdentityProviderConfig]
$creadList :: ReadS [DescribeIdentityProviderConfig]
readsPrec :: Int -> ReadS DescribeIdentityProviderConfig
$creadsPrec :: Int -> ReadS DescribeIdentityProviderConfig
Prelude.Read, Int -> DescribeIdentityProviderConfig -> ShowS
[DescribeIdentityProviderConfig] -> ShowS
DescribeIdentityProviderConfig -> String
(Int -> DescribeIdentityProviderConfig -> ShowS)
-> (DescribeIdentityProviderConfig -> String)
-> ([DescribeIdentityProviderConfig] -> ShowS)
-> Show DescribeIdentityProviderConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeIdentityProviderConfig] -> ShowS
$cshowList :: [DescribeIdentityProviderConfig] -> ShowS
show :: DescribeIdentityProviderConfig -> String
$cshow :: DescribeIdentityProviderConfig -> String
showsPrec :: Int -> DescribeIdentityProviderConfig -> ShowS
$cshowsPrec :: Int -> DescribeIdentityProviderConfig -> ShowS
Prelude.Show, (forall x.
DescribeIdentityProviderConfig
-> Rep DescribeIdentityProviderConfig x)
-> (forall x.
Rep DescribeIdentityProviderConfig x
-> DescribeIdentityProviderConfig)
-> Generic DescribeIdentityProviderConfig
forall x.
Rep DescribeIdentityProviderConfig x
-> DescribeIdentityProviderConfig
forall x.
DescribeIdentityProviderConfig
-> Rep DescribeIdentityProviderConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeIdentityProviderConfig x
-> DescribeIdentityProviderConfig
$cfrom :: forall x.
DescribeIdentityProviderConfig
-> Rep DescribeIdentityProviderConfig x
Prelude.Generic)
newDescribeIdentityProviderConfig ::
Prelude.Text ->
IdentityProviderConfig ->
DescribeIdentityProviderConfig
newDescribeIdentityProviderConfig :: Text -> IdentityProviderConfig -> DescribeIdentityProviderConfig
newDescribeIdentityProviderConfig
Text
pClusterName_
IdentityProviderConfig
pIdentityProviderConfig_ =
DescribeIdentityProviderConfig' :: Text -> IdentityProviderConfig -> DescribeIdentityProviderConfig
DescribeIdentityProviderConfig'
{ $sel:clusterName:DescribeIdentityProviderConfig' :: Text
clusterName =
Text
pClusterName_,
$sel:identityProviderConfig:DescribeIdentityProviderConfig' :: IdentityProviderConfig
identityProviderConfig =
IdentityProviderConfig
pIdentityProviderConfig_
}
describeIdentityProviderConfig_clusterName :: Lens.Lens' DescribeIdentityProviderConfig Prelude.Text
describeIdentityProviderConfig_clusterName :: (Text -> f Text)
-> DescribeIdentityProviderConfig
-> f DescribeIdentityProviderConfig
describeIdentityProviderConfig_clusterName = (DescribeIdentityProviderConfig -> Text)
-> (DescribeIdentityProviderConfig
-> Text -> DescribeIdentityProviderConfig)
-> Lens
DescribeIdentityProviderConfig
DescribeIdentityProviderConfig
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIdentityProviderConfig' {Text
clusterName :: Text
$sel:clusterName:DescribeIdentityProviderConfig' :: DescribeIdentityProviderConfig -> Text
clusterName} -> Text
clusterName) (\s :: DescribeIdentityProviderConfig
s@DescribeIdentityProviderConfig' {} Text
a -> DescribeIdentityProviderConfig
s {$sel:clusterName:DescribeIdentityProviderConfig' :: Text
clusterName = Text
a} :: DescribeIdentityProviderConfig)
describeIdentityProviderConfig_identityProviderConfig :: Lens.Lens' DescribeIdentityProviderConfig IdentityProviderConfig
describeIdentityProviderConfig_identityProviderConfig :: (IdentityProviderConfig -> f IdentityProviderConfig)
-> DescribeIdentityProviderConfig
-> f DescribeIdentityProviderConfig
describeIdentityProviderConfig_identityProviderConfig = (DescribeIdentityProviderConfig -> IdentityProviderConfig)
-> (DescribeIdentityProviderConfig
-> IdentityProviderConfig -> DescribeIdentityProviderConfig)
-> Lens
DescribeIdentityProviderConfig
DescribeIdentityProviderConfig
IdentityProviderConfig
IdentityProviderConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIdentityProviderConfig' {IdentityProviderConfig
identityProviderConfig :: IdentityProviderConfig
$sel:identityProviderConfig:DescribeIdentityProviderConfig' :: DescribeIdentityProviderConfig -> IdentityProviderConfig
identityProviderConfig} -> IdentityProviderConfig
identityProviderConfig) (\s :: DescribeIdentityProviderConfig
s@DescribeIdentityProviderConfig' {} IdentityProviderConfig
a -> DescribeIdentityProviderConfig
s {$sel:identityProviderConfig:DescribeIdentityProviderConfig' :: IdentityProviderConfig
identityProviderConfig = IdentityProviderConfig
a} :: DescribeIdentityProviderConfig)
instance
Core.AWSRequest
DescribeIdentityProviderConfig
where
type
AWSResponse DescribeIdentityProviderConfig =
DescribeIdentityProviderConfigResponse
request :: DescribeIdentityProviderConfig
-> Request DescribeIdentityProviderConfig
request = Service
-> DescribeIdentityProviderConfig
-> Request DescribeIdentityProviderConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeIdentityProviderConfig
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeIdentityProviderConfig)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeIdentityProviderConfig))
-> Logger
-> Service
-> Proxy DescribeIdentityProviderConfig
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeIdentityProviderConfig)))
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 ->
Maybe IdentityProviderConfigResponse
-> Int -> DescribeIdentityProviderConfigResponse
DescribeIdentityProviderConfigResponse'
(Maybe IdentityProviderConfigResponse
-> Int -> DescribeIdentityProviderConfigResponse)
-> Either String (Maybe IdentityProviderConfigResponse)
-> Either String (Int -> DescribeIdentityProviderConfigResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe IdentityProviderConfigResponse)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"identityProviderConfig")
Either String (Int -> DescribeIdentityProviderConfigResponse)
-> Either String Int
-> Either String DescribeIdentityProviderConfigResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DescribeIdentityProviderConfig
instance
Prelude.NFData
DescribeIdentityProviderConfig
instance
Core.ToHeaders
DescribeIdentityProviderConfig
where
toHeaders :: DescribeIdentityProviderConfig -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeIdentityProviderConfig -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 DescribeIdentityProviderConfig where
toJSON :: DescribeIdentityProviderConfig -> Value
toJSON DescribeIdentityProviderConfig' {Text
IdentityProviderConfig
identityProviderConfig :: IdentityProviderConfig
clusterName :: Text
$sel:identityProviderConfig:DescribeIdentityProviderConfig' :: DescribeIdentityProviderConfig -> IdentityProviderConfig
$sel:clusterName:DescribeIdentityProviderConfig' :: DescribeIdentityProviderConfig -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"identityProviderConfig"
Text -> IdentityProviderConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= IdentityProviderConfig
identityProviderConfig
)
]
)
instance Core.ToPath DescribeIdentityProviderConfig where
toPath :: DescribeIdentityProviderConfig -> ByteString
toPath DescribeIdentityProviderConfig' {Text
IdentityProviderConfig
identityProviderConfig :: IdentityProviderConfig
clusterName :: Text
$sel:identityProviderConfig:DescribeIdentityProviderConfig' :: DescribeIdentityProviderConfig -> IdentityProviderConfig
$sel:clusterName:DescribeIdentityProviderConfig' :: DescribeIdentityProviderConfig -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/clusters/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterName,
ByteString
"/identity-provider-configs/describe"
]
instance Core.ToQuery DescribeIdentityProviderConfig where
toQuery :: DescribeIdentityProviderConfig -> QueryString
toQuery = QueryString -> DescribeIdentityProviderConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeIdentityProviderConfigResponse = DescribeIdentityProviderConfigResponse'
{
DescribeIdentityProviderConfigResponse
-> Maybe IdentityProviderConfigResponse
identityProviderConfig :: Prelude.Maybe IdentityProviderConfigResponse,
DescribeIdentityProviderConfigResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeIdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse -> Bool
(DescribeIdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse -> Bool)
-> (DescribeIdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse -> Bool)
-> Eq DescribeIdentityProviderConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeIdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse -> Bool
$c/= :: DescribeIdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse -> Bool
== :: DescribeIdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse -> Bool
$c== :: DescribeIdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse -> Bool
Prelude.Eq, ReadPrec [DescribeIdentityProviderConfigResponse]
ReadPrec DescribeIdentityProviderConfigResponse
Int -> ReadS DescribeIdentityProviderConfigResponse
ReadS [DescribeIdentityProviderConfigResponse]
(Int -> ReadS DescribeIdentityProviderConfigResponse)
-> ReadS [DescribeIdentityProviderConfigResponse]
-> ReadPrec DescribeIdentityProviderConfigResponse
-> ReadPrec [DescribeIdentityProviderConfigResponse]
-> Read DescribeIdentityProviderConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeIdentityProviderConfigResponse]
$creadListPrec :: ReadPrec [DescribeIdentityProviderConfigResponse]
readPrec :: ReadPrec DescribeIdentityProviderConfigResponse
$creadPrec :: ReadPrec DescribeIdentityProviderConfigResponse
readList :: ReadS [DescribeIdentityProviderConfigResponse]
$creadList :: ReadS [DescribeIdentityProviderConfigResponse]
readsPrec :: Int -> ReadS DescribeIdentityProviderConfigResponse
$creadsPrec :: Int -> ReadS DescribeIdentityProviderConfigResponse
Prelude.Read, Int -> DescribeIdentityProviderConfigResponse -> ShowS
[DescribeIdentityProviderConfigResponse] -> ShowS
DescribeIdentityProviderConfigResponse -> String
(Int -> DescribeIdentityProviderConfigResponse -> ShowS)
-> (DescribeIdentityProviderConfigResponse -> String)
-> ([DescribeIdentityProviderConfigResponse] -> ShowS)
-> Show DescribeIdentityProviderConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeIdentityProviderConfigResponse] -> ShowS
$cshowList :: [DescribeIdentityProviderConfigResponse] -> ShowS
show :: DescribeIdentityProviderConfigResponse -> String
$cshow :: DescribeIdentityProviderConfigResponse -> String
showsPrec :: Int -> DescribeIdentityProviderConfigResponse -> ShowS
$cshowsPrec :: Int -> DescribeIdentityProviderConfigResponse -> ShowS
Prelude.Show, (forall x.
DescribeIdentityProviderConfigResponse
-> Rep DescribeIdentityProviderConfigResponse x)
-> (forall x.
Rep DescribeIdentityProviderConfigResponse x
-> DescribeIdentityProviderConfigResponse)
-> Generic DescribeIdentityProviderConfigResponse
forall x.
Rep DescribeIdentityProviderConfigResponse x
-> DescribeIdentityProviderConfigResponse
forall x.
DescribeIdentityProviderConfigResponse
-> Rep DescribeIdentityProviderConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeIdentityProviderConfigResponse x
-> DescribeIdentityProviderConfigResponse
$cfrom :: forall x.
DescribeIdentityProviderConfigResponse
-> Rep DescribeIdentityProviderConfigResponse x
Prelude.Generic)
newDescribeIdentityProviderConfigResponse ::
Prelude.Int ->
DescribeIdentityProviderConfigResponse
newDescribeIdentityProviderConfigResponse :: Int -> DescribeIdentityProviderConfigResponse
newDescribeIdentityProviderConfigResponse
Int
pHttpStatus_ =
DescribeIdentityProviderConfigResponse' :: Maybe IdentityProviderConfigResponse
-> Int -> DescribeIdentityProviderConfigResponse
DescribeIdentityProviderConfigResponse'
{ $sel:identityProviderConfig:DescribeIdentityProviderConfigResponse' :: Maybe IdentityProviderConfigResponse
identityProviderConfig =
Maybe IdentityProviderConfigResponse
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeIdentityProviderConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeIdentityProviderConfigResponse_identityProviderConfig :: Lens.Lens' DescribeIdentityProviderConfigResponse (Prelude.Maybe IdentityProviderConfigResponse)
describeIdentityProviderConfigResponse_identityProviderConfig :: (Maybe IdentityProviderConfigResponse
-> f (Maybe IdentityProviderConfigResponse))
-> DescribeIdentityProviderConfigResponse
-> f DescribeIdentityProviderConfigResponse
describeIdentityProviderConfigResponse_identityProviderConfig = (DescribeIdentityProviderConfigResponse
-> Maybe IdentityProviderConfigResponse)
-> (DescribeIdentityProviderConfigResponse
-> Maybe IdentityProviderConfigResponse
-> DescribeIdentityProviderConfigResponse)
-> Lens
DescribeIdentityProviderConfigResponse
DescribeIdentityProviderConfigResponse
(Maybe IdentityProviderConfigResponse)
(Maybe IdentityProviderConfigResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIdentityProviderConfigResponse' {Maybe IdentityProviderConfigResponse
identityProviderConfig :: Maybe IdentityProviderConfigResponse
$sel:identityProviderConfig:DescribeIdentityProviderConfigResponse' :: DescribeIdentityProviderConfigResponse
-> Maybe IdentityProviderConfigResponse
identityProviderConfig} -> Maybe IdentityProviderConfigResponse
identityProviderConfig) (\s :: DescribeIdentityProviderConfigResponse
s@DescribeIdentityProviderConfigResponse' {} Maybe IdentityProviderConfigResponse
a -> DescribeIdentityProviderConfigResponse
s {$sel:identityProviderConfig:DescribeIdentityProviderConfigResponse' :: Maybe IdentityProviderConfigResponse
identityProviderConfig = Maybe IdentityProviderConfigResponse
a} :: DescribeIdentityProviderConfigResponse)
describeIdentityProviderConfigResponse_httpStatus :: Lens.Lens' DescribeIdentityProviderConfigResponse Prelude.Int
describeIdentityProviderConfigResponse_httpStatus :: (Int -> f Int)
-> DescribeIdentityProviderConfigResponse
-> f DescribeIdentityProviderConfigResponse
describeIdentityProviderConfigResponse_httpStatus = (DescribeIdentityProviderConfigResponse -> Int)
-> (DescribeIdentityProviderConfigResponse
-> Int -> DescribeIdentityProviderConfigResponse)
-> Lens
DescribeIdentityProviderConfigResponse
DescribeIdentityProviderConfigResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIdentityProviderConfigResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeIdentityProviderConfigResponse' :: DescribeIdentityProviderConfigResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeIdentityProviderConfigResponse
s@DescribeIdentityProviderConfigResponse' {} Int
a -> DescribeIdentityProviderConfigResponse
s {$sel:httpStatus:DescribeIdentityProviderConfigResponse' :: Int
httpStatus = Int
a} :: DescribeIdentityProviderConfigResponse)
instance
Prelude.NFData
DescribeIdentityProviderConfigResponse