{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.CreateDBClusterEndpoint
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new custom endpoint and associates it with an Amazon Aurora DB
-- cluster.
--
-- This action only applies to Aurora DB clusters.
module Amazonka.RDS.CreateDBClusterEndpoint
  ( -- * Creating a Request
    CreateDBClusterEndpoint (..),
    newCreateDBClusterEndpoint,

    -- * Request Lenses
    createDBClusterEndpoint_staticMembers,
    createDBClusterEndpoint_excludedMembers,
    createDBClusterEndpoint_tags,
    createDBClusterEndpoint_dbClusterIdentifier,
    createDBClusterEndpoint_dbClusterEndpointIdentifier,
    createDBClusterEndpoint_endpointType,

    -- * Destructuring the Response
    DBClusterEndpoint (..),
    newDBClusterEndpoint,

    -- * Response Lenses
    dbClusterEndpoint_status,
    dbClusterEndpoint_dbClusterIdentifier,
    dbClusterEndpoint_dbClusterEndpointArn,
    dbClusterEndpoint_customEndpointType,
    dbClusterEndpoint_staticMembers,
    dbClusterEndpoint_endpointType,
    dbClusterEndpoint_dbClusterEndpointIdentifier,
    dbClusterEndpoint_endpoint,
    dbClusterEndpoint_dbClusterEndpointResourceIdentifier,
    dbClusterEndpoint_excludedMembers,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateDBClusterEndpoint' smart constructor.
data CreateDBClusterEndpoint = CreateDBClusterEndpoint'
  { -- | List of DB instance identifiers that are part of the custom endpoint
    -- group.
    CreateDBClusterEndpoint -> Maybe [Text]
staticMembers :: Prelude.Maybe [Prelude.Text],
    -- | List of DB instance identifiers that aren\'t part of the custom endpoint
    -- group. All other eligible instances are reachable through the custom
    -- endpoint. Only relevant if the list of static members is empty.
    CreateDBClusterEndpoint -> Maybe [Text]
excludedMembers :: Prelude.Maybe [Prelude.Text],
    -- | The tags to be assigned to the Amazon RDS resource.
    CreateDBClusterEndpoint -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The DB cluster identifier of the DB cluster associated with the
    -- endpoint. This parameter is stored as a lowercase string.
    CreateDBClusterEndpoint -> Text
dbClusterIdentifier :: Prelude.Text,
    -- | The identifier to use for the new endpoint. This parameter is stored as
    -- a lowercase string.
    CreateDBClusterEndpoint -> Text
dbClusterEndpointIdentifier :: Prelude.Text,
    -- | The type of the endpoint. One of: @READER@, @WRITER@, @ANY@.
    CreateDBClusterEndpoint -> Text
endpointType :: Prelude.Text
  }
  deriving (CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
(CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool)
-> (CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool)
-> Eq CreateDBClusterEndpoint
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]
(Int -> ReadS CreateDBClusterEndpoint)
-> ReadS [CreateDBClusterEndpoint]
-> ReadPrec CreateDBClusterEndpoint
-> ReadPrec [CreateDBClusterEndpoint]
-> Read 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
(Int -> CreateDBClusterEndpoint -> ShowS)
-> (CreateDBClusterEndpoint -> String)
-> ([CreateDBClusterEndpoint] -> ShowS)
-> Show CreateDBClusterEndpoint
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.
 CreateDBClusterEndpoint -> Rep CreateDBClusterEndpoint x)
-> (forall x.
    Rep CreateDBClusterEndpoint x -> CreateDBClusterEndpoint)
-> Generic CreateDBClusterEndpoint
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)

-- |
-- Create a value of 'CreateDBClusterEndpoint' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'staticMembers', 'createDBClusterEndpoint_staticMembers' - List of DB instance identifiers that are part of the custom endpoint
-- group.
--
-- 'excludedMembers', 'createDBClusterEndpoint_excludedMembers' - List of DB instance identifiers that aren\'t part of the custom endpoint
-- group. All other eligible instances are reachable through the custom
-- endpoint. Only relevant if the list of static members is empty.
--
-- 'tags', 'createDBClusterEndpoint_tags' - The tags to be assigned to the Amazon RDS resource.
--
-- 'dbClusterIdentifier', 'createDBClusterEndpoint_dbClusterIdentifier' - The DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
--
-- 'dbClusterEndpointIdentifier', 'createDBClusterEndpoint_dbClusterEndpointIdentifier' - The identifier to use for the new endpoint. This parameter is stored as
-- a lowercase string.
--
-- 'endpointType', 'createDBClusterEndpoint_endpointType' - The type of the endpoint. One of: @READER@, @WRITER@, @ANY@.
newCreateDBClusterEndpoint ::
  -- | 'dbClusterIdentifier'
  Prelude.Text ->
  -- | 'dbClusterEndpointIdentifier'
  Prelude.Text ->
  -- | 'endpointType'
  Prelude.Text ->
  CreateDBClusterEndpoint
newCreateDBClusterEndpoint :: Text -> Text -> Text -> CreateDBClusterEndpoint
newCreateDBClusterEndpoint
  Text
pDBClusterIdentifier_
  Text
pDBClusterEndpointIdentifier_
  Text
pEndpointType_ =
    CreateDBClusterEndpoint' :: Maybe [Text]
