{-# 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.StartExportTask
-- 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)
--
-- Starts an export of a snapshot to Amazon S3. The provided IAM role must
-- have access to the S3 bucket.
module Amazonka.RDS.StartExportTask
  ( -- * Creating a Request
    StartExportTask (..),
    newStartExportTask,

    -- * Request Lenses
    startExportTask_exportOnly,
    startExportTask_s3Prefix,
    startExportTask_exportTaskIdentifier,
    startExportTask_sourceArn,
    startExportTask_s3BucketName,
    startExportTask_iamRoleArn,
    startExportTask_kmsKeyId,

    -- * Destructuring the Response
    ExportTask (..),
    newExportTask,

    -- * Response Lenses
    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

-- | /See:/ 'newStartExportTask' smart constructor.
data StartExportTask = StartExportTask'
  { -- | The data to be exported from the snapshot. If this parameter is not
    -- provided, all the snapshot data is exported. Valid values are the
    -- following:
    --
    -- -   @database@ - Export all the data from a specified database.
    --
    -- -   @database.table@ /table-name/ - Export a table of the snapshot. This
    --     format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora
    --     MySQL.
    --
    -- -   @database.schema@ /schema-name/ - Export a database schema of the
    --     snapshot. This format is valid only for RDS for PostgreSQL and
    --     Aurora PostgreSQL.
    --
    -- -   @database.schema.table@ /table-name/ - Export a table of the
    --     database schema. This format is valid only for RDS for PostgreSQL
    --     and Aurora PostgreSQL.
    StartExportTask -> Maybe [Text]
exportOnly :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon S3 bucket prefix to use as the file name and path of the
    -- exported snapshot.
    StartExportTask -> Maybe Text
s3Prefix :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the snapshot export task. This ID isn\'t an
    -- identifier for the Amazon S3 bucket where the snapshot is to be exported
    -- to.
    StartExportTask -> Text
exportTaskIdentifier :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the snapshot to export to Amazon S3.
    StartExportTask -> Text
sourceArn :: Prelude.Text,
    -- | The name of the Amazon S3 bucket to export the snapshot to.
    StartExportTask -> Text
s3BucketName :: Prelude.Text,
    -- | The name of the IAM role to use for writing to the Amazon S3 bucket when
    -- exporting a snapshot.
    StartExportTask -> Text
iamRoleArn :: Prelude.Text,
    -- | The ID of the Amazon Web Services KMS customer master key (CMK) to use
    -- to encrypt the snapshot exported to Amazon S3. The Amazon Web Services
    -- KMS key identifier is the key ARN, key ID, alias ARN, or alias name for
    -- the Amazon Web Services KMS customer master key (CMK). The caller of
    -- this operation must be authorized to execute the following operations.
    -- These can be set in the Amazon Web Services KMS key policy:
    --
    -- -   GrantOperation.Encrypt
    --
    -- -   GrantOperation.Decrypt
    --
    -- -   GrantOperation.GenerateDataKey
    --
    -- -   GrantOperation.GenerateDataKeyWithoutPlaintext
    --
    -- -   GrantOperation.ReEncryptFrom
    --
    -- -   GrantOperation.ReEncryptTo
    --
    -- -   GrantOperation.CreateGrant
    --
    -- -   GrantOperation.DescribeKey
    --
    -- -   GrantOperation.RetireGrant
    StartExportTask -> Text
kmsKeyId :: Prelude.Text
  }
  deriving (StartExportTask -> StartExportTask -> Bool
(StartExportTask -> StartExportTask -> Bool)
-> (StartExportTask -> StartExportTask -> Bool)
-> Eq StartExportTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartExportTask -> StartExportTask -> Bool
$c/= :: StartExportTask -> StartExportTask -> Bool
== :: StartExportTask -> StartExportTask -> Bool
$c== :: StartExportTask -> StartExportTask -> Bool
Prelude.Eq, ReadPrec [StartExportTask]
ReadPrec StartExportTask
Int -> ReadS StartExportTask
ReadS [StartExportTask]
(Int -> ReadS StartExportTask)
-> ReadS [StartExportTask]
-> ReadPrec StartExportTask
-> ReadPrec [StartExportTask]
-> Read StartExportTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartExportTask]
$creadListPrec :: ReadPrec [StartExportTask]
readPrec :: ReadPrec StartExportTask
$creadPrec :: ReadPrec StartExportTask
readList :: ReadS [StartExportTask]
$creadList :: ReadS [StartExportTask]
readsPrec :: Int -> ReadS StartExportTask
$creadsPrec :: Int -> ReadS StartExportTask
Prelude.Read, Int -> StartExportTask -> ShowS
[StartExportTask] -> ShowS
StartExportTask -> String
(Int -> StartExportTask -> ShowS)
-> (StartExportTask -> String)
-> ([StartExportTask] -> ShowS)
-> Show StartExportTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartExportTask] -> ShowS
$cshowList :: [StartExportTask] -> ShowS
show :: StartExportTask -> String
$cshow :: StartExportTask -> String
showsPrec :: Int -> StartExportTask -> ShowS
$cshowsPrec :: Int -> StartExportTask -> ShowS
Prelude.Show, (forall x. StartExportTask -> Rep StartExportTask x)
-> (forall x. Rep StartExportTask x -> StartExportTask)
-> Generic StartExportTask
forall x. Rep StartExportTask x -> StartExportTask
forall x. StartExportTask -> Rep StartExportTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartExportTask x -> StartExportTask
$cfrom :: forall x. StartExportTask -> Rep StartExportTask x
Prelude.Generic)

