{-# 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.ElasticBeanstalk.DescribeEnvironments
(
DescribeEnvironments (..),
newDescribeEnvironments,
describeEnvironments_environmentIds,
describeEnvironments_environmentNames,
describeEnvironments_nextToken,
describeEnvironments_versionLabel,
describeEnvironments_maxRecords,
describeEnvironments_applicationName,
describeEnvironments_includedDeletedBackTo,
describeEnvironments_includeDeleted,
EnvironmentDescriptionsMessage (..),
newEnvironmentDescriptionsMessage,
environmentDescriptionsMessage_nextToken,
environmentDescriptionsMessage_environments,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.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 DescribeEnvironments = DescribeEnvironments'
{
DescribeEnvironments -> Maybe [Text]
environmentIds :: Prelude.Maybe [Prelude.Text],
DescribeEnvironments -> Maybe [Text]
environmentNames :: Prelude.Maybe [Prelude.Text],
DescribeEnvironments -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeEnvironments -> Maybe Text
versionLabel :: Prelude.Maybe Prelude.Text,
DescribeEnvironments -> Maybe Natural
maxRecords :: Prelude.Maybe Prelude.Natural,
DescribeEnvironments -> Maybe Text
applicationName :: Prelude.Maybe Prelude.Text,
DescribeEnvironments -> Maybe ISO8601
includedDeletedBackTo :: Prelude.Maybe Core.ISO8601,
DescribeEnvironments -> Maybe Bool
includeDeleted :: Prelude.Maybe Prelude.Bool
}
deriving (DescribeEnvironments -> DescribeEnvironments -> Bool
(DescribeEnvironments -> DescribeEnvironments -> Bool)
-> (DescribeEnvironments -> DescribeEnvironments -> Bool)
-> Eq DescribeEnvironments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEnvironments -> DescribeEnvironments -> Bool
$c/= :: DescribeEnvironments -> DescribeEnvironments -> Bool
== :: DescribeEnvironments -> DescribeEnvironments -> Bool
$c== :: DescribeEnvironments -> DescribeEnvironments -> Bool
Prelude.Eq, ReadPrec [DescribeEnvironments]
ReadPrec DescribeEnvironments
Int -> ReadS DescribeEnvironments
ReadS [DescribeEnvironments]
(Int -> ReadS DescribeEnvironments)
-> ReadS [DescribeEnvironments]
-> ReadPrec DescribeEnvironments
-> ReadPrec [DescribeEnvironments]
-> Read DescribeEnvironments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEnvironments]
$creadListPrec :: ReadPrec [DescribeEnvironments]
readPrec :: ReadPrec DescribeEnvironments
$creadPrec :: ReadPrec DescribeEnvironments
readList :: ReadS [DescribeEnvironments]
$creadList :: ReadS [DescribeEnvironments]
readsPrec :: Int -> ReadS DescribeEnvironments
$creadsPrec :: Int -> ReadS DescribeEnvironments
Prelude.Read, Int -> DescribeEnvironments -> ShowS
[DescribeEnvironments] -> ShowS
DescribeEnvironments -> String
(Int -> DescribeEnvironments -> ShowS)
-> (DescribeEnvironments -> String)
-> ([DescribeEnvironments] -> ShowS)
-> Show DescribeEnvironments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEnvironments] -> ShowS
$cshowList :: [DescribeEnvironments] -> ShowS
show :: DescribeEnvironments -> String
$cshow :: DescribeEnvironments -> String
showsPrec :: Int -> DescribeEnvironments -> ShowS
$cshowsPrec :: Int -> DescribeEnvironments -> ShowS
Prelude.Show, (forall x. DescribeEnvironments -> Rep DescribeEnvironments x)
-> (forall x. Rep DescribeEnvironments x -> DescribeEnvironments)
-> Generic DescribeEnvironments
forall x. Rep DescribeEnvironments x -> DescribeEnvironments
forall x. DescribeEnvironments -> Rep DescribeEnvironments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEnvironments x -> DescribeEnvironments
$cfrom :: forall x. DescribeEnvironments -> Rep DescribeEnvironments x
Prelude.Generic)
newDescribeEnvironments ::
DescribeEnvironments
newDescribeEnvironments :: DescribeEnvironments
newDescribeEnvironments =
DescribeEnvironments' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> DescribeEnvironments
DescribeEnvironments'
{ $sel:environmentIds:DescribeEnvironments' :: Maybe [Text]
environmentIds =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:environmentNames:DescribeEnvironments' :: Maybe [Text]
environmentNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeEnvironments' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:versionLabel:DescribeEnvironments' :: Maybe Text
versionLabel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeEnvironments' :: Maybe Natural
maxRecords = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:DescribeEnvironments' :: Maybe Text
applicationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:includedDeletedBackTo:DescribeEnvironments' :: Maybe ISO8601
includedDeletedBackTo = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:includeDeleted:DescribeEnvironments' :: Maybe Bool
includeDeleted = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
describeEnvironments_environmentIds :: Lens.Lens' DescribeEnvironments (Prelude.Maybe [Prelude.Text])
describeEnvironments_environmentIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_environmentIds = (DescribeEnvironments -> Maybe [Text])
-> (DescribeEnvironments -> Maybe [Text] -> DescribeEnvironments)
-> Lens
DescribeEnvironments
DescribeEnvironments
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe [Text]
environmentIds :: Maybe [Text]
$sel:environmentIds:DescribeEnvironments' :: DescribeEnvironments -> Maybe [Text]
environmentIds} -> Maybe [Text]
environmentIds) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe [Text]
a -> DescribeEnvironments
s {$sel:environmentIds:DescribeEnvironments' :: Maybe [Text]
environmentIds = Maybe [Text]
a} :: DescribeEnvironments) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeEnvironments -> f DescribeEnvironments)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeEnvironments
-> f DescribeEnvironments
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
describeEnvironments_environmentNames :: Lens.Lens' DescribeEnvironments (Prelude.Maybe [Prelude.Text])
describeEnvironments_environmentNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_environmentNames = (DescribeEnvironments -> Maybe [Text])
-> (DescribeEnvironments -> Maybe [Text] -> DescribeEnvironments)
-> Lens
DescribeEnvironments
DescribeEnvironments
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe [Text]
environmentNames :: Maybe [Text]
$sel:environmentNames:DescribeEnvironments' :: DescribeEnvironments -> Maybe [Text]
environmentNames} -> Maybe [Text]
environmentNames) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe [Text]
a -> DescribeEnvironments
s {$sel:environmentNames:DescribeEnvironments' :: Maybe [Text]
environmentNames = Maybe [Text]
a} :: DescribeEnvironments) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeEnvironments -> f DescribeEnvironments)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeEnvironments
-> f DescribeEnvironments
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
describeEnvironments_nextToken :: Lens.Lens' DescribeEnvironments (Prelude.Maybe Prelude.Text)
describeEnvironments_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_nextToken = (DescribeEnvironments -> Maybe Text)
-> (DescribeEnvironments -> Maybe Text -> DescribeEnvironments)
-> Lens
DescribeEnvironments DescribeEnvironments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeEnvironments' :: DescribeEnvironments -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe Text
a -> DescribeEnvironments
s {$sel:nextToken:DescribeEnvironments' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEnvironments)
describeEnvironments_versionLabel :: Lens.Lens' DescribeEnvironments (Prelude.Maybe Prelude.Text)
describeEnvironments_versionLabel :: (Maybe Text -> f (Maybe Text))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_versionLabel = (DescribeEnvironments -> Maybe Text)
-> (DescribeEnvironments -> Maybe Text -> DescribeEnvironments)
-> Lens
DescribeEnvironments DescribeEnvironments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe Text
versionLabel :: Maybe Text
$sel:versionLabel:DescribeEnvironments' :: DescribeEnvironments -> Maybe Text
versionLabel} -> Maybe Text
versionLabel) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe Text
a -> DescribeEnvironments
s {$sel:versionLabel:DescribeEnvironments' :: Maybe Text
versionLabel = Maybe Text
a} :: DescribeEnvironments)
describeEnvironments_maxRecords :: Lens.Lens' DescribeEnvironments (Prelude.Maybe Prelude.Natural)
describeEnvironments_maxRecords :: (Maybe Natural -> f (Maybe Natural))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_maxRecords = (DescribeEnvironments -> Maybe Natural)
-> (DescribeEnvironments -> Maybe Natural -> DescribeEnvironments)
-> Lens
DescribeEnvironments
DescribeEnvironments
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe Natural
maxRecords :: Maybe Natural
$sel:maxRecords:DescribeEnvironments' :: DescribeEnvironments -> Maybe Natural
maxRecords} -> Maybe Natural
maxRecords) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe Natural
a -> DescribeEnvironments
s {$sel:maxRecords:DescribeEnvironments' :: Maybe Natural
maxRecords = Maybe Natural
a} :: DescribeEnvironments)
describeEnvironments_applicationName :: Lens.Lens' DescribeEnvironments (Prelude.Maybe Prelude.Text)
describeEnvironments_applicationName :: (Maybe Text -> f (Maybe Text))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_applicationName = (DescribeEnvironments -> Maybe Text)
-> (DescribeEnvironments -> Maybe Text -> DescribeEnvironments)
-> Lens
DescribeEnvironments DescribeEnvironments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe Text
applicationName :: Maybe Text
$sel:applicationName:DescribeEnvironments' :: DescribeEnvironments -> Maybe Text
applicationName} -> Maybe Text
applicationName) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe Text
a -> DescribeEnvironments
s {$sel:applicationName:DescribeEnvironments' :: Maybe Text
applicationName = Maybe Text
a} :: DescribeEnvironments)
describeEnvironments_includedDeletedBackTo :: Lens.Lens' DescribeEnvironments (Prelude.Maybe Prelude.UTCTime)
describeEnvironments_includedDeletedBackTo :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_includedDeletedBackTo = (DescribeEnvironments -> Maybe ISO8601)
-> (DescribeEnvironments -> Maybe ISO8601 -> DescribeEnvironments)
-> Lens
DescribeEnvironments
DescribeEnvironments
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe ISO8601
includedDeletedBackTo :: Maybe ISO8601
$sel:includedDeletedBackTo:DescribeEnvironments' :: DescribeEnvironments -> Maybe ISO8601
includedDeletedBackTo} -> Maybe ISO8601
includedDeletedBackTo) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe ISO8601
a -> DescribeEnvironments
s {$sel:includedDeletedBackTo:DescribeEnvironments' :: Maybe ISO8601
includedDeletedBackTo = Maybe ISO8601
a} :: DescribeEnvironments) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> DescribeEnvironments -> f DescribeEnvironments)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEnvironments
-> f DescribeEnvironments
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
describeEnvironments_includeDeleted :: Lens.Lens' DescribeEnvironments (Prelude.Maybe Prelude.Bool)
describeEnvironments_includeDeleted :: (Maybe Bool -> f (Maybe Bool))
-> DescribeEnvironments -> f DescribeEnvironments
describeEnvironments_includeDeleted = (DescribeEnvironments -> Maybe Bool)
-> (DescribeEnvironments -> Maybe Bool -> DescribeEnvironments)
-> Lens
DescribeEnvironments DescribeEnvironments (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironments' {Maybe Bool
includeDeleted :: Maybe Bool
$sel:includeDeleted:DescribeEnvironments' :: DescribeEnvironments -> Maybe Bool
includeDeleted} -> Maybe Bool
includeDeleted) (\s :: DescribeEnvironments
s@DescribeEnvironments' {} Maybe Bool
a -> DescribeEnvironments
s {$sel:includeDeleted:DescribeEnvironments' :: Maybe Bool
includeDeleted = Maybe Bool
a} :: DescribeEnvironments)
instance Core.AWSPager DescribeEnvironments where
page :: DescribeEnvironments
-> AWSResponse DescribeEnvironments -> Maybe DescribeEnvironments
page DescribeEnvironments
rq AWSResponse DescribeEnvironments
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeEnvironments
EnvironmentDescriptionsMessage
rs
EnvironmentDescriptionsMessage
-> Getting (First Text) EnvironmentDescriptionsMessage Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> EnvironmentDescriptionsMessage
-> Const (First Text) EnvironmentDescriptionsMessage
Lens' EnvironmentDescriptionsMessage (Maybe Text)
environmentDescriptionsMessage_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> EnvironmentDescriptionsMessage
-> Const (First Text) EnvironmentDescriptionsMessage)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) EnvironmentDescriptionsMessage Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeEnvironments
forall a. Maybe a
Prelude.Nothing
| Maybe [EnvironmentDescription] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeEnvironments
EnvironmentDescriptionsMessage
rs
EnvironmentDescriptionsMessage
-> Getting
(First [EnvironmentDescription])
EnvironmentDescriptionsMessage
[EnvironmentDescription]
-> Maybe [EnvironmentDescription]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [EnvironmentDescription]
-> Const
(First [EnvironmentDescription]) (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const
(First [EnvironmentDescription]) EnvironmentDescriptionsMessage
Lens'
EnvironmentDescriptionsMessage (Maybe [EnvironmentDescription])
environmentDescriptionsMessage_environments
((Maybe [EnvironmentDescription]
-> Const
(First [EnvironmentDescription]) (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const
(First [EnvironmentDescription]) EnvironmentDescriptionsMessage)
-> (([EnvironmentDescription]
-> Const (First [EnvironmentDescription]) [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const
(First [EnvironmentDescription]) (Maybe [EnvironmentDescription]))
-> Getting
(First [EnvironmentDescription])
EnvironmentDescriptionsMessage
[EnvironmentDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EnvironmentDescription]
-> Const (First [EnvironmentDescription]) [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const
(First [EnvironmentDescription]) (Maybe [EnvironmentDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeEnvironments
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeEnvironments -> Maybe DescribeEnvironments
forall a. a -> Maybe a
Prelude.Just (DescribeEnvironments -> Maybe DescribeEnvironments)
-> DescribeEnvironments -> Maybe DescribeEnvironments
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeEnvironments
rq
DescribeEnvironments
-> (DescribeEnvironments -> DescribeEnvironments)
-> DescribeEnvironments
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeEnvironments -> Identity DescribeEnvironments
Lens
DescribeEnvironments DescribeEnvironments (Maybe Text) (Maybe Text)
describeEnvironments_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeEnvironments -> Identity DescribeEnvironments)
-> Maybe Text -> DescribeEnvironments -> DescribeEnvironments
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeEnvironments
EnvironmentDescriptionsMessage
rs
EnvironmentDescriptionsMessage
-> Getting (First Text) EnvironmentDescriptionsMessage Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> EnvironmentDescriptionsMessage
-> Const (First Text) EnvironmentDescriptionsMessage
Lens' EnvironmentDescriptionsMessage (Maybe Text)
environmentDescriptionsMessage_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> EnvironmentDescriptionsMessage
-> Const (First Text) EnvironmentDescriptionsMessage)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) EnvironmentDescriptionsMessage Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeEnvironments where
type
AWSResponse DescribeEnvironments =
EnvironmentDescriptionsMessage
request :: DescribeEnvironments -> Request DescribeEnvironments
request = Service -> DescribeEnvironments -> Request DescribeEnvironments
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeEnvironments
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeEnvironments)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeEnvironments))
-> Logger
-> Service
-> Proxy DescribeEnvironments
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeEnvironments)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeEnvironmentsResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String EnvironmentDescriptionsMessage
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable DescribeEnvironments
instance Prelude.NFData DescribeEnvironments
instance Core.ToHeaders DescribeEnvironments where
toHeaders :: DescribeEnvironments -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeEnvironments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeEnvironments where
toPath :: DescribeEnvironments -> ByteString
toPath = ByteString -> DescribeEnvironments -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeEnvironments where
toQuery :: DescribeEnvironments -> QueryString
toQuery DescribeEnvironments' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe Text
Maybe ISO8601
includeDeleted :: Maybe Bool
includedDeletedBackTo :: Maybe ISO8601
applicationName :: Maybe Text
maxRecords :: Maybe Natural
versionLabel :: Maybe Text
nextToken :: Maybe Text
environmentNames :: Maybe [Text]
environmentIds :: Maybe [Text]
$sel:includeDeleted:DescribeEnvironments' :: DescribeEnvironments -> Maybe Bool
$sel:includedDeletedBackTo:DescribeEnvironments' :: DescribeEnvironments -> Maybe ISO8601
$sel:applicationName:DescribeEnvironments' :: DescribeEnvironments -> Maybe Text
$sel:maxRecords:DescribeEnvironments' :: DescribeEnvironments -> Maybe Natural
$sel:versionLabel:DescribeEnvironments' :: DescribeEnvironments -> Maybe Text
$sel:nextToken:DescribeEnvironments' :: DescribeEnvironments -> Maybe Text
$sel:environmentNames:DescribeEnvironments' :: DescribeEnvironments -> Maybe [Text]
$sel:environmentIds:DescribeEnvironments' :: DescribeEnvironments -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeEnvironments" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"EnvironmentIds"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
environmentIds
),
ByteString
"EnvironmentNames"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
environmentNames
),
ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"VersionLabel" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
versionLabel,
ByteString
"MaxRecords" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxRecords,
ByteString
"ApplicationName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
applicationName,
ByteString
"IncludedDeletedBackTo"
ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
includedDeletedBackTo,
ByteString
"IncludeDeleted" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
includeDeleted
]