{-# 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.ELB.CreateLoadBalancer
(
CreateLoadBalancer (..),
newCreateLoadBalancer,
createLoadBalancer_securityGroups,
createLoadBalancer_subnets,
createLoadBalancer_availabilityZones,
createLoadBalancer_scheme,
createLoadBalancer_tags,
createLoadBalancer_loadBalancerName,
createLoadBalancer_listeners,
CreateLoadBalancerResponse (..),
newCreateLoadBalancerResponse,
createLoadBalancerResponse_dNSName,
createLoadBalancerResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ELB.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 CreateLoadBalancer = CreateLoadBalancer'
{
CreateLoadBalancer -> Maybe [Text]
securityGroups :: Prelude.Maybe [Prelude.Text],
CreateLoadBalancer -> Maybe [Text]
subnets :: Prelude.Maybe [Prelude.Text],
CreateLoadBalancer -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
CreateLoadBalancer -> Maybe Text
scheme :: Prelude.Maybe Prelude.Text,
CreateLoadBalancer -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
CreateLoadBalancer -> Text
loadBalancerName :: Prelude.Text,
CreateLoadBalancer -> [Listener]
listeners :: [Listener]
}
deriving (CreateLoadBalancer -> CreateLoadBalancer -> Bool
(CreateLoadBalancer -> CreateLoadBalancer -> Bool)
-> (CreateLoadBalancer -> CreateLoadBalancer -> Bool)
-> Eq CreateLoadBalancer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
$c/= :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
== :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
$c== :: CreateLoadBalancer -> CreateLoadBalancer -> Bool
Prelude.Eq, ReadPrec [CreateLoadBalancer]
ReadPrec CreateLoadBalancer
Int -> ReadS CreateLoadBalancer
ReadS [CreateLoadBalancer]
(Int -> ReadS CreateLoadBalancer)
-> ReadS [CreateLoadBalancer]
-> ReadPrec CreateLoadBalancer
-> ReadPrec [CreateLoadBalancer]
-> Read CreateLoadBalancer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLoadBalancer]
$creadListPrec :: ReadPrec [CreateLoadBalancer]
readPrec :: ReadPrec CreateLoadBalancer
$creadPrec :: ReadPrec CreateLoadBalancer
readList :: ReadS [CreateLoadBalancer]
$creadList :: ReadS [CreateLoadBalancer]
readsPrec :: Int -> ReadS CreateLoadBalancer
$creadsPrec :: Int -> ReadS CreateLoadBalancer
Prelude.Read, Int -> CreateLoadBalancer -> ShowS
[CreateLoadBalancer] -> ShowS
CreateLoadBalancer -> String
(Int -> CreateLoadBalancer -> ShowS)
-> (CreateLoadBalancer -> String)
-> ([CreateLoadBalancer] -> ShowS)
-> Show CreateLoadBalancer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLoadBalancer] -> ShowS
$cshowList :: [CreateLoadBalancer] -> ShowS
show :: CreateLoadBalancer -> String
$cshow :: CreateLoadBalancer -> String
showsPrec :: Int -> CreateLoadBalancer -> ShowS
$cshowsPrec :: Int -> CreateLoadBalancer -> ShowS
Prelude.Show, (forall x. CreateLoadBalancer -> Rep CreateLoadBalancer x)
-> (forall x. Rep CreateLoadBalancer x -> CreateLoadBalancer)
-> Generic CreateLoadBalancer
forall x. Rep CreateLoadBalancer x -> CreateLoadBalancer
forall x. CreateLoadBalancer -> Rep CreateLoadBalancer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateLoadBalancer x -> CreateLoadBalancer
$cfrom :: forall x. CreateLoadBalancer -> Rep CreateLoadBalancer x
Prelude.Generic)
newCreateLoadBalancer ::
Prelude.Text ->
CreateLoadBalancer
newCreateLoadBalancer :: Text -> CreateLoadBalancer
newCreateLoadBalancer Text
pLoadBalancerName_ =
CreateLoadBalancer' :: Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Text
-> [Listener]
-> CreateLoadBalancer
CreateLoadBalancer'
{ $sel:securityGroups:CreateLoadBalancer' :: Maybe [Text]
securityGroups =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:subnets:CreateLoadBalancer' :: Maybe [Text]
subnets = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZones:CreateLoadBalancer' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:scheme:CreateLoadBalancer' :: Maybe Text
scheme = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateLoadBalancer' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
$sel:loadBalancerName:CreateLoadBalancer' :: Text
loadBalancerName = Text
pLoadBalancerName_,
$sel:listeners:CreateLoadBalancer' :: [Listener]
listeners = [Listener]
forall a. Monoid a => a
Prelude.mempty
}
createLoadBalancer_securityGroups :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe [Prelude.Text])
createLoadBalancer_securityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_securityGroups = (CreateLoadBalancer -> Maybe [Text])
-> (CreateLoadBalancer -> Maybe [Text] -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe [Text]
securityGroups :: Maybe [Text]
$sel:securityGroups:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Text]
securityGroups} -> Maybe [Text]
securityGroups) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe [Text]
a -> CreateLoadBalancer
s {$sel:securityGroups:CreateLoadBalancer' :: Maybe [Text]
securityGroups = Maybe [Text]
a} :: CreateLoadBalancer) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer
-> f CreateLoadBalancer
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
createLoadBalancer_subnets :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe [Prelude.Text])
createLoadBalancer_subnets :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_subnets = (CreateLoadBalancer -> Maybe [Text])
-> (CreateLoadBalancer -> Maybe [Text] -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe [Text]
subnets :: Maybe [Text]
$sel:subnets:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Text]
subnets} -> Maybe [Text]
subnets) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe [Text]
a -> CreateLoadBalancer
s {$sel:subnets:CreateLoadBalancer' :: Maybe [Text]
subnets = Maybe [Text]
a} :: CreateLoadBalancer) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer
-> f CreateLoadBalancer
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
createLoadBalancer_availabilityZones :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe [Prelude.Text])
createLoadBalancer_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_availabilityZones = (CreateLoadBalancer -> Maybe [Text])
-> (CreateLoadBalancer -> Maybe [Text] -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe [Text]
a -> CreateLoadBalancer
s {$sel:availabilityZones:CreateLoadBalancer' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: CreateLoadBalancer) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer -> f CreateLoadBalancer)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateLoadBalancer
-> f CreateLoadBalancer
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
createLoadBalancer_scheme :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe Prelude.Text)
createLoadBalancer_scheme :: (Maybe Text -> f (Maybe Text))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_scheme = (CreateLoadBalancer -> Maybe Text)
-> (CreateLoadBalancer -> Maybe Text -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer CreateLoadBalancer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe Text
scheme :: Maybe Text
$sel:scheme:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
scheme} -> Maybe Text
scheme) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe Text
a -> CreateLoadBalancer
s {$sel:scheme:CreateLoadBalancer' :: Maybe Text
scheme = Maybe Text
a} :: CreateLoadBalancer)
createLoadBalancer_tags :: Lens.Lens' CreateLoadBalancer (Prelude.Maybe (Prelude.NonEmpty Tag))
createLoadBalancer_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_tags = (CreateLoadBalancer -> Maybe (NonEmpty Tag))
-> (CreateLoadBalancer
-> Maybe (NonEmpty Tag) -> CreateLoadBalancer)
-> Lens
CreateLoadBalancer
CreateLoadBalancer
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Maybe (NonEmpty Tag)
a -> CreateLoadBalancer
s {$sel:tags:CreateLoadBalancer' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateLoadBalancer) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateLoadBalancer -> f CreateLoadBalancer)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateLoadBalancer
-> f CreateLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
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 (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createLoadBalancer_loadBalancerName :: Lens.Lens' CreateLoadBalancer Prelude.Text
createLoadBalancer_loadBalancerName :: (Text -> f Text) -> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_loadBalancerName = (CreateLoadBalancer -> Text)
-> (CreateLoadBalancer -> Text -> CreateLoadBalancer)
-> Lens CreateLoadBalancer CreateLoadBalancer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {Text
loadBalancerName :: Text
$sel:loadBalancerName:CreateLoadBalancer' :: CreateLoadBalancer -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} Text
a -> CreateLoadBalancer
s {$sel:loadBalancerName:CreateLoadBalancer' :: Text
loadBalancerName = Text
a} :: CreateLoadBalancer)
createLoadBalancer_listeners :: Lens.Lens' CreateLoadBalancer [Listener]
createLoadBalancer_listeners :: ([Listener] -> f [Listener])
-> CreateLoadBalancer -> f CreateLoadBalancer
createLoadBalancer_listeners = (CreateLoadBalancer -> [Listener])
-> (CreateLoadBalancer -> [Listener] -> CreateLoadBalancer)
-> Lens CreateLoadBalancer CreateLoadBalancer [Listener] [Listener]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancer' {[Listener]
listeners :: [Listener]
$sel:listeners:CreateLoadBalancer' :: CreateLoadBalancer -> [Listener]
listeners} -> [Listener]
listeners) (\s :: CreateLoadBalancer
s@CreateLoadBalancer' {} [Listener]
a -> CreateLoadBalancer
s {$sel:listeners:CreateLoadBalancer' :: [Listener]
listeners = [Listener]
a} :: CreateLoadBalancer) (([Listener] -> f [Listener])
-> CreateLoadBalancer -> f CreateLoadBalancer)
-> (([Listener] -> f [Listener]) -> [Listener] -> f [Listener])
-> ([Listener] -> f [Listener])
-> CreateLoadBalancer
-> f CreateLoadBalancer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Listener] -> f [Listener]) -> [Listener] -> f [Listener]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest CreateLoadBalancer where
type
AWSResponse CreateLoadBalancer =
CreateLoadBalancerResponse
request :: CreateLoadBalancer -> Request CreateLoadBalancer
request = Service -> CreateLoadBalancer -> Request CreateLoadBalancer
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy CreateLoadBalancer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLoadBalancer)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse CreateLoadBalancer))
-> Logger
-> Service
-> Proxy CreateLoadBalancer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLoadBalancer)))
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
"CreateLoadBalancerResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Int -> CreateLoadBalancerResponse
CreateLoadBalancerResponse'
(Maybe Text -> Int -> CreateLoadBalancerResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateLoadBalancerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DNSName")
Either String (Int -> CreateLoadBalancerResponse)
-> Either String Int -> Either String CreateLoadBalancerResponse
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 CreateLoadBalancer
instance Prelude.NFData CreateLoadBalancer
instance Core.ToHeaders CreateLoadBalancer where
toHeaders :: CreateLoadBalancer -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateLoadBalancer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CreateLoadBalancer where
toPath :: CreateLoadBalancer -> ByteString
toPath = ByteString -> CreateLoadBalancer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateLoadBalancer where
toQuery :: CreateLoadBalancer -> QueryString
toQuery CreateLoadBalancer' {[Listener]
Maybe [Text]
Maybe (NonEmpty Tag)
Maybe Text
Text
listeners :: [Listener]
loadBalancerName :: Text
tags :: Maybe (NonEmpty Tag)
scheme :: Maybe Text
availabilityZones :: Maybe [Text]
subnets :: Maybe [Text]
securityGroups :: Maybe [Text]
$sel:listeners:CreateLoadBalancer' :: CreateLoadBalancer -> [Listener]
$sel:loadBalancerName:CreateLoadBalancer' :: CreateLoadBalancer -> Text
$sel:tags:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe (NonEmpty Tag)
$sel:scheme:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe Text
$sel:availabilityZones:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Text]
$sel:subnets:CreateLoadBalancer' :: CreateLoadBalancer -> Maybe [Text]
$sel:securityGroups:CreateLoadBalancer' :: CreateLoadBalancer -> 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
"CreateLoadBalancer" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-06-01" :: Prelude.ByteString),
ByteString
"SecurityGroups"
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]
securityGroups
),
ByteString
"Subnets"
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]
subnets),
ByteString
"AvailabilityZones"
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]
availabilityZones
),
ByteString
"Scheme" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
scheme,
ByteString
"Tags"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> NonEmpty Tag -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" (NonEmpty Tag -> QueryString)
-> Maybe (NonEmpty Tag) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags),
ByteString
"LoadBalancerName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
loadBalancerName,
ByteString
"Listeners"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Listener] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Listener]
listeners
]
data CreateLoadBalancerResponse = CreateLoadBalancerResponse'
{
CreateLoadBalancerResponse -> Maybe Text
dNSName :: Prelude.Maybe Prelude.Text,
CreateLoadBalancerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
(CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool)
-> (CreateLoadBalancerResponse
-> CreateLoadBalancerResponse -> Bool)
-> Eq CreateLoadBalancerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
$c/= :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
== :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
$c== :: CreateLoadBalancerResponse -> CreateLoadBalancerResponse -> Bool
Prelude.Eq, ReadPrec [CreateLoadBalancerResponse]
ReadPrec CreateLoadBalancerResponse
Int -> ReadS CreateLoadBalancerResponse
ReadS [CreateLoadBalancerResponse]
(Int -> ReadS CreateLoadBalancerResponse)
-> ReadS [CreateLoadBalancerResponse]
-> ReadPrec CreateLoadBalancerResponse
-> ReadPrec [CreateLoadBalancerResponse]
-> Read CreateLoadBalancerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLoadBalancerResponse]
$creadListPrec :: ReadPrec [CreateLoadBalancerResponse]
readPrec :: ReadPrec CreateLoadBalancerResponse
$creadPrec :: ReadPrec CreateLoadBalancerResponse
readList :: ReadS [CreateLoadBalancerResponse]
$creadList :: ReadS [CreateLoadBalancerResponse]
readsPrec :: Int -> ReadS CreateLoadBalancerResponse
$creadsPrec :: Int -> ReadS CreateLoadBalancerResponse
Prelude.Read, Int -> CreateLoadBalancerResponse -> ShowS
[CreateLoadBalancerResponse] -> ShowS
CreateLoadBalancerResponse -> String
(Int -> CreateLoadBalancerResponse -> ShowS)
-> (CreateLoadBalancerResponse -> String)
-> ([CreateLoadBalancerResponse] -> ShowS)
-> Show CreateLoadBalancerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLoadBalancerResponse] -> ShowS
$cshowList :: [CreateLoadBalancerResponse] -> ShowS
show :: CreateLoadBalancerResponse -> String
$cshow :: CreateLoadBalancerResponse -> String
showsPrec :: Int -> CreateLoadBalancerResponse -> ShowS
$cshowsPrec :: Int -> CreateLoadBalancerResponse -> ShowS
Prelude.Show, (forall x.
CreateLoadBalancerResponse -> Rep CreateLoadBalancerResponse x)
-> (forall x.
Rep CreateLoadBalancerResponse x -> CreateLoadBalancerResponse)
-> Generic CreateLoadBalancerResponse
forall x.
Rep CreateLoadBalancerResponse x -> CreateLoadBalancerResponse
forall x.
CreateLoadBalancerResponse -> Rep CreateLoadBalancerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLoadBalancerResponse x -> CreateLoadBalancerResponse
$cfrom :: forall x.
CreateLoadBalancerResponse -> Rep CreateLoadBalancerResponse x
Prelude.Generic)
newCreateLoadBalancerResponse ::
Prelude.Int ->
CreateLoadBalancerResponse
newCreateLoadBalancerResponse :: Int -> CreateLoadBalancerResponse
newCreateLoadBalancerResponse Int
pHttpStatus_ =
CreateLoadBalancerResponse' :: Maybe Text -> Int -> CreateLoadBalancerResponse
CreateLoadBalancerResponse'
{ $sel:dNSName:CreateLoadBalancerResponse' :: Maybe Text
dNSName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateLoadBalancerResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createLoadBalancerResponse_dNSName :: Lens.Lens' CreateLoadBalancerResponse (Prelude.Maybe Prelude.Text)
createLoadBalancerResponse_dNSName :: (Maybe Text -> f (Maybe Text))
-> CreateLoadBalancerResponse -> f CreateLoadBalancerResponse
createLoadBalancerResponse_dNSName = (CreateLoadBalancerResponse -> Maybe Text)
-> (CreateLoadBalancerResponse
-> Maybe Text -> CreateLoadBalancerResponse)
-> Lens
CreateLoadBalancerResponse
CreateLoadBalancerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancerResponse' {Maybe Text
dNSName :: Maybe Text
$sel:dNSName:CreateLoadBalancerResponse' :: CreateLoadBalancerResponse -> Maybe Text
dNSName} -> Maybe Text
dNSName) (\s :: CreateLoadBalancerResponse
s@CreateLoadBalancerResponse' {} Maybe Text
a -> CreateLoadBalancerResponse
s {$sel:dNSName:CreateLoadBalancerResponse' :: Maybe Text
dNSName = Maybe Text
a} :: CreateLoadBalancerResponse)
createLoadBalancerResponse_httpStatus :: Lens.Lens' CreateLoadBalancerResponse Prelude.Int
createLoadBalancerResponse_httpStatus :: (Int -> f Int)
-> CreateLoadBalancerResponse -> f CreateLoadBalancerResponse
createLoadBalancerResponse_httpStatus = (CreateLoadBalancerResponse -> Int)
-> (CreateLoadBalancerResponse
-> Int -> CreateLoadBalancerResponse)
-> Lens
CreateLoadBalancerResponse CreateLoadBalancerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateLoadBalancerResponse' :: CreateLoadBalancerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateLoadBalancerResponse
s@CreateLoadBalancerResponse' {} Int
a -> CreateLoadBalancerResponse
s {$sel:httpStatus:CreateLoadBalancerResponse' :: Int
httpStatus = Int
a} :: CreateLoadBalancerResponse)
instance Prelude.NFData CreateLoadBalancerResponse