-- |
-- Create a value of 'StartExportTask' 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:
--
-- 'exportOnly', 'startExportTask_exportOnly' - The data to be exported from the snapshot. If this parameter is not
-- provided, all the snapshot data is exported. Valid values are the
-- following:
--
-- -   @database@ - Export all the data from a specified database.
--
-- -   @database.table@ /table-name/ - Export a table of the snapshot. This
--     format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora
--     MySQL.
--
-- -   @database.schema@ /schema-name/ - Export a database schema of the
--     snapshot. This format is valid only for RDS for PostgreSQL and
--     Aurora PostgreSQL.
--
-- -   @database.schema.table@ /table-name/ - Export a table of the
--     database schema. This format is valid only for RDS for PostgreSQL
--     and Aurora PostgreSQL.
--
-- 's3Prefix', 'startExportTask_s3Prefix' - The Amazon S3 bucket prefix to use as the file name and path of the
-- exported snapshot.
--
-- 'exportTaskIdentifier', 'startExportTask_exportTaskIdentifier' - A unique identifier for the snapshot export task. This ID isn\'t an
-- identifier for the Amazon S3 bucket where the snapshot is to be exported
-- to.
--
-- 'sourceArn', 'startExportTask_sourceArn' - The Amazon Resource Name (ARN) of the snapshot to export to Amazon S3.
--
-- 's3BucketName', 'startExportTask_s3BucketName' - The name of the Amazon S3 bucket to export the snapshot to.
--
-- 'iamRoleArn', 'startExportTask_iamRoleArn' - The name of the IAM role to use for writing to the Amazon S3 bucket when
-- exporting a snapshot.
--
-- 'kmsKeyId', 'startExportTask_kmsKeyId' - The ID of the Amazon Web Services KMS customer master key (CMK) to use
-- to encrypt the snapshot exported to Amazon S3. The Amazon Web Services
-- KMS key identifier is the key ARN, key ID, alias ARN, or alias name for
-- the Amazon Web Services KMS customer master key (CMK). The caller of
-- this operation must be authorized to execute the following operations.
-- These can be set in the Amazon Web Services KMS key policy:
--
-- -   GrantOperation.Encrypt
--
-- -   GrantOperation.Decrypt
--
-- -   GrantOperation.GenerateDataKey
--
-- -   GrantOperation.GenerateDataKeyWithoutPlaintext
--
-- -   GrantOperation.ReEncryptFrom
--
-- -   GrantOperation.ReEncryptTo
--
-- -   GrantOperation.CreateGrant
--
-- -   GrantOperation.DescribeKey
--
-- -   GrantOperation.RetireGrant
newStartExportTask ::
  -- | 'exportTaskIdentifier'
  Prelude.Text ->
  -- | 'sourceArn'
  Prelude.Text ->
  -- | 's3BucketName'
  Prelude.Text ->
  -- | 'iamRoleArn'
  Prelude.Text ->
  -- | 'kmsKeyId'
  Prelude.Text ->
  StartExportTask
