{-# 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.DescribeEnvironmentResources
(
DescribeEnvironmentResources (..),
newDescribeEnvironmentResources,
describeEnvironmentResources_environmentName,
describeEnvironmentResources_environmentId,
DescribeEnvironmentResourcesResponse (..),
newDescribeEnvironmentResourcesResponse,
describeEnvironmentResourcesResponse_environmentResources,
describeEnvironmentResourcesResponse_httpStatus,
)
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 DescribeEnvironmentResources = DescribeEnvironmentResources'
{
DescribeEnvironmentResources -> Maybe Text
environmentName :: Prelude.Maybe Prelude.Text,
DescribeEnvironmentResources -> Maybe Text
environmentId :: Prelude.Maybe Prelude.Text
}
deriving (DescribeEnvironmentResources
-> DescribeEnvironmentResources -> Bool
(DescribeEnvironmentResources
-> DescribeEnvironmentResources -> Bool)
-> (DescribeEnvironmentResources
-> DescribeEnvironmentResources -> Bool)
-> Eq DescribeEnvironmentResources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEnvironmentResources
-> DescribeEnvironmentResources -> Bool
$c/= :: DescribeEnvironmentResources
-> DescribeEnvironmentResources -> Bool
== :: DescribeEnvironmentResources
-> DescribeEnvironmentResources -> Bool
$c== :: DescribeEnvironmentResources
-> DescribeEnvironmentResources -> Bool
Prelude.Eq, ReadPrec [DescribeEnvironmentResources]
ReadPrec DescribeEnvironmentResources
Int -> ReadS DescribeEnvironmentResources
ReadS [DescribeEnvironmentResources]
(Int -> ReadS DescribeEnvironmentResources)
-> ReadS [DescribeEnvironmentResources]
-> ReadPrec DescribeEnvironmentResources
-> ReadPrec [DescribeEnvironmentResources]
-> Read DescribeEnvironmentResources
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEnvironmentResources]
$creadListPrec :: ReadPrec [DescribeEnvironmentResources]
readPrec :: ReadPrec DescribeEnvironmentResources
$creadPrec :: ReadPrec DescribeEnvironmentResources
readList :: ReadS [DescribeEnvironmentResources]
$creadList :: ReadS [DescribeEnvironmentResources]
readsPrec :: Int -> ReadS DescribeEnvironmentResources
$creadsPrec :: Int -> ReadS DescribeEnvironmentResources
Prelude.Read, Int -> DescribeEnvironmentResources -> ShowS
[DescribeEnvironmentResources] -> ShowS
DescribeEnvironmentResources -> String
(Int -> DescribeEnvironmentResources -> ShowS)
-> (DescribeEnvironmentResources -> String)
-> ([DescribeEnvironmentResources] -> ShowS)
-> Show DescribeEnvironmentResources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEnvironmentResources] -> ShowS
$cshowList :: [DescribeEnvironmentResources] -> ShowS
show :: DescribeEnvironmentResources -> String
$cshow :: DescribeEnvironmentResources -> String
showsPrec :: Int -> DescribeEnvironmentResources -> ShowS
$cshowsPrec :: Int -> DescribeEnvironmentResources -> ShowS
Prelude.Show, (forall x.
DescribeEnvironmentResources -> Rep DescribeEnvironmentResources x)
-> (forall x.
Rep DescribeEnvironmentResources x -> DescribeEnvironmentResources)
-> Generic DescribeEnvironmentResources
forall x.
Rep DescribeEnvironmentResources x -> DescribeEnvironmentResources
forall x.
DescribeEnvironmentResources -> Rep DescribeEnvironmentResources x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEnvironmentResources x -> DescribeEnvironmentResources
$cfrom :: forall x.
DescribeEnvironmentResources -> Rep DescribeEnvironmentResources x
Prelude.Generic)
newDescribeEnvironmentResources ::
DescribeEnvironmentResources
newDescribeEnvironmentResources :: DescribeEnvironmentResources
newDescribeEnvironmentResources =
DescribeEnvironmentResources' :: Maybe Text -> Maybe Text -> DescribeEnvironmentResources
DescribeEnvironmentResources'
{ $sel:environmentName:DescribeEnvironmentResources' :: Maybe Text
environmentName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:environmentId:DescribeEnvironmentResources' :: Maybe Text
environmentId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describeEnvironmentResources_environmentName :: Lens.Lens' DescribeEnvironmentResources (Prelude.Maybe Prelude.Text)
describeEnvironmentResources_environmentName :: (Maybe Text -> f (Maybe Text))
-> DescribeEnvironmentResources -> f DescribeEnvironmentResources
describeEnvironmentResources_environmentName = (DescribeEnvironmentResources -> Maybe Text)
-> (DescribeEnvironmentResources
-> Maybe Text -> DescribeEnvironmentResources)
-> Lens
DescribeEnvironmentResources
DescribeEnvironmentResources
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironmentResources' {Maybe Text
environmentName :: Maybe Text
$sel:environmentName:DescribeEnvironmentResources' :: DescribeEnvironmentResources -> Maybe Text
environmentName} -> Maybe Text
environmentName) (\s :: DescribeEnvironmentResources
s@DescribeEnvironmentResources' {} Maybe Text
a -> DescribeEnvironmentResources
s {$sel:environmentName:DescribeEnvironmentResources' :: Maybe Text
environmentName = Maybe Text
a} :: DescribeEnvironmentResources)
describeEnvironmentResources_environmentId :: Lens.Lens' DescribeEnvironmentResources (Prelude.Maybe Prelude.Text)
describeEnvironmentResources_environmentId :: (Maybe Text -> f (Maybe Text))
-> DescribeEnvironmentResources -> f DescribeEnvironmentResources
describeEnvironmentResources_environmentId = (DescribeEnvironmentResources -> Maybe Text)
-> (DescribeEnvironmentResources
-> Maybe Text -> DescribeEnvironmentResources)
-> Lens
DescribeEnvironmentResources
DescribeEnvironmentResources
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironmentResources' {Maybe Text
environmentId :: Maybe Text
$sel:environmentId:DescribeEnvironmentResources' :: DescribeEnvironmentResources -> Maybe Text
environmentId} -> Maybe Text
environmentId) (\s :: DescribeEnvironmentResources
s@DescribeEnvironmentResources' {} Maybe Text
a -> DescribeEnvironmentResources
s {$sel:environmentId:DescribeEnvironmentResources' :: Maybe Text
environmentId = Maybe Text
a} :: DescribeEnvironmentResources)
instance Core.AWSRequest DescribeEnvironmentResources where
type
AWSResponse DescribeEnvironmentResources =
DescribeEnvironmentResourcesResponse
request :: DescribeEnvironmentResources
-> Request DescribeEnvironmentResources
request = Service
-> DescribeEnvironmentResources
-> Request DescribeEnvironmentResources
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeEnvironmentResources
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeEnvironmentResources)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeEnvironmentResources))
-> Logger
-> Service
-> Proxy DescribeEnvironmentResources
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeEnvironmentResources)))
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
"DescribeEnvironmentResourcesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe EnvironmentResourceDescription
-> Int -> DescribeEnvironmentResourcesResponse
DescribeEnvironmentResourcesResponse'
(Maybe EnvironmentResourceDescription
-> Int -> DescribeEnvironmentResourcesResponse)
-> Either String (Maybe EnvironmentResourceDescription)
-> Either String (Int -> DescribeEnvironmentResourcesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe EnvironmentResourceDescription)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EnvironmentResources")
Either String (Int -> DescribeEnvironmentResourcesResponse)
-> Either String Int
-> Either String DescribeEnvironmentResourcesResponse
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
DescribeEnvironmentResources
instance Prelude.NFData DescribeEnvironmentResources
instance Core.ToHeaders DescribeEnvironmentResources where
toHeaders :: DescribeEnvironmentResources -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeEnvironmentResources -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeEnvironmentResources where
toPath :: DescribeEnvironmentResources -> ByteString
toPath = ByteString -> DescribeEnvironmentResources -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeEnvironmentResources where
toQuery :: DescribeEnvironmentResources -> QueryString
toQuery DescribeEnvironmentResources' {Maybe Text
environmentId :: Maybe Text
environmentName :: Maybe Text
$sel:environmentId:DescribeEnvironmentResources' :: DescribeEnvironmentResources -> Maybe Text
$sel:environmentName:DescribeEnvironmentResources' :: DescribeEnvironmentResources -> 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
"DescribeEnvironmentResources" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"EnvironmentName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
environmentName,
ByteString
"EnvironmentId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
environmentId
]
data DescribeEnvironmentResourcesResponse = DescribeEnvironmentResourcesResponse'
{
DescribeEnvironmentResourcesResponse
-> Maybe EnvironmentResourceDescription
environmentResources :: Prelude.Maybe EnvironmentResourceDescription,
DescribeEnvironmentResourcesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeEnvironmentResourcesResponse
-> DescribeEnvironmentResourcesResponse -> Bool
(DescribeEnvironmentResourcesResponse
-> DescribeEnvironmentResourcesResponse -> Bool)
-> (DescribeEnvironmentResourcesResponse
-> DescribeEnvironmentResourcesResponse -> Bool)
-> Eq DescribeEnvironmentResourcesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEnvironmentResourcesResponse
-> DescribeEnvironmentResourcesResponse -> Bool
$c/= :: DescribeEnvironmentResourcesResponse
-> DescribeEnvironmentResourcesResponse -> Bool
== :: DescribeEnvironmentResourcesResponse
-> DescribeEnvironmentResourcesResponse -> Bool
$c== :: DescribeEnvironmentResourcesResponse
-> DescribeEnvironmentResourcesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEnvironmentResourcesResponse]
ReadPrec DescribeEnvironmentResourcesResponse
Int -> ReadS DescribeEnvironmentResourcesResponse
ReadS [DescribeEnvironmentResourcesResponse]
(Int -> ReadS DescribeEnvironmentResourcesResponse)
-> ReadS [DescribeEnvironmentResourcesResponse]
-> ReadPrec DescribeEnvironmentResourcesResponse
-> ReadPrec [DescribeEnvironmentResourcesResponse]
-> Read DescribeEnvironmentResourcesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEnvironmentResourcesResponse]
$creadListPrec :: ReadPrec [DescribeEnvironmentResourcesResponse]
readPrec :: ReadPrec DescribeEnvironmentResourcesResponse
$creadPrec :: ReadPrec DescribeEnvironmentResourcesResponse
readList :: ReadS [DescribeEnvironmentResourcesResponse]
$creadList :: ReadS [DescribeEnvironmentResourcesResponse]
readsPrec :: Int -> ReadS DescribeEnvironmentResourcesResponse
$creadsPrec :: Int -> ReadS DescribeEnvironmentResourcesResponse
Prelude.Read, Int -> DescribeEnvironmentResourcesResponse -> ShowS
[DescribeEnvironmentResourcesResponse] -> ShowS
DescribeEnvironmentResourcesResponse -> String
(Int -> DescribeEnvironmentResourcesResponse -> ShowS)
-> (DescribeEnvironmentResourcesResponse -> String)
-> ([DescribeEnvironmentResourcesResponse] -> ShowS)
-> Show DescribeEnvironmentResourcesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEnvironmentResourcesResponse] -> ShowS
$cshowList :: [DescribeEnvironmentResourcesResponse] -> ShowS
show :: DescribeEnvironmentResourcesResponse -> String
$cshow :: DescribeEnvironmentResourcesResponse -> String
showsPrec :: Int -> DescribeEnvironmentResourcesResponse -> ShowS
$cshowsPrec :: Int -> DescribeEnvironmentResourcesResponse -> ShowS
Prelude.Show, (forall x.
DescribeEnvironmentResourcesResponse
-> Rep DescribeEnvironmentResourcesResponse x)
-> (forall x.
Rep DescribeEnvironmentResourcesResponse x
-> DescribeEnvironmentResourcesResponse)
-> Generic DescribeEnvironmentResourcesResponse
forall x.
Rep DescribeEnvironmentResourcesResponse x
-> DescribeEnvironmentResourcesResponse
forall x.
DescribeEnvironmentResourcesResponse
-> Rep DescribeEnvironmentResourcesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEnvironmentResourcesResponse x
-> DescribeEnvironmentResourcesResponse
$cfrom :: forall x.
DescribeEnvironmentResourcesResponse
-> Rep DescribeEnvironmentResourcesResponse x
Prelude.Generic)
newDescribeEnvironmentResourcesResponse ::
Prelude.Int ->
DescribeEnvironmentResourcesResponse
newDescribeEnvironmentResourcesResponse :: Int -> DescribeEnvironmentResourcesResponse
newDescribeEnvironmentResourcesResponse Int
pHttpStatus_ =
DescribeEnvironmentResourcesResponse' :: Maybe EnvironmentResourceDescription
-> Int -> DescribeEnvironmentResourcesResponse
DescribeEnvironmentResourcesResponse'
{ $sel:environmentResources:DescribeEnvironmentResourcesResponse' :: Maybe EnvironmentResourceDescription
environmentResources =
Maybe EnvironmentResourceDescription
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeEnvironmentResourcesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeEnvironmentResourcesResponse_environmentResources :: Lens.Lens' DescribeEnvironmentResourcesResponse (Prelude.Maybe EnvironmentResourceDescription)
describeEnvironmentResourcesResponse_environmentResources :: (Maybe EnvironmentResourceDescription
-> f (Maybe EnvironmentResourceDescription))
-> DescribeEnvironmentResourcesResponse
-> f DescribeEnvironmentResourcesResponse
describeEnvironmentResourcesResponse_environmentResources = (DescribeEnvironmentResourcesResponse
-> Maybe EnvironmentResourceDescription)
-> (DescribeEnvironmentResourcesResponse
-> Maybe EnvironmentResourceDescription
-> DescribeEnvironmentResourcesResponse)
-> Lens
DescribeEnvironmentResourcesResponse
DescribeEnvironmentResourcesResponse
(Maybe EnvironmentResourceDescription)
(Maybe EnvironmentResourceDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironmentResourcesResponse' {Maybe EnvironmentResourceDescription
environmentResources :: Maybe EnvironmentResourceDescription
$sel:environmentResources:DescribeEnvironmentResourcesResponse' :: DescribeEnvironmentResourcesResponse
-> Maybe EnvironmentResourceDescription
environmentResources} -> Maybe EnvironmentResourceDescription
environmentResources) (\s :: DescribeEnvironmentResourcesResponse
s@DescribeEnvironmentResourcesResponse' {} Maybe EnvironmentResourceDescription
a -> DescribeEnvironmentResourcesResponse
s {$sel:environmentResources:DescribeEnvironmentResourcesResponse' :: Maybe EnvironmentResourceDescription
environmentResources = Maybe EnvironmentResourceDescription
a} :: DescribeEnvironmentResourcesResponse)
describeEnvironmentResourcesResponse_httpStatus :: Lens.Lens' DescribeEnvironmentResourcesResponse Prelude.Int
describeEnvironmentResourcesResponse_httpStatus :: (Int -> f Int)
-> DescribeEnvironmentResourcesResponse
-> f DescribeEnvironmentResourcesResponse
describeEnvironmentResourcesResponse_httpStatus = (DescribeEnvironmentResourcesResponse -> Int)
-> (DescribeEnvironmentResourcesResponse
-> Int -> DescribeEnvironmentResourcesResponse)
-> Lens
DescribeEnvironmentResourcesResponse
DescribeEnvironmentResourcesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEnvironmentResourcesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeEnvironmentResourcesResponse' :: DescribeEnvironmentResourcesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeEnvironmentResourcesResponse
s@DescribeEnvironmentResourcesResponse' {} Int
a -> DescribeEnvironmentResourcesResponse
s {$sel:httpStatus:DescribeEnvironmentResourcesResponse' :: Int
httpStatus = Int
a} :: DescribeEnvironmentResourcesResponse)
instance
Prelude.NFData
DescribeEnvironmentResourcesResponse