{-# 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.AddRoleToDBInstance
(
AddRoleToDBInstance (..),
newAddRoleToDBInstance,
addRoleToDBInstance_dbInstanceIdentifier,
addRoleToDBInstance_roleArn,
addRoleToDBInstance_featureName,
AddRoleToDBInstanceResponse (..),
newAddRoleToDBInstanceResponse,
)
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
data AddRoleToDBInstance = AddRoleToDBInstance'
{
AddRoleToDBInstance -> Text
dbInstanceIdentifier :: Prelude.Text,
AddRoleToDBInstance -> Text
roleArn :: Prelude.Text,
AddRoleToDBInstance -> Text
featureName :: Prelude.Text
}
deriving (AddRoleToDBInstance -> AddRoleToDBInstance -> Bool
(AddRoleToDBInstance -> AddRoleToDBInstance -> Bool)
-> (AddRoleToDBInstance -> AddRoleToDBInstance -> Bool)
-> Eq AddRoleToDBInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddRoleToDBInstance -> AddRoleToDBInstance -> Bool
$c/= :: AddRoleToDBInstance -> AddRoleToDBInstance -> Bool
== :: AddRoleToDBInstance -> AddRoleToDBInstance -> Bool
$c== :: AddRoleToDBInstance -> AddRoleToDBInstance -> Bool
Prelude.Eq, ReadPrec [AddRoleToDBInstance]
ReadPrec AddRoleToDBInstance
Int -> ReadS AddRoleToDBInstance
ReadS [AddRoleToDBInstance]
(Int -> ReadS AddRoleToDBInstance)
-> ReadS [AddRoleToDBInstance]
-> ReadPrec AddRoleToDBInstance
-> ReadPrec [AddRoleToDBInstance]
-> Read AddRoleToDBInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddRoleToDBInstance]
$creadListPrec :: ReadPrec [AddRoleToDBInstance]
readPrec :: ReadPrec AddRoleToDBInstance
$creadPrec :: ReadPrec AddRoleToDBInstance
readList :: ReadS [AddRoleToDBInstance]
$creadList :: ReadS [AddRoleToDBInstance]
readsPrec :: Int -> ReadS AddRoleToDBInstance
$creadsPrec :: Int -> ReadS AddRoleToDBInstance
Prelude.Read, Int -> AddRoleToDBInstance -> ShowS
[AddRoleToDBInstance] -> ShowS
AddRoleToDBInstance -> String
(Int -> AddRoleToDBInstance -> ShowS)
-> (AddRoleToDBInstance -> String)
-> ([AddRoleToDBInstance] -> ShowS)
-> Show AddRoleToDBInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddRoleToDBInstance] -> ShowS
$cshowList :: [AddRoleToDBInstance] -> ShowS
show :: AddRoleToDBInstance -> String
$cshow :: AddRoleToDBInstance -> String
showsPrec :: Int -> AddRoleToDBInstance -> ShowS
$cshowsPrec :: Int -> AddRoleToDBInstance -> ShowS
Prelude.Show, (forall x. AddRoleToDBInstance -> Rep AddRoleToDBInstance x)
-> (forall x. Rep AddRoleToDBInstance x -> AddRoleToDBInstance)
-> Generic AddRoleToDBInstance
forall x. Rep AddRoleToDBInstance x -> AddRoleToDBInstance
forall x. AddRoleToDBInstance -> Rep AddRoleToDBInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddRoleToDBInstance x -> AddRoleToDBInstance
$cfrom :: forall x. AddRoleToDBInstance -> Rep AddRoleToDBInstance x
Prelude.Generic)
newAddRoleToDBInstance ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
AddRoleToDBInstance
newAddRoleToDBInstance :: Text -> Text -> Text -> AddRoleToDBInstance
newAddRoleToDBInstance
Text
pDBInstanceIdentifier_
Text
pRoleArn_
Text
pFeatureName_ =
AddRoleToDBInstance' :: Text -> Text -> Text -> AddRoleToDBInstance
AddRoleToDBInstance'
{ $sel:dbInstanceIdentifier:AddRoleToDBInstance' :: Text
dbInstanceIdentifier =
Text
pDBInstanceIdentifier_,
$sel:roleArn:AddRoleToDBInstance' :: Text
roleArn = Text
pRoleArn_,
$sel:featureName:AddRoleToDBInstance' :: Text
featureName = Text
pFeatureName_
}
addRoleToDBInstance_dbInstanceIdentifier :: Lens.Lens' AddRoleToDBInstance Prelude.Text
addRoleToDBInstance_dbInstanceIdentifier :: (Text -> f Text) -> AddRoleToDBInstance -> f AddRoleToDBInstance
addRoleToDBInstance_dbInstanceIdentifier = (AddRoleToDBInstance -> Text)
-> (AddRoleToDBInstance -> Text -> AddRoleToDBInstance)
-> Lens AddRoleToDBInstance AddRoleToDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddRoleToDBInstance' {Text
dbInstanceIdentifier :: Text
$sel:dbInstanceIdentifier:AddRoleToDBInstance' :: AddRoleToDBInstance -> Text
dbInstanceIdentifier} -> Text
dbInstanceIdentifier) (\s :: AddRoleToDBInstance
s@AddRoleToDBInstance' {} Text
a -> AddRoleToDBInstance
s {$sel:dbInstanceIdentifier:AddRoleToDBInstance' :: Text
dbInstanceIdentifier = Text
a} :: AddRoleToDBInstance)
addRoleToDBInstance_roleArn :: Lens.Lens' AddRoleToDBInstance Prelude.Text
addRoleToDBInstance_roleArn :: (Text -> f Text) -> AddRoleToDBInstance -> f AddRoleToDBInstance
addRoleToDBInstance_roleArn = (AddRoleToDBInstance -> Text)
-> (AddRoleToDBInstance -> Text -> AddRoleToDBInstance)
-> Lens AddRoleToDBInstance AddRoleToDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddRoleToDBInstance' {Text
roleArn :: Text
$sel:roleArn:AddRoleToDBInstance' :: AddRoleToDBInstance -> Text
roleArn} -> Text
roleArn) (\s :: AddRoleToDBInstance
s@AddRoleToDBInstance' {} Text
a -> AddRoleToDBInstance
s {$sel:roleArn:AddRoleToDBInstance' :: Text
roleArn = Text
a} :: AddRoleToDBInstance)
addRoleToDBInstance_featureName :: Lens.Lens' AddRoleToDBInstance Prelude.Text
addRoleToDBInstance_featureName :: (Text -> f Text) -> AddRoleToDBInstance -> f AddRoleToDBInstance
addRoleToDBInstance_featureName = (AddRoleToDBInstance -> Text)
-> (AddRoleToDBInstance -> Text -> AddRoleToDBInstance)
-> Lens AddRoleToDBInstance AddRoleToDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddRoleToDBInstance' {Text
featureName :: Text
$sel:featureName:AddRoleToDBInstance' :: AddRoleToDBInstance -> Text
featureName} -> Text
featureName) (\s :: AddRoleToDBInstance
s@AddRoleToDBInstance' {} Text
a -> AddRoleToDBInstance
s {$sel:featureName:AddRoleToDBInstance' :: Text
featureName = Text
a} :: AddRoleToDBInstance)
instance Core.AWSRequest AddRoleToDBInstance where
type
AWSResponse AddRoleToDBInstance =
AddRoleToDBInstanceResponse
request :: AddRoleToDBInstance -> Request AddRoleToDBInstance
request = Service -> AddRoleToDBInstance -> Request AddRoleToDBInstance
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy AddRoleToDBInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AddRoleToDBInstance)))
response =
AWSResponse AddRoleToDBInstance
-> Logger
-> Service
-> Proxy AddRoleToDBInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AddRoleToDBInstance)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse AddRoleToDBInstance
AddRoleToDBInstanceResponse
AddRoleToDBInstanceResponse'
instance Prelude.Hashable AddRoleToDBInstance
instance Prelude.NFData AddRoleToDBInstance
instance Core.ToHeaders AddRoleToDBInstance where
toHeaders :: AddRoleToDBInstance -> [Header]
toHeaders = [Header] -> AddRoleToDBInstance -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath AddRoleToDBInstance where
toPath :: AddRoleToDBInstance -> ByteString
toPath = ByteString -> AddRoleToDBInstance -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery AddRoleToDBInstance where
toQuery :: AddRoleToDBInstance -> QueryString
toQuery AddRoleToDBInstance' {Text
featureName :: Text
roleArn :: Text
dbInstanceIdentifier :: Text
$sel:featureName:AddRoleToDBInstance' :: AddRoleToDBInstance -> Text
$sel:roleArn:AddRoleToDBInstance' :: AddRoleToDBInstance -> Text
$sel:dbInstanceIdentifier:AddRoleToDBInstance' :: AddRoleToDBInstance -> 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
"AddRoleToDBInstance" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"DBInstanceIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbInstanceIdentifier,
ByteString
"RoleArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
roleArn,
ByteString
"FeatureName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
featureName
]
data AddRoleToDBInstanceResponse = AddRoleToDBInstanceResponse'
{
}
deriving (AddRoleToDBInstanceResponse -> AddRoleToDBInstanceResponse -> Bool
(AddRoleToDBInstanceResponse
-> AddRoleToDBInstanceResponse -> Bool)
-> (AddRoleToDBInstanceResponse
-> AddRoleToDBInstanceResponse -> Bool)
-> Eq AddRoleToDBInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddRoleToDBInstanceResponse -> AddRoleToDBInstanceResponse -> Bool
$c/= :: AddRoleToDBInstanceResponse -> AddRoleToDBInstanceResponse -> Bool
== :: AddRoleToDBInstanceResponse -> AddRoleToDBInstanceResponse -> Bool
$c== :: AddRoleToDBInstanceResponse -> AddRoleToDBInstanceResponse -> Bool
Prelude.Eq, ReadPrec [AddRoleToDBInstanceResponse]
ReadPrec AddRoleToDBInstanceResponse
Int -> ReadS AddRoleToDBInstanceResponse
ReadS [AddRoleToDBInstanceResponse]
(Int -> ReadS AddRoleToDBInstanceResponse)
-> ReadS [AddRoleToDBInstanceResponse]
-> ReadPrec AddRoleToDBInstanceResponse
-> ReadPrec [AddRoleToDBInstanceResponse]
-> Read AddRoleToDBInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddRoleToDBInstanceResponse]
$creadListPrec :: ReadPrec [AddRoleToDBInstanceResponse]
readPrec :: ReadPrec AddRoleToDBInstanceResponse
$creadPrec :: ReadPrec AddRoleToDBInstanceResponse
readList :: ReadS [AddRoleToDBInstanceResponse]
$creadList :: ReadS [AddRoleToDBInstanceResponse]
readsPrec :: Int -> ReadS AddRoleToDBInstanceResponse
$creadsPrec :: Int -> ReadS AddRoleToDBInstanceResponse
Prelude.Read, Int -> AddRoleToDBInstanceResponse -> ShowS
[AddRoleToDBInstanceResponse] -> ShowS
AddRoleToDBInstanceResponse -> String
(Int -> AddRoleToDBInstanceResponse -> ShowS)
-> (AddRoleToDBInstanceResponse -> String)
-> ([AddRoleToDBInstanceResponse] -> ShowS)
-> Show AddRoleToDBInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddRoleToDBInstanceResponse] -> ShowS
$cshowList :: [AddRoleToDBInstanceResponse] -> ShowS
show :: AddRoleToDBInstanceResponse -> String
$cshow :: AddRoleToDBInstanceResponse -> String
showsPrec :: Int -> AddRoleToDBInstanceResponse -> ShowS
$cshowsPrec :: Int -> AddRoleToDBInstanceResponse -> ShowS
Prelude.Show, (forall x.
AddRoleToDBInstanceResponse -> Rep AddRoleToDBInstanceResponse x)
-> (forall x.
Rep AddRoleToDBInstanceResponse x -> AddRoleToDBInstanceResponse)
-> Generic AddRoleToDBInstanceResponse
forall x.
Rep AddRoleToDBInstanceResponse x -> AddRoleToDBInstanceResponse
forall x.
AddRoleToDBInstanceResponse -> Rep AddRoleToDBInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddRoleToDBInstanceResponse x -> AddRoleToDBInstanceResponse
$cfrom :: forall x.
AddRoleToDBInstanceResponse -> Rep AddRoleToDBInstanceResponse x
Prelude.Generic)
newAddRoleToDBInstanceResponse ::
AddRoleToDBInstanceResponse
newAddRoleToDBInstanceResponse :: AddRoleToDBInstanceResponse
newAddRoleToDBInstanceResponse =
AddRoleToDBInstanceResponse
AddRoleToDBInstanceResponse'
instance Prelude.NFData AddRoleToDBInstanceResponse