newStartExportTask :: Text -> Text -> Text -> Text -> Text -> StartExportTask
newStartExportTask
  Text
pExportTaskIdentifier_
  Text
pSourceArn_
  Text
pS3BucketName_
  Text
pIamRoleArn_
  Text
pKmsKeyId_ =
    StartExportTask' :: Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> StartExportTask
StartExportTask'
      { $sel:exportOnly:StartExportTask' :: Maybe [Text]
exportOnly = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:s3Prefix:StartExportTask' :: Maybe Text
s3Prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:exportTaskIdentifier:StartExportTask' :: Text
exportTaskIdentifier = Text
pExportTaskIdentifier_,
        $sel:sourceArn:StartExportTask' :: Text
sourceArn = Text
pSourceArn_,
        $sel:s3BucketName:StartExportTask' :: Text
s3BucketName = Text
pS3BucketName_,
        $sel:iamRoleArn:StartExportTask' :: Text
iamRoleArn = Text
pIamRoleArn_,
        $sel:kmsKeyId:StartExportTask' :: Text
kmsKeyId = Text
pKmsKeyId_
      }

-- | The data to be exported from the snapshot. If this parameter is not
-- provided, all the snapshot data is exported. Valid values are the
-- following:
--
-- -   @database@ - Export all the data from a specified database.
--
-- -   @database.table@ /table-name/ - Export a table of the snapshot. This
--     format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora
--     MySQL.
--
-- -   @database.schema@ /schema-name/ - Export a database schema of the
--     snapshot. This format is valid only for RDS for PostgreSQL and
--     Aurora PostgreSQL.
--
-- -   @database.schema.table@ /table-name/ - Export a table of the
--     database schema. This format is valid only for RDS for PostgreSQL
--     and Aurora PostgreSQL.
startExportTask_exportOnly :: Lens.Lens' StartExportTask (Prelude.Maybe [Prelude.Text])
startExportTask_exportOnly :: (Maybe [Text] -> f (Maybe [Text]))
-> StartExportTask -> f StartExportTask
startExportTask_exportOnly = (StartExportTask -> Maybe [Text])
-> (StartExportTask -> Maybe [Text] -> StartExportTask)
-> Lens
     StartExportTask StartExportTask (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Maybe [Text]
exportOnly :: Maybe [Text]
$sel:exportOnly:StartExportTask' :: StartExportTask -> Maybe [Text]
exportOnly} -> Maybe [Text]
exportOnly) (\s :: StartExportTask
s@StartExportTask' {} Maybe [Text]
a -> StartExportTask
s {$sel:exportOnly:StartExportTask' :: Maybe [Text]
exportOnly = Maybe [Text]
a} :: StartExportTask) ((Maybe [Text] -> f (Maybe [Text]))
 -> StartExportTask -> f StartExportTask)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> StartExportTask
