{-# 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.ELBV2.DescribeTargetGroupAttributes
(
DescribeTargetGroupAttributes (..),
newDescribeTargetGroupAttributes,
describeTargetGroupAttributes_targetGroupArn,
DescribeTargetGroupAttributesResponse (..),
newDescribeTargetGroupAttributesResponse,
describeTargetGroupAttributesResponse_attributes,
describeTargetGroupAttributesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ELBV2.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 DescribeTargetGroupAttributes = DescribeTargetGroupAttributes'
{
DescribeTargetGroupAttributes -> Text
targetGroupArn :: Prelude.Text
}
deriving (DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
(DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool)
-> (DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool)
-> Eq DescribeTargetGroupAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
$c/= :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
== :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
$c== :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
Prelude.Eq, ReadPrec [DescribeTargetGroupAttributes]
ReadPrec DescribeTargetGroupAttributes
Int -> ReadS DescribeTargetGroupAttributes
ReadS [DescribeTargetGroupAttributes]
(Int -> ReadS DescribeTargetGroupAttributes)
-> ReadS [DescribeTargetGroupAttributes]
-> ReadPrec DescribeTargetGroupAttributes
-> ReadPrec [DescribeTargetGroupAttributes]
-> Read DescribeTargetGroupAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTargetGroupAttributes]
$creadListPrec :: ReadPrec [DescribeTargetGroupAttributes]
readPrec :: ReadPrec DescribeTargetGroupAttributes
$creadPrec :: ReadPrec DescribeTargetGroupAttributes
readList :: ReadS [DescribeTargetGroupAttributes]
$creadList :: ReadS [DescribeTargetGroupAttributes]
readsPrec :: Int -> ReadS DescribeTargetGroupAttributes
$creadsPrec :: Int -> ReadS DescribeTargetGroupAttributes
Prelude.Read, Int -> DescribeTargetGroupAttributes -> ShowS
[DescribeTargetGroupAttributes] -> ShowS
DescribeTargetGroupAttributes -> String
(Int -> DescribeTargetGroupAttributes -> ShowS)
-> (DescribeTargetGroupAttributes -> String)
-> ([DescribeTargetGroupAttributes] -> ShowS)
-> Show DescribeTargetGroupAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTargetGroupAttributes] -> ShowS
$cshowList :: [DescribeTargetGroupAttributes] -> ShowS
show :: DescribeTargetGroupAttributes -> String
$cshow :: DescribeTargetGroupAttributes -> String
showsPrec :: Int -> DescribeTargetGroupAttributes -> ShowS
$cshowsPrec :: Int -> DescribeTargetGroupAttributes -> ShowS
Prelude.Show, (forall x.
DescribeTargetGroupAttributes
-> Rep DescribeTargetGroupAttributes x)
-> (forall x.
Rep DescribeTargetGroupAttributes x
-> DescribeTargetGroupAttributes)
-> Generic DescribeTargetGroupAttributes
forall x.
Rep DescribeTargetGroupAttributes x
-> DescribeTargetGroupAttributes
forall x.
DescribeTargetGroupAttributes
-> Rep DescribeTargetGroupAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeTargetGroupAttributes x
-> DescribeTargetGroupAttributes
$cfrom :: forall x.
DescribeTargetGroupAttributes
-> Rep DescribeTargetGroupAttributes x
Prelude.Generic)
newDescribeTargetGroupAttributes ::
Prelude.Text ->
DescribeTargetGroupAttributes
newDescribeTargetGroupAttributes :: Text -> DescribeTargetGroupAttributes
newDescribeTargetGroupAttributes Text
pTargetGroupArn_ =
DescribeTargetGroupAttributes' :: Text -> DescribeTargetGroupAttributes
DescribeTargetGroupAttributes'
{ $sel:targetGroupArn:DescribeTargetGroupAttributes' :: Text
targetGroupArn =
Text
pTargetGroupArn_
}
describeTargetGroupAttributes_targetGroupArn :: Lens.Lens' DescribeTargetGroupAttributes Prelude.Text
describeTargetGroupAttributes_targetGroupArn :: (Text -> f Text)
-> DescribeTargetGroupAttributes -> f DescribeTargetGroupAttributes
describeTargetGroupAttributes_targetGroupArn = (DescribeTargetGroupAttributes -> Text)
-> (DescribeTargetGroupAttributes
-> Text -> DescribeTargetGroupAttributes)
-> Lens
DescribeTargetGroupAttributes
DescribeTargetGroupAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTargetGroupAttributes' {Text
targetGroupArn :: Text
$sel:targetGroupArn:DescribeTargetGroupAttributes' :: DescribeTargetGroupAttributes -> Text
targetGroupArn} -> Text
targetGroupArn) (\s :: DescribeTargetGroupAttributes
s@DescribeTargetGroupAttributes' {} Text
a -> DescribeTargetGroupAttributes
s {$sel:targetGroupArn:DescribeTargetGroupAttributes' :: Text
targetGroupArn = Text
a} :: DescribeTargetGroupAttributes)
instance
Core.AWSRequest
DescribeTargetGroupAttributes
where
type
AWSResponse DescribeTargetGroupAttributes =
DescribeTargetGroupAttributesResponse
request :: DescribeTargetGroupAttributes
-> Request DescribeTargetGroupAttributes
request = Service
-> DescribeTargetGroupAttributes
-> Request DescribeTargetGroupAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeTargetGroupAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeTargetGroupAttributes)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeTargetGroupAttributes))
-> Logger
-> Service
-> Proxy DescribeTargetGroupAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeTargetGroupAttributes)))
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
"DescribeTargetGroupAttributesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [TargetGroupAttribute]
-> Int -> DescribeTargetGroupAttributesResponse
DescribeTargetGroupAttributesResponse'
(Maybe [TargetGroupAttribute]
-> Int -> DescribeTargetGroupAttributesResponse)
-> Either String (Maybe [TargetGroupAttribute])
-> Either String (Int -> DescribeTargetGroupAttributesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Attributes" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [TargetGroupAttribute]))
-> Either String (Maybe [TargetGroupAttribute])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [TargetGroupAttribute])
-> [Node] -> Either String (Maybe [TargetGroupAttribute])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [TargetGroupAttribute]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Int -> DescribeTargetGroupAttributesResponse)
-> Either String Int
-> Either String DescribeTargetGroupAttributesResponse
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
DescribeTargetGroupAttributes
instance Prelude.NFData DescribeTargetGroupAttributes
instance Core.ToHeaders DescribeTargetGroupAttributes where
toHeaders :: DescribeTargetGroupAttributes -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeTargetGroupAttributes -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeTargetGroupAttributes where
toPath :: DescribeTargetGroupAttributes -> ByteString
toPath = ByteString -> DescribeTargetGroupAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeTargetGroupAttributes where
toQuery :: DescribeTargetGroupAttributes -> QueryString
toQuery DescribeTargetGroupAttributes' {Text
targetGroupArn :: Text
$sel:targetGroupArn:DescribeTargetGroupAttributes' :: DescribeTargetGroupAttributes -> 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
"DescribeTargetGroupAttributes" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-12-01" :: Prelude.ByteString),
ByteString
"TargetGroupArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
targetGroupArn
]
data DescribeTargetGroupAttributesResponse = DescribeTargetGroupAttributesResponse'
{
DescribeTargetGroupAttributesResponse
-> Maybe [TargetGroupAttribute]
attributes :: Prelude.Maybe [TargetGroupAttribute],
DescribeTargetGroupAttributesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
(DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool)
-> (DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool)
-> Eq DescribeTargetGroupAttributesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
$c/= :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
== :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
$c== :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTargetGroupAttributesResponse]
ReadPrec DescribeTargetGroupAttributesResponse
Int -> ReadS DescribeTargetGroupAttributesResponse
ReadS [DescribeTargetGroupAttributesResponse]
(Int -> ReadS DescribeTargetGroupAttributesResponse)
-> ReadS [DescribeTargetGroupAttributesResponse]
-> ReadPrec DescribeTargetGroupAttributesResponse
-> ReadPrec [DescribeTargetGroupAttributesResponse]
-> Read DescribeTargetGroupAttributesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTargetGroupAttributesResponse]
$creadListPrec :: ReadPrec [DescribeTargetGroupAttributesResponse]
readPrec :: ReadPrec DescribeTargetGroupAttributesResponse
$creadPrec :: ReadPrec DescribeTargetGroupAttributesResponse
readList :: ReadS [DescribeTargetGroupAttributesResponse]
$creadList :: ReadS [DescribeTargetGroupAttributesResponse]
readsPrec :: Int -> ReadS DescribeTargetGroupAttributesResponse
$creadsPrec :: Int -> ReadS DescribeTargetGroupAttributesResponse
Prelude.Read, Int -> DescribeTargetGroupAttributesResponse -> ShowS
[DescribeTargetGroupAttributesResponse] -> ShowS
DescribeTargetGroupAttributesResponse -> String
(Int -> DescribeTargetGroupAttributesResponse -> ShowS)
-> (DescribeTargetGroupAttributesResponse -> String)
-> ([DescribeTargetGroupAttributesResponse] -> ShowS)
-> Show DescribeTargetGroupAttributesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTargetGroupAttributesResponse] -> ShowS
$cshowList :: [DescribeTargetGroupAttributesResponse] -> ShowS
show :: DescribeTargetGroupAttributesResponse -> String
$cshow :: DescribeTargetGroupAttributesResponse -> String
showsPrec :: Int -> DescribeTargetGroupAttributesResponse -> ShowS
$cshowsPrec :: Int -> DescribeTargetGroupAttributesResponse -> ShowS
Prelude.Show, (forall x.
DescribeTargetGroupAttributesResponse
-> Rep DescribeTargetGroupAttributesResponse x)
-> (forall x.
Rep DescribeTargetGroupAttributesResponse x
-> DescribeTargetGroupAttributesResponse)
-> Generic DescribeTargetGroupAttributesResponse
forall x.
Rep DescribeTargetGroupAttributesResponse x
-> DescribeTargetGroupAttributesResponse
forall x.
DescribeTargetGroupAttributesResponse
-> Rep DescribeTargetGroupAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeTargetGroupAttributesResponse x
-> DescribeTargetGroupAttributesResponse
$cfrom :: forall x.
DescribeTargetGroupAttributesResponse
-> Rep DescribeTargetGroupAttributesResponse x
Prelude.Generic)
newDescribeTargetGroupAttributesResponse ::
Prelude.Int ->
DescribeTargetGroupAttributesResponse
newDescribeTargetGroupAttributesResponse :: Int -> DescribeTargetGroupAttributesResponse
newDescribeTargetGroupAttributesResponse Int
pHttpStatus_ =
DescribeTargetGroupAttributesResponse' :: Maybe [TargetGroupAttribute]
-> Int -> DescribeTargetGroupAttributesResponse
DescribeTargetGroupAttributesResponse'
{ $sel:attributes:DescribeTargetGroupAttributesResponse' :: Maybe [TargetGroupAttribute]
attributes =
Maybe [TargetGroupAttribute]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeTargetGroupAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeTargetGroupAttributesResponse_attributes :: Lens.Lens' DescribeTargetGroupAttributesResponse (Prelude.Maybe [TargetGroupAttribute])
describeTargetGroupAttributesResponse_attributes :: (Maybe [TargetGroupAttribute] -> f (Maybe [TargetGroupAttribute]))
-> DescribeTargetGroupAttributesResponse
-> f DescribeTargetGroupAttributesResponse
describeTargetGroupAttributesResponse_attributes = (DescribeTargetGroupAttributesResponse
-> Maybe [TargetGroupAttribute])
-> (DescribeTargetGroupAttributesResponse
-> Maybe [TargetGroupAttribute]
-> DescribeTargetGroupAttributesResponse)
-> Lens
DescribeTargetGroupAttributesResponse
DescribeTargetGroupAttributesResponse
(Maybe [TargetGroupAttribute])
(Maybe [TargetGroupAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTargetGroupAttributesResponse' {Maybe [TargetGroupAttribute]
attributes :: Maybe [TargetGroupAttribute]
$sel:attributes:DescribeTargetGroupAttributesResponse' :: DescribeTargetGroupAttributesResponse
-> Maybe [TargetGroupAttribute]
attributes} -> Maybe [TargetGroupAttribute]
attributes) (\s :: DescribeTargetGroupAttributesResponse
s@DescribeTargetGroupAttributesResponse' {} Maybe [TargetGroupAttribute]
a -> DescribeTargetGroupAttributesResponse
s {$sel:attributes:DescribeTargetGroupAttributesResponse' :: Maybe [TargetGroupAttribute]
attributes = Maybe [TargetGroupAttribute]
a} :: DescribeTargetGroupAttributesResponse) ((Maybe [TargetGroupAttribute] -> f (Maybe [TargetGroupAttribute]))
-> DescribeTargetGroupAttributesResponse
-> f DescribeTargetGroupAttributesResponse)
-> ((Maybe [TargetGroupAttribute]
-> f (Maybe [TargetGroupAttribute]))
-> Maybe [TargetGroupAttribute]
-> f (Maybe [TargetGroupAttribute]))
-> (Maybe [TargetGroupAttribute]
-> f (Maybe [TargetGroupAttribute]))
-> DescribeTargetGroupAttributesResponse
-> f DescribeTargetGroupAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[TargetGroupAttribute]
[TargetGroupAttribute]
[TargetGroupAttribute]
[TargetGroupAttribute]
-> Iso
(Maybe [TargetGroupAttribute])
(Maybe [TargetGroupAttribute])
(Maybe [TargetGroupAttribute])
(Maybe [TargetGroupAttribute])
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
[TargetGroupAttribute]
[TargetGroupAttribute]
[TargetGroupAttribute]
[TargetGroupAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeTargetGroupAttributesResponse_httpStatus :: Lens.Lens' DescribeTargetGroupAttributesResponse Prelude.Int
describeTargetGroupAttributesResponse_httpStatus :: (Int -> f Int)
-> DescribeTargetGroupAttributesResponse
-> f DescribeTargetGroupAttributesResponse
describeTargetGroupAttributesResponse_httpStatus = (DescribeTargetGroupAttributesResponse -> Int)
-> (DescribeTargetGroupAttributesResponse
-> Int -> DescribeTargetGroupAttributesResponse)
-> Lens
DescribeTargetGroupAttributesResponse
DescribeTargetGroupAttributesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTargetGroupAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeTargetGroupAttributesResponse' :: DescribeTargetGroupAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeTargetGroupAttributesResponse
s@DescribeTargetGroupAttributesResponse' {} Int
a -> DescribeTargetGroupAttributesResponse
s {$sel:httpStatus:DescribeTargetGroupAttributesResponse' :: Int
httpStatus = Int
a} :: DescribeTargetGroupAttributesResponse)
instance
Prelude.NFData
DescribeTargetGroupAttributesResponse