{-# 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.CancelExportTask
(
CancelExportTask (..),
newCancelExportTask,
cancelExportTask_exportTaskIdentifier,
ExportTask (..),
newExportTask,
exportTask_totalExtractedDataInGB,
exportTask_status,
exportTask_iamRoleArn,
exportTask_sourceArn,
exportTask_exportOnly,
exportTask_taskStartTime,
exportTask_warningMessage,
exportTask_snapshotTime,
exportTask_kmsKeyId,
exportTask_taskEndTime,
exportTask_exportTaskIdentifier,
exportTask_s3Prefix,
exportTask_percentProgress,
exportTask_s3Bucket,
exportTask_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 CancelExportTask = CancelExportTask'
{
CancelExportTask -> Text
exportTaskIdentifier :: Prelude.Text
}
deriving (CancelExportTask -> CancelExportTask -> Bool
(CancelExportTask -> CancelExportTask -> Bool)
-> (CancelExportTask -> CancelExportTask -> Bool)
-> Eq CancelExportTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelExportTask -> CancelExportTask -> Bool
$c/= :: CancelExportTask -> CancelExportTask -> Bool
== :: CancelExportTask -> CancelExportTask -> Bool
$c== :: CancelExportTask -> CancelExportTask -> Bool
Prelude.Eq, ReadPrec [CancelExportTask]
ReadPrec CancelExportTask
Int -> ReadS CancelExportTask
ReadS [CancelExportTask]
(Int -> ReadS CancelExportTask)
-> ReadS [CancelExportTask]
-> ReadPrec CancelExportTask
-> ReadPrec [CancelExportTask]
-> Read CancelExportTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelExportTask]
$creadListPrec :: ReadPrec [CancelExportTask]
readPrec :: ReadPrec CancelExportTask
$creadPrec :: ReadPrec CancelExportTask
readList :: ReadS [CancelExportTask]
$creadList :: ReadS [CancelExportTask]
readsPrec :: Int -> ReadS CancelExportTask
$creadsPrec :: Int -> ReadS CancelExportTask
Prelude.Read, Int -> CancelExportTask -> ShowS
[CancelExportTask] -> ShowS
CancelExportTask -> String
(Int -> CancelExportTask -> ShowS)
-> (CancelExportTask -> String)
-> ([CancelExportTask] -> ShowS)
-> Show CancelExportTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelExportTask] -> ShowS
$cshowList :: [CancelExportTask] -> ShowS
show :: CancelExportTask -> String
$cshow :: CancelExportTask -> String
showsPrec :: Int -> CancelExportTask -> ShowS
$cshowsPrec :: Int -> CancelExportTask -> ShowS
Prelude.Show, (forall x. CancelExportTask -> Rep CancelExportTask x)
-> (forall x. Rep CancelExportTask x -> CancelExportTask)
-> Generic CancelExportTask
forall x. Rep CancelExportTask x -> CancelExportTask
forall x. CancelExportTask -> Rep CancelExportTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CancelExportTask x -> CancelExportTask
$cfrom :: forall x. CancelExportTask -> Rep CancelExportTask x
Prelude.Generic)
newCancelExportTask ::
Prelude.Text ->
CancelExportTask
newCancelExportTask :: Text -> CancelExportTask
newCancelExportTask Text
pExportTaskIdentifier_ =
CancelExportTask' :: Text -> CancelExportTask
CancelExportTask'
{ $sel:exportTaskIdentifier:CancelExportTask' :: Text
exportTaskIdentifier =
Text
pExportTaskIdentifier_
}
cancelExportTask_exportTaskIdentifier :: Lens.Lens' CancelExportTask Prelude.Text
cancelExportTask_exportTaskIdentifier :: (Text -> f Text) -> CancelExportTask -> f CancelExportTask
cancelExportTask_exportTaskIdentifier = (CancelExportTask -> Text)
-> (CancelExportTask -> Text -> CancelExportTask)
-> Lens CancelExportTask CancelExportTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelExportTask' {Text
exportTaskIdentifier :: Text
$sel:exportTaskIdentifier:CancelExportTask' :: CancelExportTask -> Text
exportTaskIdentifier} -> Text
exportTaskIdentifier) (\s :: CancelExportTask
s@CancelExportTask' {} Text
a -> CancelExportTask
s {$sel:exportTaskIdentifier:CancelExportTask' :: Text
exportTaskIdentifier = Text
a} :: CancelExportTask)
instance Core.AWSRequest CancelExportTask where
type AWSResponse CancelExportTask = ExportTask
request :: CancelExportTask -> Request CancelExportTask
request = Service -> CancelExportTask -> Request CancelExportTask
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy CancelExportTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CancelExportTask)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse CancelExportTask))
-> Logger
-> Service
-> Proxy CancelExportTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CancelExportTask)))
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
"CancelExportTaskResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String ExportTask
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable CancelExportTask
instance Prelude.NFData CancelExportTask
instance Core.ToHeaders CancelExportTask where
toHeaders :: CancelExportTask -> ResponseHeaders
toHeaders = ResponseHeaders -> CancelExportTask -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CancelExportTask where
toPath :: CancelExportTask -> ByteString
toPath = ByteString -> CancelExportTask -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CancelExportTask where
toQuery :: CancelExportTask -> QueryString
toQuery CancelExportTask' {Text
exportTaskIdentifier :: Text
$sel:exportTaskIdentifier:CancelExportTask' :: CancelExportTask -> 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
"CancelExportTask" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"ExportTaskIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
exportTaskIdentifier
]