-> f StartExportTask
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 Amazon S3 bucket prefix to use as the file name and path of the
-- exported snapshot.
startExportTask_s3Prefix :: Lens.Lens' StartExportTask (Prelude.Maybe Prelude.Text)
startExportTask_s3Prefix :: (Maybe Text -> f (Maybe Text))
-> StartExportTask -> f StartExportTask
startExportTask_s3Prefix = (StartExportTask -> Maybe Text)
-> (StartExportTask -> Maybe Text -> StartExportTask)
-> Lens StartExportTask StartExportTask (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Maybe Text
s3Prefix :: Maybe Text
$sel:s3Prefix:StartExportTask' :: StartExportTask -> Maybe Text
s3Prefix} -> Maybe Text
s3Prefix) (\s :: StartExportTask
s@StartExportTask' {} Maybe Text
a -> StartExportTask
s {$sel:s3Prefix:StartExportTask' :: Maybe Text
s3Prefix = Maybe Text
a} :: StartExportTask)

-- | A unique identifier for the snapshot export task. This ID isn\'t an
-- identifier for the Amazon S3 bucket where the snapshot is to be exported
-- to.
startExportTask_exportTaskIdentifier :: Lens.Lens' StartExportTask Prelude.Text
startExportTask_exportTaskIdentifier :: (Text -> f Text) -> StartExportTask -> f StartExportTask
startExportTask_exportTaskIdentifier = (StartExportTask -> Text)
-> (StartExportTask -> Text -> StartExportTask)
-> Lens StartExportTask StartExportTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Text
exportTaskIdentifier :: Text
$sel:exportTaskIdentifier:StartExportTask' :: StartExportTask -> Text
exportTaskIdentifier} -> Text
exportTaskIdentifier) (\s :: StartExportTask
s@StartExportTask' {} Text
a -> StartExportTask
s {$sel:exportTaskIdentifier:StartExportTask' :: Text
exportTaskIdentifier = Text
a} :: StartExportTask)

-- | The Amazon Resource Name (ARN) of the snapshot to export to Amazon S3.
startExportTask_sourceArn :: Lens.Lens' StartExportTask Prelude.Text
startExportTask_sourceArn :: (Text -> f Text) -> StartExportTask -> f StartExportTask
startExportTask_sourceArn = (StartExportTask -> Text)
-> (StartExportTask -> Text -> StartExportTask)
-> Lens StartExportTask StartExportTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Text
sourceArn :: Text
$sel:sourceArn:StartExportTask' :: StartExportTask -> Text
sourceArn} -> Text
sourceArn) (\s :: StartExportTask
s@StartExportTask' {} Text
a -> StartExportTask
s {$sel:sourceArn:StartExportTask' :: Text
sourceArn = Text
a} :: StartExportTask)

-- | The name of the Amazon S3 bucket to export the snapshot to.
startExportTask_s3BucketName :: Lens.Lens' StartExportTask Prelude.Text
startExportTask_s3BucketName :: (Text -> f Text) -> StartExportTask -> f StartExportTask
startExportTask_s3BucketName = (StartExportTask -> Text)
-> (StartExportTask -> Text -> StartExportTask)
-> Lens StartExportTask StartExportTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Text
s3BucketName :: Text
$sel:s3BucketName:StartExportTask' :: StartExportTask -> Text
s3BucketName} -> Text
s3BucketName) (\s :: StartExportTask
s@StartExportTask' {} Text
a -> StartExportTask
s {$sel:s3BucketName:StartExportTask' :: Text
s3BucketName = Text
a} :: StartExportTask)

-- | The name of the IAM role to use for writing to the Amazon S3 bucket when
-- exporting a snapshot.
startExportTask_iamRoleArn :: Lens.Lens' StartExportTask Prelude.Text
startExportTask_iamRoleArn :: (Text -> f Text) -> StartExportTask -> f StartExportTask
startExportTask_iamRoleArn = (StartExportTask -> Text)
-> (StartExportTask -> Text -> StartExportTask)
-> Lens StartExportTask StartExportTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Text
iamRoleArn :: Text
$sel:iamRoleArn:StartExportTask' :: StartExportTask -> Text
iamRoleArn} -> Text
iamRoleArn) (\s :: StartExportTask
s@StartExportTask' {} Text
a -> StartExportTask
s {$sel:iamRoleArn:StartExportTask' :: Text
iamRoleArn = Text
a} :: StartExportTask)