-> Maybe [Text]
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> CreateDBClusterEndpoint
CreateDBClusterEndpoint'
      { $sel:staticMembers:CreateDBClusterEndpoint' :: Maybe [Text]
staticMembers =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:excludedMembers:CreateDBClusterEndpoint' :: Maybe [Text]
excludedMembers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDBClusterEndpoint' :: Maybe [Tag]
tags = Maybe [Tag]
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_
      }

-- | List of DB instance identifiers that are part of the custom endpoint
-- group.
createDBClusterEndpoint_staticMembers :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Prelude.Text])
createDBClusterEndpoint_staticMembers :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint
createDBClusterEndpoint_staticMembers = (CreateDBClusterEndpoint -> Maybe [Text])
-> (CreateDBClusterEndpoint
    -> Maybe [Text] -> CreateDBClusterEndpoint)
-> Lens
     CreateDBClusterEndpoint
     CreateDBClusterEndpoint
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBClusterEndpoint
-> f CreateDBClusterEndpoint
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

-- | List of DB instance identifiers that aren\'t part of the custom endpoint
-- group. All other eligible instances are reachable through the custom
-- endpoint. Only relevant if the list of static members is empty.
createDBClusterEndpoint_excludedMembers :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Prelude.Text])
createDBClusterEndpoint_excludedMembers :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint
createDBClusterEndpoint_excludedMembers = (CreateDBClusterEndpoint -> Maybe [Text])
-> (CreateDBClusterEndpoint
    -> Maybe [Text] -> CreateDBClusterEndpoint)
-> Lens
     CreateDBClusterEndpoint
     CreateDBClusterEndpoint
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDBClusterEndpoint
-> f CreateDBClusterEndpoint
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

-- | The tags to be assigned to the Amazon RDS resource.
createDBClusterEndpoint_tags :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Tag])
createDBClusterEndpoint_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint
createDBClusterEndpoint_tags = (CreateDBClusterEndpoint -> Maybe [Tag])
-> (CreateDBClusterEndpoint
    -> Maybe [Tag] -> CreateDBClusterEndpoint)
-> Lens
     CreateDBClusterEndpoint
     CreateDBClusterEndpoint
     (Maybe [Tag])
     (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBClusterEndpoint
-> f CreateDBClusterEndpoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
createDBClusterEndpoint_dbClusterIdentifier :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_dbClusterIdentifier :: (Text -> f Text)
-> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint
createDBClusterEndpoint_dbClusterIdentifier = (CreateDBClusterEndpoint -> Text)
-> (CreateDBClusterEndpoint -> Text -> CreateDBClusterEndpoint)
-> Lens CreateDBClusterEndpoint CreateDBClusterEndpoint Text Text
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)

-- | The identifier to use for the new endpoint. This parameter is stored as
-- a lowercase string.
createDBClusterEndpoint_dbClusterEndpointIdentifier :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_dbClusterEndpointIdentifier :: (Text -> f Text)
-> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint
createDBClusterEndpoint_dbClusterEndpointIdentifier = (CreateDBClusterEndpoint -> Text)
-> (CreateDBClusterEndpoint -> Text -> CreateDBClusterEndpoint)
-> Lens CreateDBClusterEndpoint CreateDBClusterEndpoint Text Text
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)

-- | The type of the endpoint. One of: @READER@, @WRITER@, @ANY@.
createDBClusterEndpoint_endpointType :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_endpointType :: (Text -> f Text)
-> CreateDBClusterEndpoint -> f CreateDBClusterEndpoint
createDBClusterEndpoint_endpointType = (CreateDBClusterEndpoint -> Text)
-> (CreateDBClusterEndpoint -> Text -> CreateDBClusterEndpoint)
-> Lens CreateDBClusterEndpoint CreateDBClusterEndpoint Text Text
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 :: CreateDBClusterEndpoint -> Request CreateDBClusterEndpoint
request = Service
-> CreateDBClusterEndpoint -> Request CreateDBClusterEndpoint
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDBClusterEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBClusterEndpoint)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateDBClusterEndpoint))
-> Logger
-> Service
-> Proxy CreateDBClusterEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBClusterEndpoint)))
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
"CreateDBClusterEndpointResult"
      (\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String DBClusterEndpoint
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)

instance Prelude.Hashable CreateDBClusterEndpoint

instance Prelude.NFData CreateDBClusterEndpoint

instance Core.ToHeaders CreateDBClusterEndpoint where
  toHeaders :: CreateDBClusterEndpoint -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateDBClusterEndpoint -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath CreateDBClusterEndpoint where
  toPath :: CreateDBClusterEndpoint -> ByteString
toPath = ByteString -> CreateDBClusterEndpoint -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreateDBClusterEndpoint where
  toQuery :: CreateDBClusterEndpoint -> QueryString
toQuery CreateDBClusterEndpoint' {Maybe [Text]
Maybe [Tag]
Text
endpointType :: Text
dbClusterEndpointIdentifier :: Text
dbClusterIdentifier :: Text
tags :: Maybe [Tag]
excludedMembers :: Maybe [Text]
staticMembers :: Maybe [Text]
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> 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
"CreateDBClusterEndpoint" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"StaticMembers"
          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]
staticMembers
            ),
        ByteString
"ExcludedMembers"
          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]
excludedMembers
            ),
        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 -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"DBClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterIdentifier,
        ByteString
"DBClusterEndpointIdentifier"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterEndpointIdentifier,
        ByteString
"EndpointType" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
endpointType
      ]