{-# 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.EFS.DescribeLifecycleConfiguration
(
DescribeLifecycleConfiguration (..),
newDescribeLifecycleConfiguration,
describeLifecycleConfiguration_fileSystemId,
LifecycleConfigurationDescription (..),
newLifecycleConfigurationDescription,
lifecycleConfigurationDescription_lifecyclePolicies,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EFS.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 DescribeLifecycleConfiguration = DescribeLifecycleConfiguration'
{
DescribeLifecycleConfiguration -> Text
fileSystemId :: Prelude.Text
}
deriving (DescribeLifecycleConfiguration
-> DescribeLifecycleConfiguration -> Bool
(DescribeLifecycleConfiguration
-> DescribeLifecycleConfiguration -> Bool)
-> (DescribeLifecycleConfiguration
-> DescribeLifecycleConfiguration -> Bool)
-> Eq DescribeLifecycleConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLifecycleConfiguration
-> DescribeLifecycleConfiguration -> Bool
$c/= :: DescribeLifecycleConfiguration
-> DescribeLifecycleConfiguration -> Bool
== :: DescribeLifecycleConfiguration
-> DescribeLifecycleConfiguration -> Bool
$c== :: DescribeLifecycleConfiguration
-> DescribeLifecycleConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeLifecycleConfiguration]
ReadPrec DescribeLifecycleConfiguration
Int -> ReadS DescribeLifecycleConfiguration
ReadS [DescribeLifecycleConfiguration]
(Int -> ReadS DescribeLifecycleConfiguration)
-> ReadS [DescribeLifecycleConfiguration]
-> ReadPrec DescribeLifecycleConfiguration
-> ReadPrec [DescribeLifecycleConfiguration]
-> Read DescribeLifecycleConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLifecycleConfiguration]
$creadListPrec :: ReadPrec [DescribeLifecycleConfiguration]
readPrec :: ReadPrec DescribeLifecycleConfiguration
$creadPrec :: ReadPrec DescribeLifecycleConfiguration
readList :: ReadS [DescribeLifecycleConfiguration]
$creadList :: ReadS [DescribeLifecycleConfiguration]
readsPrec :: Int -> ReadS DescribeLifecycleConfiguration
$creadsPrec :: Int -> ReadS DescribeLifecycleConfiguration
Prelude.Read, Int -> DescribeLifecycleConfiguration -> ShowS
[DescribeLifecycleConfiguration] -> ShowS
DescribeLifecycleConfiguration -> String
(Int -> DescribeLifecycleConfiguration -> ShowS)
-> (DescribeLifecycleConfiguration -> String)
-> ([DescribeLifecycleConfiguration] -> ShowS)
-> Show DescribeLifecycleConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLifecycleConfiguration] -> ShowS
$cshowList :: [DescribeLifecycleConfiguration] -> ShowS
show :: DescribeLifecycleConfiguration -> String
$cshow :: DescribeLifecycleConfiguration -> String
showsPrec :: Int -> DescribeLifecycleConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeLifecycleConfiguration -> ShowS
Prelude.Show, (forall x.
DescribeLifecycleConfiguration
-> Rep DescribeLifecycleConfiguration x)
-> (forall x.
Rep DescribeLifecycleConfiguration x
-> DescribeLifecycleConfiguration)
-> Generic DescribeLifecycleConfiguration
forall x.
Rep DescribeLifecycleConfiguration x
-> DescribeLifecycleConfiguration
forall x.
DescribeLifecycleConfiguration
-> Rep DescribeLifecycleConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLifecycleConfiguration x
-> DescribeLifecycleConfiguration
$cfrom :: forall x.
DescribeLifecycleConfiguration
-> Rep DescribeLifecycleConfiguration x
Prelude.Generic)
newDescribeLifecycleConfiguration ::
Prelude.Text ->
DescribeLifecycleConfiguration
newDescribeLifecycleConfiguration :: Text -> DescribeLifecycleConfiguration
newDescribeLifecycleConfiguration Text
pFileSystemId_ =
DescribeLifecycleConfiguration' :: Text -> DescribeLifecycleConfiguration
DescribeLifecycleConfiguration'
{ $sel:fileSystemId:DescribeLifecycleConfiguration' :: Text
fileSystemId =
Text
pFileSystemId_
}
describeLifecycleConfiguration_fileSystemId :: Lens.Lens' DescribeLifecycleConfiguration Prelude.Text
describeLifecycleConfiguration_fileSystemId :: (Text -> f Text)
-> DescribeLifecycleConfiguration
-> f DescribeLifecycleConfiguration
describeLifecycleConfiguration_fileSystemId = (DescribeLifecycleConfiguration -> Text)
-> (DescribeLifecycleConfiguration
-> Text -> DescribeLifecycleConfiguration)
-> Lens
DescribeLifecycleConfiguration
DescribeLifecycleConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLifecycleConfiguration' {Text
fileSystemId :: Text
$sel:fileSystemId:DescribeLifecycleConfiguration' :: DescribeLifecycleConfiguration -> Text
fileSystemId} -> Text
fileSystemId) (\s :: DescribeLifecycleConfiguration
s@DescribeLifecycleConfiguration' {} Text
a -> DescribeLifecycleConfiguration
s {$sel:fileSystemId:DescribeLifecycleConfiguration' :: Text
fileSystemId = Text
a} :: DescribeLifecycleConfiguration)
instance
Core.AWSRequest
DescribeLifecycleConfiguration
where
type
AWSResponse DescribeLifecycleConfiguration =
LifecycleConfigurationDescription
request :: DescribeLifecycleConfiguration
-> Request DescribeLifecycleConfiguration
request = Service
-> DescribeLifecycleConfiguration
-> Request DescribeLifecycleConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeLifecycleConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeLifecycleConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeLifecycleConfiguration))
-> Logger
-> Service
-> Proxy DescribeLifecycleConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeLifecycleConfiguration)))
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 LifecycleConfigurationDescription
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance
Prelude.Hashable
DescribeLifecycleConfiguration
instance
Prelude.NFData
DescribeLifecycleConfiguration
instance
Core.ToHeaders
DescribeLifecycleConfiguration
where
toHeaders :: DescribeLifecycleConfiguration -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeLifecycleConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeLifecycleConfiguration where
toPath :: DescribeLifecycleConfiguration -> ByteString
toPath DescribeLifecycleConfiguration' {Text
fileSystemId :: Text
$sel:fileSystemId:DescribeLifecycleConfiguration' :: DescribeLifecycleConfiguration -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-02-01/file-systems/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
fileSystemId,
ByteString
"/lifecycle-configuration"
]
instance Core.ToQuery DescribeLifecycleConfiguration where
toQuery :: DescribeLifecycleConfiguration -> QueryString
toQuery = QueryString -> DescribeLifecycleConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty