{-# 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.ModifyDBProxyEndpoint
(
ModifyDBProxyEndpoint (..),
newModifyDBProxyEndpoint,
modifyDBProxyEndpoint_newDBProxyEndpointName,
modifyDBProxyEndpoint_vpcSecurityGroupIds,
modifyDBProxyEndpoint_dbProxyEndpointName,
ModifyDBProxyEndpointResponse (..),
newModifyDBProxyEndpointResponse,
modifyDBProxyEndpointResponse_dbProxyEndpoint,
modifyDBProxyEndpointResponse_httpStatus,
)
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 ModifyDBProxyEndpoint = ModifyDBProxyEndpoint'
{
ModifyDBProxyEndpoint -> Maybe Text
newDBProxyEndpointName' :: Prelude.Maybe Prelude.Text,
ModifyDBProxyEndpoint -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
ModifyDBProxyEndpoint -> Text
dbProxyEndpointName :: Prelude.Text
}
deriving (ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
$c/= :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
== :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
$c== :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
Prelude.Eq, ReadPrec [ModifyDBProxyEndpoint]
ReadPrec ModifyDBProxyEndpoint
Int -> ReadS ModifyDBProxyEndpoint
ReadS [ModifyDBProxyEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBProxyEndpoint]
$creadListPrec :: ReadPrec [ModifyDBProxyEndpoint]
readPrec :: ReadPrec ModifyDBProxyEndpoint
$creadPrec :: ReadPrec ModifyDBProxyEndpoint
readList :: ReadS [ModifyDBProxyEndpoint]
$creadList :: ReadS [ModifyDBProxyEndpoint]
readsPrec :: Int -> ReadS ModifyDBProxyEndpoint
$creadsPrec :: Int -> ReadS ModifyDBProxyEndpoint
Prelude.Read, Int -> ModifyDBProxyEndpoint -> ShowS
[ModifyDBProxyEndpoint] -> ShowS
ModifyDBProxyEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBProxyEndpoint] -> ShowS
$cshowList :: [ModifyDBProxyEndpoint] -> ShowS
show :: ModifyDBProxyEndpoint -> String
$cshow :: ModifyDBProxyEndpoint -> String
showsPrec :: Int -> ModifyDBProxyEndpoint -> ShowS
$cshowsPrec :: Int -> ModifyDBProxyEndpoint -> ShowS
Prelude.Show, forall x. Rep ModifyDBProxyEndpoint x -> ModifyDBProxyEndpoint
forall x. ModifyDBProxyEndpoint -> Rep ModifyDBProxyEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyDBProxyEndpoint x -> ModifyDBProxyEndpoint
$cfrom :: forall x. ModifyDBProxyEndpoint -> Rep ModifyDBProxyEndpoint x
Prelude.Generic)
newModifyDBProxyEndpoint ::
Prelude.Text ->
ModifyDBProxyEndpoint
newModifyDBProxyEndpoint :: Text -> ModifyDBProxyEndpoint
newModifyDBProxyEndpoint Text
pDBProxyEndpointName_ =
ModifyDBProxyEndpoint'
{ $sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: Maybe Text
newDBProxyEndpointName' =
forall a. Maybe a
Prelude.Nothing,
$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: Maybe [Text]
vpcSecurityGroupIds = forall a. Maybe a
Prelude.Nothing,
$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: Text
dbProxyEndpointName = Text
pDBProxyEndpointName_
}
modifyDBProxyEndpoint_newDBProxyEndpointName :: Lens.Lens' ModifyDBProxyEndpoint (Prelude.Maybe Prelude.Text)
modifyDBProxyEndpoint_newDBProxyEndpointName :: Lens' ModifyDBProxyEndpoint (Maybe Text)
modifyDBProxyEndpoint_newDBProxyEndpointName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpoint' {Maybe Text
newDBProxyEndpointName' :: Maybe Text
$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe Text
newDBProxyEndpointName'} -> Maybe Text
newDBProxyEndpointName') (\s :: ModifyDBProxyEndpoint
s@ModifyDBProxyEndpoint' {} Maybe Text
a -> ModifyDBProxyEndpoint
s {$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: Maybe Text
newDBProxyEndpointName' = Maybe Text
a} :: ModifyDBProxyEndpoint)
modifyDBProxyEndpoint_vpcSecurityGroupIds :: Lens.Lens' ModifyDBProxyEndpoint (Prelude.Maybe [Prelude.Text])
modifyDBProxyEndpoint_vpcSecurityGroupIds :: Lens' ModifyDBProxyEndpoint (Maybe [Text])
modifyDBProxyEndpoint_vpcSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpoint' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: ModifyDBProxyEndpoint
s@ModifyDBProxyEndpoint' {} Maybe [Text]
a -> ModifyDBProxyEndpoint
s {$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: ModifyDBProxyEndpoint) 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
modifyDBProxyEndpoint_dbProxyEndpointName :: Lens.Lens' ModifyDBProxyEndpoint Prelude.Text
modifyDBProxyEndpoint_dbProxyEndpointName :: Lens' ModifyDBProxyEndpoint Text
modifyDBProxyEndpoint_dbProxyEndpointName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpoint' {Text
dbProxyEndpointName :: Text
$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Text
dbProxyEndpointName} -> Text
dbProxyEndpointName) (\s :: ModifyDBProxyEndpoint
s@ModifyDBProxyEndpoint' {} Text
a -> ModifyDBProxyEndpoint
s {$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: Text
dbProxyEndpointName = Text
a} :: ModifyDBProxyEndpoint)
instance Core.AWSRequest ModifyDBProxyEndpoint where
type
AWSResponse ModifyDBProxyEndpoint =
ModifyDBProxyEndpointResponse
request :: (Service -> Service)
-> ModifyDBProxyEndpoint -> Request ModifyDBProxyEndpoint
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 ModifyDBProxyEndpoint
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyDBProxyEndpoint)))
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
"ModifyDBProxyEndpointResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DBProxyEndpoint -> Int -> ModifyDBProxyEndpointResponse
ModifyDBProxyEndpointResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBProxyEndpoint")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ModifyDBProxyEndpoint where
hashWithSalt :: Int -> ModifyDBProxyEndpoint -> Int
hashWithSalt Int
_salt ModifyDBProxyEndpoint' {Maybe [Text]
Maybe Text
Text
dbProxyEndpointName :: Text
vpcSecurityGroupIds :: Maybe [Text]
newDBProxyEndpointName' :: Maybe Text
$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Text
$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe [Text]
$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
newDBProxyEndpointName'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
vpcSecurityGroupIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbProxyEndpointName
instance Prelude.NFData ModifyDBProxyEndpoint where
rnf :: ModifyDBProxyEndpoint -> ()
rnf ModifyDBProxyEndpoint' {Maybe [Text]
Maybe Text
Text
dbProxyEndpointName :: Text
vpcSecurityGroupIds :: Maybe [Text]
newDBProxyEndpointName' :: Maybe Text
$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Text
$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe [Text]
$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
newDBProxyEndpointName'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
vpcSecurityGroupIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbProxyEndpointName
instance Data.ToHeaders ModifyDBProxyEndpoint where
toHeaders :: ModifyDBProxyEndpoint -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ModifyDBProxyEndpoint where
toPath :: ModifyDBProxyEndpoint -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ModifyDBProxyEndpoint where
toQuery :: ModifyDBProxyEndpoint -> QueryString
toQuery ModifyDBProxyEndpoint' {Maybe [Text]
Maybe Text
Text
dbProxyEndpointName :: Text
vpcSecurityGroupIds :: Maybe [Text]
newDBProxyEndpointName' :: Maybe Text
$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Text
$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe [Text]
$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ModifyDBProxyEndpoint" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"NewDBProxyEndpointName"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
newDBProxyEndpointName',
ByteString
"VpcSecurityGroupIds"
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]
vpcSecurityGroupIds
),
ByteString
"DBProxyEndpointName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbProxyEndpointName
]
data ModifyDBProxyEndpointResponse = ModifyDBProxyEndpointResponse'
{
ModifyDBProxyEndpointResponse -> Maybe DBProxyEndpoint
dbProxyEndpoint :: Prelude.Maybe DBProxyEndpoint,
ModifyDBProxyEndpointResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
$c/= :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
== :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
$c== :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
Prelude.Eq, ReadPrec [ModifyDBProxyEndpointResponse]
ReadPrec ModifyDBProxyEndpointResponse
Int -> ReadS ModifyDBProxyEndpointResponse
ReadS [ModifyDBProxyEndpointResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBProxyEndpointResponse]
$creadListPrec :: ReadPrec [ModifyDBProxyEndpointResponse]
readPrec :: ReadPrec ModifyDBProxyEndpointResponse
$creadPrec :: ReadPrec ModifyDBProxyEndpointResponse
readList :: ReadS [ModifyDBProxyEndpointResponse]
$creadList :: ReadS [ModifyDBProxyEndpointResponse]
readsPrec :: Int -> ReadS ModifyDBProxyEndpointResponse
$creadsPrec :: Int -> ReadS ModifyDBProxyEndpointResponse
Prelude.Read, Int -> ModifyDBProxyEndpointResponse -> ShowS
[ModifyDBProxyEndpointResponse] -> ShowS
ModifyDBProxyEndpointResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBProxyEndpointResponse] -> ShowS
$cshowList :: [ModifyDBProxyEndpointResponse] -> ShowS
show :: ModifyDBProxyEndpointResponse -> String
$cshow :: ModifyDBProxyEndpointResponse -> String
showsPrec :: Int -> ModifyDBProxyEndpointResponse -> ShowS
$cshowsPrec :: Int -> ModifyDBProxyEndpointResponse -> ShowS
Prelude.Show, forall x.
Rep ModifyDBProxyEndpointResponse x
-> ModifyDBProxyEndpointResponse
forall x.
ModifyDBProxyEndpointResponse
-> Rep ModifyDBProxyEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyDBProxyEndpointResponse x
-> ModifyDBProxyEndpointResponse
$cfrom :: forall x.
ModifyDBProxyEndpointResponse
-> Rep ModifyDBProxyEndpointResponse x
Prelude.Generic)
newModifyDBProxyEndpointResponse ::
Prelude.Int ->
ModifyDBProxyEndpointResponse
newModifyDBProxyEndpointResponse :: Int -> ModifyDBProxyEndpointResponse
newModifyDBProxyEndpointResponse Int
pHttpStatus_ =
ModifyDBProxyEndpointResponse'
{ $sel:dbProxyEndpoint:ModifyDBProxyEndpointResponse' :: Maybe DBProxyEndpoint
dbProxyEndpoint =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ModifyDBProxyEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_
}
modifyDBProxyEndpointResponse_dbProxyEndpoint :: Lens.Lens' ModifyDBProxyEndpointResponse (Prelude.Maybe DBProxyEndpoint)
modifyDBProxyEndpointResponse_dbProxyEndpoint :: Lens' ModifyDBProxyEndpointResponse (Maybe DBProxyEndpoint)
modifyDBProxyEndpointResponse_dbProxyEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpointResponse' {Maybe DBProxyEndpoint
dbProxyEndpoint :: Maybe DBProxyEndpoint
$sel:dbProxyEndpoint:ModifyDBProxyEndpointResponse' :: ModifyDBProxyEndpointResponse -> Maybe DBProxyEndpoint
dbProxyEndpoint} -> Maybe DBProxyEndpoint
dbProxyEndpoint) (\s :: ModifyDBProxyEndpointResponse
s@ModifyDBProxyEndpointResponse' {} Maybe DBProxyEndpoint
a -> ModifyDBProxyEndpointResponse
s {$sel:dbProxyEndpoint:ModifyDBProxyEndpointResponse' :: Maybe DBProxyEndpoint
dbProxyEndpoint = Maybe DBProxyEndpoint
a} :: ModifyDBProxyEndpointResponse)
modifyDBProxyEndpointResponse_httpStatus :: Lens.Lens' ModifyDBProxyEndpointResponse Prelude.Int
modifyDBProxyEndpointResponse_httpStatus :: Lens' ModifyDBProxyEndpointResponse Int
modifyDBProxyEndpointResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpointResponse' {Int
httpStatus :: Int
$sel:httpStatus:ModifyDBProxyEndpointResponse' :: ModifyDBProxyEndpointResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ModifyDBProxyEndpointResponse
s@ModifyDBProxyEndpointResponse' {} Int
a -> ModifyDBProxyEndpointResponse
s {$sel:httpStatus:ModifyDBProxyEndpointResponse' :: Int
httpStatus = Int
a} :: ModifyDBProxyEndpointResponse)
instance Prelude.NFData ModifyDBProxyEndpointResponse where
rnf :: ModifyDBProxyEndpointResponse -> ()
rnf ModifyDBProxyEndpointResponse' {Int
Maybe DBProxyEndpoint
httpStatus :: Int
dbProxyEndpoint :: Maybe DBProxyEndpoint
$sel:httpStatus:ModifyDBProxyEndpointResponse' :: ModifyDBProxyEndpointResponse -> Int
$sel:dbProxyEndpoint:ModifyDBProxyEndpointResponse' :: ModifyDBProxyEndpointResponse -> Maybe DBProxyEndpoint
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DBProxyEndpoint
dbProxyEndpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus