{-# 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.RDS.CreateDBClusterEndpoint
(
CreateDBClusterEndpoint (..),
newCreateDBClusterEndpoint,
createDBClusterEndpoint_excludedMembers,
createDBClusterEndpoint_staticMembers,
createDBClusterEndpoint_tags,
createDBClusterEndpoint_dbClusterIdentifier,
createDBClusterEndpoint_dbClusterEndpointIdentifier,
createDBClusterEndpoint_endpointType,
DBClusterEndpoint (..),
newDBClusterEndpoint,
dbClusterEndpoint_customEndpointType,
dbClusterEndpoint_dbClusterEndpointArn,
dbClusterEndpoint_dbClusterEndpointIdentifier,
dbClusterEndpoint_dbClusterEndpointResourceIdentifier,
dbClusterEndpoint_dbClusterIdentifier,
dbClusterEndpoint_endpoint,
dbClusterEndpoint_endpointType,
dbClusterEndpoint_excludedMembers,
dbClusterEndpoint_staticMembers,
dbClusterEndpoint_status,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateDBClusterEndpoint = CreateDBClusterEndpoint'
{
CreateDBClusterEndpoint -> Maybe [Text]
excludedMembers :: Prelude.Maybe [Prelude.Text],
CreateDBClusterEndpoint -> Maybe [Text]
staticMembers :: Prelude.Maybe [Prelude.Text],
CreateDBClusterEndpoint -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateDBClusterEndpoint -> Text
dbClusterIdentifier :: Prelude.Text,
CreateDBClusterEndpoint -> Text
dbClusterEndpointIdentifier :: Prelude.Text,
CreateDBClusterEndpoint -> Text
endpointType :: Prelude.Text
}
deriving (CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
$c/= :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
== :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
$c== :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
Prelude.Eq, ReadPrec [CreateDBClusterEndpoint]
ReadPrec CreateDBClusterEndpoint
Int -> ReadS CreateDBClusterEndpoint
ReadS [CreateDBClusterEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBClusterEndpoint]
$creadListPrec :: ReadPrec [CreateDBClusterEndpoint]
readPrec :: ReadPrec CreateDBClusterEndpoint
$creadPrec :: ReadPrec CreateDBClusterEndpoint
readList :: ReadS [CreateDBClusterEndpoint]
$creadList :: ReadS [CreateDBClusterEndpoint]
readsPrec :: Int -> ReadS CreateDBClusterEndpoint
$creadsPrec :: Int -> ReadS CreateDBClusterEndpoint
Prelude.Read, Int -> CreateDBClusterEndpoint -> ShowS
[CreateDBClusterEndpoint] -> ShowS
CreateDBClusterEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBClusterEndpoint] -> ShowS
$cshowList :: [CreateDBClusterEndpoint] -> ShowS
show :: CreateDBClusterEndpoint -> String
$cshow :: CreateDBClusterEndpoint -> String
showsPrec :: Int -> CreateDBClusterEndpoint -> ShowS
$cshowsPrec :: Int -> CreateDBClusterEndpoint -> ShowS
Prelude.Show, forall x. Rep CreateDBClusterEndpoint x -> CreateDBClusterEndpoint
forall x. CreateDBClusterEndpoint -> Rep CreateDBClusterEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBClusterEndpoint x -> CreateDBClusterEndpoint
$cfrom :: forall x. CreateDBClusterEndpoint -> Rep CreateDBClusterEndpoint x
Prelude.Generic)
newCreateDBClusterEndpoint ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateDBClusterEndpoint
newCreateDBClusterEndpoint :: Text -> Text -> Text -> CreateDBClusterEndpoint
newCreateDBClusterEndpoint
Text
pDBClusterIdentifier_
Text
pDBClusterEndpointIdentifier_
Text
pEndpointType_ =
CreateDBClusterEndpoint'
{ $sel:excludedMembers:CreateDBClusterEndpoint' :: Maybe [Text]
excludedMembers =
forall a. Maybe a
Prelude.Nothing,
$sel:staticMembers:CreateDBClusterEndpoint' :: Maybe [Text]
staticMembers = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateDBClusterEndpoint' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterIdentifier = Text
pDBClusterIdentifier_,
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterEndpointIdentifier =
Text
pDBClusterEndpointIdentifier_,
$sel:endpointType:CreateDBClusterEndpoint' :: Text
endpointType = Text
pEndpointType_
}
createDBClusterEndpoint_excludedMembers :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Prelude.Text])
createDBClusterEndpoint_excludedMembers :: Lens' CreateDBClusterEndpoint (Maybe [Text])
createDBClusterEndpoint_excludedMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
excludedMembers} -> Maybe [Text]
excludedMembers) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Maybe [Text]
a -> CreateDBClusterEndpoint
s {$sel:excludedMembers:CreateDBClusterEndpoint' :: Maybe [Text]
excludedMembers = Maybe [Text]
a} :: CreateDBClusterEndpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createDBClusterEndpoint_staticMembers :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Prelude.Text])
createDBClusterEndpoint_staticMembers :: Lens' CreateDBClusterEndpoint (Maybe [Text])
createDBClusterEndpoint_staticMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Maybe [Text]
staticMembers :: Maybe [Text]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
staticMembers} -> Maybe [Text]
staticMembers) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Maybe [Text]
a -> CreateDBClusterEndpoint
s {$sel:staticMembers:CreateDBClusterEndpoint' :: Maybe [Text]
staticMembers = Maybe [Text]
a} :: CreateDBClusterEndpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createDBClusterEndpoint_tags :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Tag])
createDBClusterEndpoint_tags :: Lens' CreateDBClusterEndpoint (Maybe [Tag])
createDBClusterEndpoint_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Maybe [Tag]
a -> CreateDBClusterEndpoint
s {$sel:tags:CreateDBClusterEndpoint' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBClusterEndpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createDBClusterEndpoint_dbClusterIdentifier :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_dbClusterIdentifier :: Lens' CreateDBClusterEndpoint Text
createDBClusterEndpoint_dbClusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Text
dbClusterIdentifier :: Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
dbClusterIdentifier} -> Text
dbClusterIdentifier) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Text
a -> CreateDBClusterEndpoint
s {$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterIdentifier = Text
a} :: CreateDBClusterEndpoint)
createDBClusterEndpoint_dbClusterEndpointIdentifier :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_dbClusterEndpointIdentifier :: Lens' CreateDBClusterEndpoint Text
createDBClusterEndpoint_dbClusterEndpointIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Text
dbClusterEndpointIdentifier :: Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
dbClusterEndpointIdentifier} -> Text
dbClusterEndpointIdentifier) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Text
a -> CreateDBClusterEndpoint
s {$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterEndpointIdentifier = Text
a} :: CreateDBClusterEndpoint)
createDBClusterEndpoint_endpointType :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_endpointType :: Lens' CreateDBClusterEndpoint Text
createDBClusterEndpoint_endpointType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Text
endpointType :: Text
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
endpointType} -> Text
endpointType) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Text
a -> CreateDBClusterEndpoint
s {$sel:endpointType:CreateDBClusterEndpoint' :: Text
endpointType = Text
a} :: CreateDBClusterEndpoint)
instance Core.AWSRequest CreateDBClusterEndpoint where
type
AWSResponse CreateDBClusterEndpoint =
DBClusterEndpoint
request :: (Service -> Service)
-> CreateDBClusterEndpoint -> Request CreateDBClusterEndpoint
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateDBClusterEndpoint
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateDBClusterEndpoint)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"CreateDBClusterEndpointResult"
(\Int
s ResponseHeaders
h [Node]
x -> forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)
instance Prelude.Hashable CreateDBClusterEndpoint where
hashWithSalt :: Int -> CreateDBClusterEndpoint -> Int
hashWithSalt Int
_salt CreateDBClusterEndpoint' {Maybe [Text]
Maybe [Tag]
Text
endpointType :: Text
dbClusterEndpointIdentifier :: Text
dbClusterIdentifier :: Text
tags :: Maybe [Tag]
staticMembers :: Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
excludedMembers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
staticMembers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbClusterIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbClusterEndpointIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
endpointType
instance Prelude.NFData CreateDBClusterEndpoint where
rnf :: CreateDBClusterEndpoint -> ()
rnf CreateDBClusterEndpoint' {Maybe [Text]
Maybe [Tag]
Text
endpointType :: Text
dbClusterEndpointIdentifier :: Text
dbClusterIdentifier :: Text
tags :: Maybe [Tag]
staticMembers :: Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
excludedMembers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
staticMembers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbClusterIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbClusterEndpointIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
endpointType
instance Data.ToHeaders CreateDBClusterEndpoint where
toHeaders :: CreateDBClusterEndpoint -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateDBClusterEndpoint where
toPath :: CreateDBClusterEndpoint -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateDBClusterEndpoint where
toQuery :: CreateDBClusterEndpoint -> QueryString
toQuery CreateDBClusterEndpoint' {Maybe [Text]
Maybe [Tag]
Text
endpointType :: Text
dbClusterEndpointIdentifier :: Text
dbClusterIdentifier :: Text
tags :: Maybe [Tag]
staticMembers :: Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateDBClusterEndpoint" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"ExcludedMembers"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
excludedMembers
),
ByteString
"StaticMembers"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
staticMembers
),
ByteString
"Tags"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
(forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Tag" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
ByteString
"DBClusterIdentifier" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbClusterIdentifier,
ByteString
"DBClusterEndpointIdentifier"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbClusterEndpointIdentifier,
ByteString
"EndpointType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
endpointType
]