{-# 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.DeleteInstallationMedia
(
DeleteInstallationMedia (..),
newDeleteInstallationMedia,
deleteInstallationMedia_installationMediaId,
InstallationMedia (..),
newInstallationMedia,
installationMedia_engineVersion,
installationMedia_status,
installationMedia_installationMediaId,
installationMedia_engineInstallationMediaPath,
installationMedia_engine,
installationMedia_oSInstallationMediaPath,
installationMedia_customAvailabilityZoneId,
installationMedia_failureCause,
)
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 DeleteInstallationMedia = DeleteInstallationMedia'
{
DeleteInstallationMedia -> Text
installationMediaId :: Prelude.Text
}
deriving (DeleteInstallationMedia -> DeleteInstallationMedia -> Bool
(DeleteInstallationMedia -> DeleteInstallationMedia -> Bool)
-> (DeleteInstallationMedia -> DeleteInstallationMedia -> Bool)
-> Eq DeleteInstallationMedia
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInstallationMedia -> DeleteInstallationMedia -> Bool
$c/= :: DeleteInstallationMedia -> DeleteInstallationMedia -> Bool
== :: DeleteInstallationMedia -> DeleteInstallationMedia -> Bool
$c== :: DeleteInstallationMedia -> DeleteInstallationMedia -> Bool
Prelude.Eq, ReadPrec [DeleteInstallationMedia]
ReadPrec DeleteInstallationMedia
Int -> ReadS DeleteInstallationMedia
ReadS [DeleteInstallationMedia]
(Int -> ReadS DeleteInstallationMedia)
-> ReadS [DeleteInstallationMedia]
-> ReadPrec DeleteInstallationMedia
-> ReadPrec [DeleteInstallationMedia]
-> Read DeleteInstallationMedia
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInstallationMedia]
$creadListPrec :: ReadPrec [DeleteInstallationMedia]
readPrec :: ReadPrec DeleteInstallationMedia
$creadPrec :: ReadPrec DeleteInstallationMedia
readList :: ReadS [DeleteInstallationMedia]
$creadList :: ReadS [DeleteInstallationMedia]
readsPrec :: Int -> ReadS DeleteInstallationMedia
$creadsPrec :: Int -> ReadS DeleteInstallationMedia
Prelude.Read, Int -> DeleteInstallationMedia -> ShowS
[DeleteInstallationMedia] -> ShowS
DeleteInstallationMedia -> String
(Int -> DeleteInstallationMedia -> ShowS)
-> (DeleteInstallationMedia -> String)
-> ([DeleteInstallationMedia] -> ShowS)
-> Show DeleteInstallationMedia
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInstallationMedia] -> ShowS
$cshowList :: [DeleteInstallationMedia] -> ShowS
show :: DeleteInstallationMedia -> String
$cshow :: DeleteInstallationMedia -> String
showsPrec :: Int -> DeleteInstallationMedia -> ShowS
$cshowsPrec :: Int -> DeleteInstallationMedia -> ShowS
Prelude.Show, (forall x.
DeleteInstallationMedia -> Rep DeleteInstallationMedia x)
-> (forall x.
Rep DeleteInstallationMedia x -> DeleteInstallationMedia)
-> Generic DeleteInstallationMedia
forall x. Rep DeleteInstallationMedia x -> DeleteInstallationMedia
forall x. DeleteInstallationMedia -> Rep DeleteInstallationMedia x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteInstallationMedia x -> DeleteInstallationMedia
$cfrom :: forall x. DeleteInstallationMedia -> Rep DeleteInstallationMedia x
Prelude.Generic)
newDeleteInstallationMedia ::
Prelude.Text ->
DeleteInstallationMedia
newDeleteInstallationMedia :: Text -> DeleteInstallationMedia
newDeleteInstallationMedia Text
pInstallationMediaId_ =
DeleteInstallationMedia' :: Text -> DeleteInstallationMedia
DeleteInstallationMedia'
{ $sel:installationMediaId:DeleteInstallationMedia' :: Text
installationMediaId =
Text
pInstallationMediaId_
}
deleteInstallationMedia_installationMediaId :: Lens.Lens' DeleteInstallationMedia Prelude.Text
deleteInstallationMedia_installationMediaId :: (Text -> f Text)
-> DeleteInstallationMedia -> f DeleteInstallationMedia
deleteInstallationMedia_installationMediaId = (DeleteInstallationMedia -> Text)
-> (DeleteInstallationMedia -> Text -> DeleteInstallationMedia)
-> Lens DeleteInstallationMedia DeleteInstallationMedia Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInstallationMedia' {Text
installationMediaId :: Text
$sel:installationMediaId:DeleteInstallationMedia' :: DeleteInstallationMedia -> Text
installationMediaId} -> Text
installationMediaId) (\s :: DeleteInstallationMedia
s@DeleteInstallationMedia' {} Text
a -> DeleteInstallationMedia
s {$sel:installationMediaId:DeleteInstallationMedia' :: Text
installationMediaId = Text
a} :: DeleteInstallationMedia)
instance Core.AWSRequest DeleteInstallationMedia where
type
AWSResponse DeleteInstallationMedia =
InstallationMedia
request :: DeleteInstallationMedia -> Request DeleteInstallationMedia
request = Service
-> DeleteInstallationMedia -> Request DeleteInstallationMedia
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteInstallationMedia
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteInstallationMedia)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteInstallationMedia))
-> Logger
-> Service
-> Proxy DeleteInstallationMedia
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteInstallationMedia)))
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
"DeleteInstallationMediaResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String InstallationMedia
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable DeleteInstallationMedia
instance Prelude.NFData DeleteInstallationMedia
instance Core.ToHeaders DeleteInstallationMedia where
toHeaders :: DeleteInstallationMedia -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteInstallationMedia -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteInstallationMedia where
toPath :: DeleteInstallationMedia -> ByteString
toPath = ByteString -> DeleteInstallationMedia -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteInstallationMedia where
toQuery :: DeleteInstallationMedia -> QueryString
toQuery DeleteInstallationMedia' {Text
installationMediaId :: Text
$sel:installationMediaId:DeleteInstallationMedia' :: DeleteInstallationMedia -> 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
"DeleteInstallationMedia" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"InstallationMediaId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
installationMediaId
]