-- | The ID of the Amazon Web Services KMS customer master key (CMK) to use
-- to encrypt the snapshot exported to Amazon S3. The Amazon Web Services
-- KMS key identifier is the key ARN, key ID, alias ARN, or alias name for
-- the Amazon Web Services KMS customer master key (CMK). The caller of
-- this operation must be authorized to execute the following operations.
-- These can be set in the Amazon Web Services KMS key policy:
--
-- -   GrantOperation.Encrypt
--
-- -   GrantOperation.Decrypt
--
-- -   GrantOperation.GenerateDataKey
--
-- -   GrantOperation.GenerateDataKeyWithoutPlaintext
--
-- -   GrantOperation.ReEncryptFrom
--
-- -   GrantOperation.ReEncryptTo
--
-- -   GrantOperation.CreateGrant
--
-- -   GrantOperation.DescribeKey
--
-- -   GrantOperation.RetireGrant
startExportTask_kmsKeyId :: Lens.Lens' StartExportTask Prelude.Text
startExportTask_kmsKeyId :: (Text -> f Text) -> StartExportTask -> f StartExportTask
startExportTask_kmsKeyId = (StartExportTask -> Text)
-> (StartExportTask -> Text -> StartExportTask)
-> Lens StartExportTask StartExportTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Text
kmsKeyId :: Text
$sel:kmsKeyId:StartExportTask' :: StartExportTask -> Text
kmsKeyId} -> Text
kmsKeyId) (\s :: StartExportTask
s@StartExportTask' {} Text
a -> StartExportTask
s {$sel:kmsKeyId:StartExportTask' :: Text
kmsKeyId = Text
a} :: StartExportTask)

instance Core.AWSRequest StartExportTask where
  type AWSResponse StartExportTask = ExportTask
  request :: StartExportTask -> Request StartExportTask
request = Service -> StartExportTask -> Request StartExportTask
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy StartExportTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartExportTask)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse StartExportTask))
-> Logger
-> Service
-> Proxy StartExportTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartExportTask)))
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
"StartExportTaskResult"
      (\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 StartExportTask

instance Prelude.NFData StartExportTask

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

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

instance Core.ToQuery StartExportTask where
  toQuery :: StartExportTask -> QueryString
toQuery StartExportTask' {Maybe [Text]
Maybe Text
Text
kmsKeyId :: Text
iamRoleArn :: Text
s3BucketName :: Text
sourceArn :: Text
exportTaskIdentifier :: Text
s3Prefix :: Maybe Text
exportOnly :: Maybe [Text]
$sel:kmsKeyId:StartExportTask' :: StartExportTask -> Text
$sel:iamRoleArn:StartExportTask' :: StartExportTask -> Text
$sel:s3BucketName:StartExportTask' :: StartExportTask -> Text
$sel:sourceArn:StartExportTask' :: StartExportTask -> Text
$sel:exportTaskIdentifier:StartExportTask' :: StartExportTask -> Text
$sel:s3Prefix:StartExportTask' :: StartExportTask -> Maybe Text
$sel:exportOnly:StartExportTask' :: StartExportTask -> 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
"StartExportTask" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"ExportOnly"
          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]
exportOnly),
        ByteString
"S3Prefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
s3Prefix,
        ByteString
"ExportTaskIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
exportTaskIdentifier,
        ByteString
"SourceArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceArn,
        ByteString
"S3BucketName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
s3BucketName,
        ByteString
"IamRoleArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
iamRoleArn,
        ByteString
"KmsKeyId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
kmsKeyId
      ]