{-# 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.CopyDBClusterSnapshot
-- 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)
--
-- Copies a snapshot of a DB cluster.
--
-- To copy a DB cluster snapshot from a shared manual DB cluster snapshot,
-- @SourceDBClusterSnapshotIdentifier@ must be the Amazon Resource Name
-- (ARN) of the shared DB cluster snapshot.
--
-- You can copy an encrypted DB cluster snapshot from another Amazon Web
-- Services Region. In that case, the Amazon Web Services Region where you
-- call the @CopyDBClusterSnapshot@ action is the destination Amazon Web
-- Services Region for the encrypted DB cluster snapshot to be copied to.
-- To copy an encrypted DB cluster snapshot from another Amazon Web
-- Services Region, you must provide the following values:
--
-- -   @KmsKeyId@ - The Amazon Web Services Key Management System (Amazon
--     Web Services KMS) key identifier for the key to use to encrypt the
--     copy of the DB cluster snapshot in the destination Amazon Web
--     Services Region.
--
-- -   @PreSignedUrl@ - A URL that contains a Signature Version 4 signed
--     request for the @CopyDBClusterSnapshot@ action to be called in the
--     source Amazon Web Services Region where the DB cluster snapshot is
--     copied from. The pre-signed URL must be a valid request for the
--     @CopyDBClusterSnapshot@ API action that can be executed in the
--     source Amazon Web Services Region that contains the encrypted DB
--     cluster snapshot to be copied.
--
--     The pre-signed URL request must contain the following parameter
--     values:
--
--     -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the
--         customer master key (CMK) to use to encrypt the copy of the DB
--         cluster snapshot in the destination Amazon Web Services Region.
--         This is the same identifier for both the @CopyDBClusterSnapshot@
--         action that is called in the destination Amazon Web Services
--         Region, and the action contained in the pre-signed URL.
--
--     -   @DestinationRegion@ - The name of the Amazon Web Services Region
--         that the DB cluster snapshot is to be created in.
--
--     -   @SourceDBClusterSnapshotIdentifier@ - The DB cluster snapshot
--         identifier for the encrypted DB cluster snapshot to be copied.
--         This identifier must be in the Amazon Resource Name (ARN) format
--         for the source Amazon Web Services Region. For example, if you
--         are copying an encrypted DB cluster snapshot from the us-west-2
--         Amazon Web Services Region, then your
--         @SourceDBClusterSnapshotIdentifier@ looks like the following
--         example:
--         @arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115@.
--
--     To learn how to generate a Signature Version 4 signed request, see
--     <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
--     and
--     <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
--
--     If you are using an Amazon Web Services SDK tool or the CLI, you can
--     specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
--     specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
--     autogenerates a pre-signed URL that is a valid request for the
--     operation that can be executed in the source Amazon Web Services
--     Region.
--
-- -   @TargetDBClusterSnapshotIdentifier@ - The identifier for the new
--     copy of the DB cluster snapshot in the destination Amazon Web
--     Services Region.
--
-- -   @SourceDBClusterSnapshotIdentifier@ - The DB cluster snapshot
--     identifier for the encrypted DB cluster snapshot to be copied. This
--     identifier must be in the ARN format for the source Amazon Web
--     Services Region and is the same value as the
--     @SourceDBClusterSnapshotIdentifier@ in the pre-signed URL.
--
-- To cancel the copy operation once it is in progress, delete the target
-- DB cluster snapshot identified by @TargetDBClusterSnapshotIdentifier@
-- while that DB cluster snapshot is in \"copying\" status.
--
-- For more information on copying encrypted DB cluster snapshots from one
-- Amazon Web Services Region to another, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html Copying a Snapshot>
-- in the /Amazon Aurora User Guide./
--
-- For more information on Amazon Aurora, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html What Is Amazon Aurora?>
-- in the /Amazon Aurora User Guide./
--
-- This action only applies to Aurora DB clusters.
module Amazonka.RDS.CopyDBClusterSnapshot
  ( -- * Creating a Request
    CopyDBClusterSnapshot (..),
    newCopyDBClusterSnapshot,

    -- * Request Lenses
    copyDBClusterSnapshot_preSignedUrl,
    copyDBClusterSnapshot_copyTags,
    copyDBClusterSnapshot_destinationRegion,
    copyDBClusterSnapshot_kmsKeyId,
    copyDBClusterSnapshot_tags,
    copyDBClusterSnapshot_sourceDBClusterSnapshotIdentifier,
    copyDBClusterSnapshot_targetDBClusterSnapshotIdentifier,

    -- * Destructuring the Response
    CopyDBClusterSnapshotResponse (..),
    newCopyDBClusterSnapshotResponse,

    -- * Response Lenses
    copyDBClusterSnapshotResponse_dbClusterSnapshot,
    copyDBClusterSnapshotResponse_httpStatus,
  )
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:/ 'newCopyDBClusterSnapshot' smart constructor.
data CopyDBClusterSnapshot = CopyDBClusterSnapshot'
  { -- | The URL that contains a Signature Version 4 signed request for the
    -- @CopyDBClusterSnapshot@ API action in the Amazon Web Services Region
    -- that contains the source DB cluster snapshot to copy. The @PreSignedUrl@
    -- parameter must be used when copying an encrypted DB cluster snapshot
    -- from another Amazon Web Services Region. Don\'t specify @PreSignedUrl@
    -- when you are copying an encrypted DB cluster snapshot in the same Amazon
    -- Web Services Region.
    --
    -- The pre-signed URL must be a valid request for the
    -- @CopyDBClusterSnapshot@ API action that can be executed in the source
    -- Amazon Web Services Region that contains the encrypted DB cluster
    -- snapshot to be copied. The pre-signed URL request must contain the
    -- following parameter values:
    --
    -- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the
    --     customer master key (CMK) to use to encrypt the copy of the DB
    --     cluster snapshot in the destination Amazon Web Services Region. This
    --     is the same identifier for both the @CopyDBClusterSnapshot@ action
    --     that is called in the destination Amazon Web Services Region, and
    --     the action contained in the pre-signed URL.
    --
    -- -   @DestinationRegion@ - The name of the Amazon Web Services Region
    --     that the DB cluster snapshot is to be created in.
    --
    -- -   @SourceDBClusterSnapshotIdentifier@ - The DB cluster snapshot
    --     identifier for the encrypted DB cluster snapshot to be copied. This
    --     identifier must be in the Amazon Resource Name (ARN) format for the
    --     source Amazon Web Services Region. For example, if you are copying
    --     an encrypted DB cluster snapshot from the us-west-2 Amazon Web
    --     Services Region, then your @SourceDBClusterSnapshotIdentifier@ looks
    --     like the following example:
    --     @arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115@.
    --
    -- To learn how to generate a Signature Version 4 signed request, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
    -- and
    -- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
    --
    -- If you are using an Amazon Web Services SDK tool or the CLI, you can
    -- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
    -- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
    -- autogenerates a pre-signed URL that is a valid request for the operation
    -- that can be executed in the source Amazon Web Services Region.
    CopyDBClusterSnapshot -> Maybe Text
preSignedUrl :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether to copy all tags from the source DB
    -- cluster snapshot to the target DB cluster snapshot. By default, tags are
    -- not copied.
    CopyDBClusterSnapshot -> Maybe Bool
copyTags :: Prelude.Maybe Prelude.Bool,
    -- | Pseudo-parameter used when populating the @PreSignedUrl@ of a
    -- cross-region @CopyDBClusterSnapshot@ request. To replicate from region
    -- @SRC@ to region @DST@, send a request to region @DST@. In that request,
    -- pass a @PreSignedUrl@ for region @SRC@ with @DestinationRegion@ set to
    -- region @DST@.
    CopyDBClusterSnapshot -> Maybe Text
destinationRegion :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services KMS key identifier for an encrypted DB cluster
    -- snapshot. 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).
    --
    -- If you copy an encrypted DB cluster snapshot from your Amazon Web
    -- Services account, you can specify a value for @KmsKeyId@ to encrypt the
    -- copy with a new Amazon Web Services KMS CMK. If you don\'t specify a
    -- value for @KmsKeyId@, then the copy of the DB cluster snapshot is
    -- encrypted with the same Amazon Web Services KMS key as the source DB
    -- cluster snapshot.
    --
    -- If you copy an encrypted DB cluster snapshot that is shared from another
    -- Amazon Web Services account, then you must specify a value for
    -- @KmsKeyId@.
    --
    -- To copy an encrypted DB cluster snapshot to another Amazon Web Services
    -- Region, you must set @KmsKeyId@ to the Amazon Web Services KMS key
    -- identifier you want to use to encrypt the copy of the DB cluster
    -- snapshot in the destination Amazon Web Services Region. Amazon Web
    -- Services KMS CMKs are specific to the Amazon Web Services Region that
    -- they are created in, and you can\'t use CMKs from one Amazon Web
    -- Services Region in another Amazon Web Services Region.
    --
    -- If you copy an unencrypted DB cluster snapshot and specify a value for
    -- the @KmsKeyId@ parameter, an error is returned.
    CopyDBClusterSnapshot -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    CopyDBClusterSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The identifier of the DB cluster snapshot to copy. This parameter isn\'t
    -- case-sensitive.
    --
    -- You can\'t copy an encrypted, shared DB cluster snapshot from one Amazon
    -- Web Services Region to another.
    --
    -- Constraints:
    --
    -- -   Must specify a valid system snapshot in the \"available\" state.
    --
    -- -   If the source snapshot is in the same Amazon Web Services Region as
    --     the copy, specify a valid DB snapshot identifier.
    --
    -- -   If the source snapshot is in a different Amazon Web Services Region
    --     than the copy, specify a valid DB cluster snapshot ARN. For more
    --     information, go to
    --     <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html#USER_CopySnapshot.AcrossRegions Copying Snapshots Across Amazon Web Services Regions>
    --     in the /Amazon Aurora User Guide./
    --
    -- Example: @my-cluster-snapshot1@
    CopyDBClusterSnapshot -> Text
sourceDBClusterSnapshotIdentifier :: Prelude.Text,
    -- | The identifier of the new DB cluster snapshot to create from the source
    -- DB cluster snapshot. This parameter isn\'t case-sensitive.
    --
    -- Constraints:
    --
    -- -   Must contain from 1 to 63 letters, numbers, or hyphens.
    --
    -- -   First character must be a letter.
    --
    -- -   Can\'t end with a hyphen or contain two consecutive hyphens.
    --
    -- Example: @my-cluster-snapshot2@
    CopyDBClusterSnapshot -> Text
targetDBClusterSnapshotIdentifier :: Prelude.Text
  }
  deriving (CopyDBClusterSnapshot -> CopyDBClusterSnapshot -> Bool
(CopyDBClusterSnapshot -> CopyDBClusterSnapshot -> Bool)
-> (CopyDBClusterSnapshot -> CopyDBClusterSnapshot -> Bool)
-> Eq CopyDBClusterSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyDBClusterSnapshot -> CopyDBClusterSnapshot -> Bool
$c/= :: CopyDBClusterSnapshot -> CopyDBClusterSnapshot -> Bool
== :: CopyDBClusterSnapshot -> CopyDBClusterSnapshot -> Bool
$c== :: CopyDBClusterSnapshot -> CopyDBClusterSnapshot -> Bool
Prelude.Eq, ReadPrec [CopyDBClusterSnapshot]
ReadPrec CopyDBClusterSnapshot
Int -> ReadS CopyDBClusterSnapshot
ReadS [CopyDBClusterSnapshot]
(Int -> ReadS CopyDBClusterSnapshot)
-> ReadS [CopyDBClusterSnapshot]
-> ReadPrec CopyDBClusterSnapshot
-> ReadPrec [CopyDBClusterSnapshot]
-> Read CopyDBClusterSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyDBClusterSnapshot]
$creadListPrec :: ReadPrec [CopyDBClusterSnapshot]
readPrec :: ReadPrec CopyDBClusterSnapshot
$creadPrec :: ReadPrec CopyDBClusterSnapshot
readList :: ReadS [CopyDBClusterSnapshot]
$creadList :: ReadS [CopyDBClusterSnapshot]
readsPrec :: Int -> ReadS CopyDBClusterSnapshot
$creadsPrec :: Int -> ReadS CopyDBClusterSnapshot
Prelude.Read, Int -> CopyDBClusterSnapshot -> ShowS
[CopyDBClusterSnapshot] -> ShowS
CopyDBClusterSnapshot -> String
(Int -> CopyDBClusterSnapshot -> ShowS)
-> (CopyDBClusterSnapshot -> String)
-> ([CopyDBClusterSnapshot] -> ShowS)
-> Show CopyDBClusterSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyDBClusterSnapshot] -> ShowS
$cshowList :: [CopyDBClusterSnapshot] -> ShowS
show :: CopyDBClusterSnapshot -> String
$cshow :: CopyDBClusterSnapshot -> String
showsPrec :: Int -> CopyDBClusterSnapshot -> ShowS
$cshowsPrec :: Int -> CopyDBClusterSnapshot -> ShowS
Prelude.Show, (forall x. CopyDBClusterSnapshot -> Rep CopyDBClusterSnapshot x)
-> (forall x. Rep CopyDBClusterSnapshot x -> CopyDBClusterSnapshot)
-> Generic CopyDBClusterSnapshot
forall x. Rep CopyDBClusterSnapshot x -> CopyDBClusterSnapshot
forall x. CopyDBClusterSnapshot -> Rep CopyDBClusterSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyDBClusterSnapshot x -> CopyDBClusterSnapshot
$cfrom :: forall x. CopyDBClusterSnapshot -> Rep CopyDBClusterSnapshot x
Prelude.Generic)

-- |
-- Create a value of 'CopyDBClusterSnapshot' 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:
--
-- 'preSignedUrl', 'copyDBClusterSnapshot_preSignedUrl' - The URL that contains a Signature Version 4 signed request for the
-- @CopyDBClusterSnapshot@ API action in the Amazon Web Services Region
-- that contains the source DB cluster snapshot to copy. The @PreSignedUrl@
-- parameter must be used when copying an encrypted DB cluster snapshot
-- from another Amazon Web Services Region. Don\'t specify @PreSignedUrl@
-- when you are copying an encrypted DB cluster snapshot in the same Amazon
-- Web Services Region.
--
-- The pre-signed URL must be a valid request for the
-- @CopyDBClusterSnapshot@ API action that can be executed in the source
-- Amazon Web Services Region that contains the encrypted DB cluster
-- snapshot to be copied. The pre-signed URL request must contain the
-- following parameter values:
--
-- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the
--     customer master key (CMK) to use to encrypt the copy of the DB
--     cluster snapshot in the destination Amazon Web Services Region. This
--     is the same identifier for both the @CopyDBClusterSnapshot@ action
--     that is called in the destination Amazon Web Services Region, and
--     the action contained in the pre-signed URL.
--
-- -   @DestinationRegion@ - The name of the Amazon Web Services Region
--     that the DB cluster snapshot is to be created in.
--
-- -   @SourceDBClusterSnapshotIdentifier@ - The DB cluster snapshot
--     identifier for the encrypted DB cluster snapshot to be copied. This
--     identifier must be in the Amazon Resource Name (ARN) format for the
--     source Amazon Web Services Region. For example, if you are copying
--     an encrypted DB cluster snapshot from the us-west-2 Amazon Web
--     Services Region, then your @SourceDBClusterSnapshotIdentifier@ looks
--     like the following example:
--     @arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115@.
--
-- To learn how to generate a Signature Version 4 signed request, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
--
-- If you are using an Amazon Web Services SDK tool or the CLI, you can
-- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
-- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
-- autogenerates a pre-signed URL that is a valid request for the operation
-- that can be executed in the source Amazon Web Services Region.
--
-- 'copyTags', 'copyDBClusterSnapshot_copyTags' - A value that indicates whether to copy all tags from the source DB
-- cluster snapshot to the target DB cluster snapshot. By default, tags are
-- not copied.
--
-- 'destinationRegion', 'copyDBClusterSnapshot_destinationRegion' - Pseudo-parameter used when populating the @PreSignedUrl@ of a
-- cross-region @CopyDBClusterSnapshot@ request. To replicate from region
-- @SRC@ to region @DST@, send a request to region @DST@. In that request,
-- pass a @PreSignedUrl@ for region @SRC@ with @DestinationRegion@ set to
-- region @DST@.
--
-- 'kmsKeyId', 'copyDBClusterSnapshot_kmsKeyId' - The Amazon Web Services KMS key identifier for an encrypted DB cluster
-- snapshot. 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).
--
-- If you copy an encrypted DB cluster snapshot from your Amazon Web
-- Services account, you can specify a value for @KmsKeyId@ to encrypt the
-- copy with a new Amazon Web Services KMS CMK. If you don\'t specify a
-- value for @KmsKeyId@, then the copy of the DB cluster snapshot is
-- encrypted with the same Amazon Web Services KMS key as the source DB
-- cluster snapshot.
--
-- If you copy an encrypted DB cluster snapshot that is shared from another
-- Amazon Web Services account, then you must specify a value for
-- @KmsKeyId@.
--
-- To copy an encrypted DB cluster snapshot to another Amazon Web Services
-- Region, you must set @KmsKeyId@ to the Amazon Web Services KMS key
-- identifier you want to use to encrypt the copy of the DB cluster
-- snapshot in the destination Amazon Web Services Region. Amazon Web
-- Services KMS CMKs are specific to the Amazon Web Services Region that
-- they are created in, and you can\'t use CMKs from one Amazon Web
-- Services Region in another Amazon Web Services Region.
--
-- If you copy an unencrypted DB cluster snapshot and specify a value for
-- the @KmsKeyId@ parameter, an error is returned.
--
-- 'tags', 'copyDBClusterSnapshot_tags' - Undocumented member.
--
-- 'sourceDBClusterSnapshotIdentifier', 'copyDBClusterSnapshot_sourceDBClusterSnapshotIdentifier' - The identifier of the DB cluster snapshot to copy. This parameter isn\'t
-- case-sensitive.
--
-- You can\'t copy an encrypted, shared DB cluster snapshot from one Amazon
-- Web Services Region to another.
--
-- Constraints:
--
-- -   Must specify a valid system snapshot in the \"available\" state.
--
-- -   If the source snapshot is in the same Amazon Web Services Region as
--     the copy, specify a valid DB snapshot identifier.
--
-- -   If the source snapshot is in a different Amazon Web Services Region
--     than the copy, specify a valid DB cluster snapshot ARN. For more
--     information, go to
--     <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html#USER_CopySnapshot.AcrossRegions Copying Snapshots Across Amazon Web Services Regions>
--     in the /Amazon Aurora User Guide./
--
-- Example: @my-cluster-snapshot1@
--
-- 'targetDBClusterSnapshotIdentifier', 'copyDBClusterSnapshot_targetDBClusterSnapshotIdentifier' - The identifier of the new DB cluster snapshot to create from the source
-- DB cluster snapshot. This parameter isn\'t case-sensitive.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 letters, numbers, or hyphens.
--
-- -   First character must be a letter.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
--
-- Example: @my-cluster-snapshot2@
newCopyDBClusterSnapshot ::
  -- | 'sourceDBClusterSnapshotIdentifier'
  Prelude.Text ->
  -- | 'targetDBClusterSnapshotIdentifier'
  Prelude.Text ->
  CopyDBClusterSnapshot
newCopyDBClusterSnapshot :: Text -> Text -> CopyDBClusterSnapshot
newCopyDBClusterSnapshot
  Text
pSourceDBClusterSnapshotIdentifier_
  Text
pTargetDBClusterSnapshotIdentifier_ =
    CopyDBClusterSnapshot' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> CopyDBClusterSnapshot
CopyDBClusterSnapshot'
      { $sel:preSignedUrl:CopyDBClusterSnapshot' :: Maybe Text
preSignedUrl =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:copyTags:CopyDBClusterSnapshot' :: Maybe Bool
copyTags = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:destinationRegion:CopyDBClusterSnapshot' :: Maybe Text
destinationRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CopyDBClusterSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CopyDBClusterSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: Text
sourceDBClusterSnapshotIdentifier =
          Text
pSourceDBClusterSnapshotIdentifier_,
        $sel:targetDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: Text
targetDBClusterSnapshotIdentifier =
          Text
pTargetDBClusterSnapshotIdentifier_
      }

-- | The URL that contains a Signature Version 4 signed request for the
-- @CopyDBClusterSnapshot@ API action in the Amazon Web Services Region
-- that contains the source DB cluster snapshot to copy. The @PreSignedUrl@
-- parameter must be used when copying an encrypted DB cluster snapshot
-- from another Amazon Web Services Region. Don\'t specify @PreSignedUrl@
-- when you are copying an encrypted DB cluster snapshot in the same Amazon
-- Web Services Region.
--
-- The pre-signed URL must be a valid request for the
-- @CopyDBClusterSnapshot@ API action that can be executed in the source
-- Amazon Web Services Region that contains the encrypted DB cluster
-- snapshot to be copied. The pre-signed URL request must contain the
-- following parameter values:
--
-- -   @KmsKeyId@ - The Amazon Web Services KMS key identifier for the
--     customer master key (CMK) to use to encrypt the copy of the DB
--     cluster snapshot in the destination Amazon Web Services Region. This
--     is the same identifier for both the @CopyDBClusterSnapshot@ action
--     that is called in the destination Amazon Web Services Region, and
--     the action contained in the pre-signed URL.
--
-- -   @DestinationRegion@ - The name of the Amazon Web Services Region
--     that the DB cluster snapshot is to be created in.
--
-- -   @SourceDBClusterSnapshotIdentifier@ - The DB cluster snapshot
--     identifier for the encrypted DB cluster snapshot to be copied. This
--     identifier must be in the Amazon Resource Name (ARN) format for the
--     source Amazon Web Services Region. For example, if you are copying
--     an encrypted DB cluster snapshot from the us-west-2 Amazon Web
--     Services Region, then your @SourceDBClusterSnapshotIdentifier@ looks
--     like the following example:
--     @arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115@.
--
-- To learn how to generate a Signature Version 4 signed request, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4 Signing Process>.
--
-- If you are using an Amazon Web Services SDK tool or the CLI, you can
-- specify @SourceRegion@ (or @--source-region@ for the CLI) instead of
-- specifying @PreSignedUrl@ manually. Specifying @SourceRegion@
-- autogenerates a pre-signed URL that is a valid request for the operation
-- that can be executed in the source Amazon Web Services Region.
copyDBClusterSnapshot_preSignedUrl :: Lens.Lens' CopyDBClusterSnapshot (Prelude.Maybe Prelude.Text)
copyDBClusterSnapshot_preSignedUrl :: (Maybe Text -> f (Maybe Text))
-> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot
copyDBClusterSnapshot_preSignedUrl = (CopyDBClusterSnapshot -> Maybe Text)
-> (CopyDBClusterSnapshot -> Maybe Text -> CopyDBClusterSnapshot)
-> Lens
     CopyDBClusterSnapshot
     CopyDBClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshot' {Maybe Text
preSignedUrl :: Maybe Text
$sel:preSignedUrl:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe Text
preSignedUrl} -> Maybe Text
preSignedUrl) (\s :: CopyDBClusterSnapshot
s@CopyDBClusterSnapshot' {} Maybe Text
a -> CopyDBClusterSnapshot
s {$sel:preSignedUrl:CopyDBClusterSnapshot' :: Maybe Text
preSignedUrl = Maybe Text
a} :: CopyDBClusterSnapshot)

-- | A value that indicates whether to copy all tags from the source DB
-- cluster snapshot to the target DB cluster snapshot. By default, tags are
-- not copied.
copyDBClusterSnapshot_copyTags :: Lens.Lens' CopyDBClusterSnapshot (Prelude.Maybe Prelude.Bool)
copyDBClusterSnapshot_copyTags :: (Maybe Bool -> f (Maybe Bool))
-> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot
copyDBClusterSnapshot_copyTags = (CopyDBClusterSnapshot -> Maybe Bool)
-> (CopyDBClusterSnapshot -> Maybe Bool -> CopyDBClusterSnapshot)
-> Lens
     CopyDBClusterSnapshot
     CopyDBClusterSnapshot
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshot' {Maybe Bool
copyTags :: Maybe Bool
$sel:copyTags:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe Bool
copyTags} -> Maybe Bool
copyTags) (\s :: CopyDBClusterSnapshot
s@CopyDBClusterSnapshot' {} Maybe Bool
a -> CopyDBClusterSnapshot
s {$sel:copyTags:CopyDBClusterSnapshot' :: Maybe Bool
copyTags = Maybe Bool
a} :: CopyDBClusterSnapshot)

-- | Pseudo-parameter used when populating the @PreSignedUrl@ of a
-- cross-region @CopyDBClusterSnapshot@ request. To replicate from region
-- @SRC@ to region @DST@, send a request to region @DST@. In that request,
-- pass a @PreSignedUrl@ for region @SRC@ with @DestinationRegion@ set to
-- region @DST@.
copyDBClusterSnapshot_destinationRegion :: Lens.Lens' CopyDBClusterSnapshot (Prelude.Maybe Prelude.Text)
copyDBClusterSnapshot_destinationRegion :: (Maybe Text -> f (Maybe Text))
-> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot
copyDBClusterSnapshot_destinationRegion = (CopyDBClusterSnapshot -> Maybe Text)
-> (CopyDBClusterSnapshot -> Maybe Text -> CopyDBClusterSnapshot)
-> Lens
     CopyDBClusterSnapshot
     CopyDBClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshot' {Maybe Text
destinationRegion :: Maybe Text
$sel:destinationRegion:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe Text
destinationRegion} -> Maybe Text
destinationRegion) (\s :: CopyDBClusterSnapshot
s@CopyDBClusterSnapshot' {} Maybe Text
a -> CopyDBClusterSnapshot
s {$sel:destinationRegion:CopyDBClusterSnapshot' :: Maybe Text
destinationRegion = Maybe Text
a} :: CopyDBClusterSnapshot)

-- | The Amazon Web Services KMS key identifier for an encrypted DB cluster
-- snapshot. 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).
--
-- If you copy an encrypted DB cluster snapshot from your Amazon Web
-- Services account, you can specify a value for @KmsKeyId@ to encrypt the
-- copy with a new Amazon Web Services KMS CMK. If you don\'t specify a
-- value for @KmsKeyId@, then the copy of the DB cluster snapshot is
-- encrypted with the same Amazon Web Services KMS key as the source DB
-- cluster snapshot.
--
-- If you copy an encrypted DB cluster snapshot that is shared from another
-- Amazon Web Services account, then you must specify a value for
-- @KmsKeyId@.
--
-- To copy an encrypted DB cluster snapshot to another Amazon Web Services
-- Region, you must set @KmsKeyId@ to the Amazon Web Services KMS key
-- identifier you want to use to encrypt the copy of the DB cluster
-- snapshot in the destination Amazon Web Services Region. Amazon Web
-- Services KMS CMKs are specific to the Amazon Web Services Region that
-- they are created in, and you can\'t use CMKs from one Amazon Web
-- Services Region in another Amazon Web Services Region.
--
-- If you copy an unencrypted DB cluster snapshot and specify a value for
-- the @KmsKeyId@ parameter, an error is returned.
copyDBClusterSnapshot_kmsKeyId :: Lens.Lens' CopyDBClusterSnapshot (Prelude.Maybe Prelude.Text)
copyDBClusterSnapshot_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot
copyDBClusterSnapshot_kmsKeyId = (CopyDBClusterSnapshot -> Maybe Text)
-> (CopyDBClusterSnapshot -> Maybe Text -> CopyDBClusterSnapshot)
-> Lens
     CopyDBClusterSnapshot
     CopyDBClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshot' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CopyDBClusterSnapshot
s@CopyDBClusterSnapshot' {} Maybe Text
a -> CopyDBClusterSnapshot
s {$sel:kmsKeyId:CopyDBClusterSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CopyDBClusterSnapshot)

-- | Undocumented member.
copyDBClusterSnapshot_tags :: Lens.Lens' CopyDBClusterSnapshot (Prelude.Maybe [Tag])
copyDBClusterSnapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot
copyDBClusterSnapshot_tags = (CopyDBClusterSnapshot -> Maybe [Tag])
-> (CopyDBClusterSnapshot -> Maybe [Tag] -> CopyDBClusterSnapshot)
-> Lens
     CopyDBClusterSnapshot
     CopyDBClusterSnapshot
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CopyDBClusterSnapshot
s@CopyDBClusterSnapshot' {} Maybe [Tag]
a -> CopyDBClusterSnapshot
s {$sel:tags:CopyDBClusterSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CopyDBClusterSnapshot) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CopyDBClusterSnapshot
-> f CopyDBClusterSnapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The identifier of the DB cluster snapshot to copy. This parameter isn\'t
-- case-sensitive.
--
-- You can\'t copy an encrypted, shared DB cluster snapshot from one Amazon
-- Web Services Region to another.
--
-- Constraints:
--
-- -   Must specify a valid system snapshot in the \"available\" state.
--
-- -   If the source snapshot is in the same Amazon Web Services Region as
--     the copy, specify a valid DB snapshot identifier.
--
-- -   If the source snapshot is in a different Amazon Web Services Region
--     than the copy, specify a valid DB cluster snapshot ARN. For more
--     information, go to
--     <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html#USER_CopySnapshot.AcrossRegions Copying Snapshots Across Amazon Web Services Regions>
--     in the /Amazon Aurora User Guide./
--
-- Example: @my-cluster-snapshot1@
copyDBClusterSnapshot_sourceDBClusterSnapshotIdentifier :: Lens.Lens' CopyDBClusterSnapshot Prelude.Text
copyDBClusterSnapshot_sourceDBClusterSnapshotIdentifier :: (Text -> f Text)
-> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot
copyDBClusterSnapshot_sourceDBClusterSnapshotIdentifier = (CopyDBClusterSnapshot -> Text)
-> (CopyDBClusterSnapshot -> Text -> CopyDBClusterSnapshot)
-> Lens CopyDBClusterSnapshot CopyDBClusterSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshot' {Text
sourceDBClusterSnapshotIdentifier :: Text
$sel:sourceDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Text
sourceDBClusterSnapshotIdentifier} -> Text
sourceDBClusterSnapshotIdentifier) (\s :: CopyDBClusterSnapshot
s@CopyDBClusterSnapshot' {} Text
a -> CopyDBClusterSnapshot
s {$sel:sourceDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: Text
sourceDBClusterSnapshotIdentifier = Text
a} :: CopyDBClusterSnapshot)

-- | The identifier of the new DB cluster snapshot to create from the source
-- DB cluster snapshot. This parameter isn\'t case-sensitive.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 letters, numbers, or hyphens.
--
-- -   First character must be a letter.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
--
-- Example: @my-cluster-snapshot2@
copyDBClusterSnapshot_targetDBClusterSnapshotIdentifier :: Lens.Lens' CopyDBClusterSnapshot Prelude.Text
copyDBClusterSnapshot_targetDBClusterSnapshotIdentifier :: (Text -> f Text)
-> CopyDBClusterSnapshot -> f CopyDBClusterSnapshot
copyDBClusterSnapshot_targetDBClusterSnapshotIdentifier = (CopyDBClusterSnapshot -> Text)
-> (CopyDBClusterSnapshot -> Text -> CopyDBClusterSnapshot)
-> Lens CopyDBClusterSnapshot CopyDBClusterSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshot' {Text
targetDBClusterSnapshotIdentifier :: Text
$sel:targetDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Text
targetDBClusterSnapshotIdentifier} -> Text
targetDBClusterSnapshotIdentifier) (\s :: CopyDBClusterSnapshot
s@CopyDBClusterSnapshot' {} Text
a -> CopyDBClusterSnapshot
s {$sel:targetDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: Text
targetDBClusterSnapshotIdentifier = Text
a} :: CopyDBClusterSnapshot)

instance Core.AWSRequest CopyDBClusterSnapshot where
  type
    AWSResponse CopyDBClusterSnapshot =
      CopyDBClusterSnapshotResponse
  request :: CopyDBClusterSnapshot -> Request CopyDBClusterSnapshot
request = Service -> CopyDBClusterSnapshot -> Request CopyDBClusterSnapshot
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CopyDBClusterSnapshot
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CopyDBClusterSnapshot)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CopyDBClusterSnapshot))
-> Logger
-> Service
-> Proxy CopyDBClusterSnapshot
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CopyDBClusterSnapshot)))
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
"CopyDBClusterSnapshotResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe DBClusterSnapshot -> Int -> CopyDBClusterSnapshotResponse
CopyDBClusterSnapshotResponse'
            (Maybe DBClusterSnapshot -> Int -> CopyDBClusterSnapshotResponse)
-> Either String (Maybe DBClusterSnapshot)
-> Either String (Int -> CopyDBClusterSnapshotResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBClusterSnapshot)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterSnapshot")
            Either String (Int -> CopyDBClusterSnapshotResponse)
-> Either String Int -> Either String CopyDBClusterSnapshotResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CopyDBClusterSnapshot

instance Prelude.NFData CopyDBClusterSnapshot

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

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

instance Core.ToQuery CopyDBClusterSnapshot where
  toQuery :: CopyDBClusterSnapshot -> QueryString
toQuery CopyDBClusterSnapshot' {Maybe Bool
Maybe [Tag]
Maybe Text
Text
targetDBClusterSnapshotIdentifier :: Text
sourceDBClusterSnapshotIdentifier :: Text
tags :: Maybe [Tag]
kmsKeyId :: Maybe Text
destinationRegion :: Maybe Text
copyTags :: Maybe Bool
preSignedUrl :: Maybe Text
$sel:targetDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Text
$sel:sourceDBClusterSnapshotIdentifier:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Text
$sel:tags:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe [Tag]
$sel:kmsKeyId:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe Text
$sel:destinationRegion:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe Text
$sel:copyTags:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> Maybe Bool
$sel:preSignedUrl:CopyDBClusterSnapshot' :: CopyDBClusterSnapshot -> 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
"CopyDBClusterSnapshot" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"PreSignedUrl" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preSignedUrl,
        ByteString
"CopyTags" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
copyTags,
        ByteString
"DestinationRegion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
destinationRegion,
        ByteString
"KmsKeyId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
kmsKeyId,
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"SourceDBClusterSnapshotIdentifier"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceDBClusterSnapshotIdentifier,
        ByteString
"TargetDBClusterSnapshotIdentifier"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
targetDBClusterSnapshotIdentifier
      ]

-- | /See:/ 'newCopyDBClusterSnapshotResponse' smart constructor.
data CopyDBClusterSnapshotResponse = CopyDBClusterSnapshotResponse'
  { CopyDBClusterSnapshotResponse -> Maybe DBClusterSnapshot
dbClusterSnapshot :: Prelude.Maybe DBClusterSnapshot,
    -- | The response's http status code.
    CopyDBClusterSnapshotResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CopyDBClusterSnapshotResponse
-> CopyDBClusterSnapshotResponse -> Bool
(CopyDBClusterSnapshotResponse
 -> CopyDBClusterSnapshotResponse -> Bool)
-> (CopyDBClusterSnapshotResponse
    -> CopyDBClusterSnapshotResponse -> Bool)
-> Eq CopyDBClusterSnapshotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyDBClusterSnapshotResponse
-> CopyDBClusterSnapshotResponse -> Bool
$c/= :: CopyDBClusterSnapshotResponse
-> CopyDBClusterSnapshotResponse -> Bool
== :: CopyDBClusterSnapshotResponse
-> CopyDBClusterSnapshotResponse -> Bool
$c== :: CopyDBClusterSnapshotResponse
-> CopyDBClusterSnapshotResponse -> Bool
Prelude.Eq, ReadPrec [CopyDBClusterSnapshotResponse]
ReadPrec CopyDBClusterSnapshotResponse
Int -> ReadS CopyDBClusterSnapshotResponse
ReadS [CopyDBClusterSnapshotResponse]
(Int -> ReadS CopyDBClusterSnapshotResponse)
-> ReadS [CopyDBClusterSnapshotResponse]
-> ReadPrec CopyDBClusterSnapshotResponse
-> ReadPrec [CopyDBClusterSnapshotResponse]
-> Read CopyDBClusterSnapshotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyDBClusterSnapshotResponse]
$creadListPrec :: ReadPrec [CopyDBClusterSnapshotResponse]
readPrec :: ReadPrec CopyDBClusterSnapshotResponse
$creadPrec :: ReadPrec CopyDBClusterSnapshotResponse
readList :: ReadS [CopyDBClusterSnapshotResponse]
$creadList :: ReadS [CopyDBClusterSnapshotResponse]
readsPrec :: Int -> ReadS CopyDBClusterSnapshotResponse
$creadsPrec :: Int -> ReadS CopyDBClusterSnapshotResponse
Prelude.Read, Int -> CopyDBClusterSnapshotResponse -> ShowS
[CopyDBClusterSnapshotResponse] -> ShowS
CopyDBClusterSnapshotResponse -> String
(Int -> CopyDBClusterSnapshotResponse -> ShowS)
-> (CopyDBClusterSnapshotResponse -> String)
-> ([CopyDBClusterSnapshotResponse] -> ShowS)
-> Show CopyDBClusterSnapshotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyDBClusterSnapshotResponse] -> ShowS
$cshowList :: [CopyDBClusterSnapshotResponse] -> ShowS
show :: CopyDBClusterSnapshotResponse -> String
$cshow :: CopyDBClusterSnapshotResponse -> String
showsPrec :: Int -> CopyDBClusterSnapshotResponse -> ShowS
$cshowsPrec :: Int -> CopyDBClusterSnapshotResponse -> ShowS
Prelude.Show, (forall x.
 CopyDBClusterSnapshotResponse
 -> Rep CopyDBClusterSnapshotResponse x)
-> (forall x.
    Rep CopyDBClusterSnapshotResponse x
    -> CopyDBClusterSnapshotResponse)
-> Generic CopyDBClusterSnapshotResponse
forall x.
Rep CopyDBClusterSnapshotResponse x
-> CopyDBClusterSnapshotResponse
forall x.
CopyDBClusterSnapshotResponse
-> Rep CopyDBClusterSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CopyDBClusterSnapshotResponse x
-> CopyDBClusterSnapshotResponse
$cfrom :: forall x.
CopyDBClusterSnapshotResponse
-> Rep CopyDBClusterSnapshotResponse x
Prelude.Generic)

-- |
-- Create a value of 'CopyDBClusterSnapshotResponse' 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:
--
-- 'dbClusterSnapshot', 'copyDBClusterSnapshotResponse_dbClusterSnapshot' - Undocumented member.
--
-- 'httpStatus', 'copyDBClusterSnapshotResponse_httpStatus' - The response's http status code.
newCopyDBClusterSnapshotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CopyDBClusterSnapshotResponse
newCopyDBClusterSnapshotResponse :: Int -> CopyDBClusterSnapshotResponse
newCopyDBClusterSnapshotResponse Int
pHttpStatus_ =
  CopyDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot -> Int -> CopyDBClusterSnapshotResponse
CopyDBClusterSnapshotResponse'
    { $sel:dbClusterSnapshot:CopyDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot
dbClusterSnapshot =
        Maybe DBClusterSnapshot
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CopyDBClusterSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
copyDBClusterSnapshotResponse_dbClusterSnapshot :: Lens.Lens' CopyDBClusterSnapshotResponse (Prelude.Maybe DBClusterSnapshot)
copyDBClusterSnapshotResponse_dbClusterSnapshot :: (Maybe DBClusterSnapshot -> f (Maybe DBClusterSnapshot))
-> CopyDBClusterSnapshotResponse -> f CopyDBClusterSnapshotResponse
copyDBClusterSnapshotResponse_dbClusterSnapshot = (CopyDBClusterSnapshotResponse -> Maybe DBClusterSnapshot)
-> (CopyDBClusterSnapshotResponse
    -> Maybe DBClusterSnapshot -> CopyDBClusterSnapshotResponse)
-> Lens
     CopyDBClusterSnapshotResponse
     CopyDBClusterSnapshotResponse
     (Maybe DBClusterSnapshot)
     (Maybe DBClusterSnapshot)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshotResponse' {Maybe DBClusterSnapshot
dbClusterSnapshot :: Maybe DBClusterSnapshot
$sel:dbClusterSnapshot:CopyDBClusterSnapshotResponse' :: CopyDBClusterSnapshotResponse -> Maybe DBClusterSnapshot
dbClusterSnapshot} -> Maybe DBClusterSnapshot
dbClusterSnapshot) (\s :: CopyDBClusterSnapshotResponse
s@CopyDBClusterSnapshotResponse' {} Maybe DBClusterSnapshot
a -> CopyDBClusterSnapshotResponse
s {$sel:dbClusterSnapshot:CopyDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot
dbClusterSnapshot = Maybe DBClusterSnapshot
a} :: CopyDBClusterSnapshotResponse)

-- | The response's http status code.
copyDBClusterSnapshotResponse_httpStatus :: Lens.Lens' CopyDBClusterSnapshotResponse Prelude.Int
copyDBClusterSnapshotResponse_httpStatus :: (Int -> f Int)
-> CopyDBClusterSnapshotResponse -> f CopyDBClusterSnapshotResponse
copyDBClusterSnapshotResponse_httpStatus = (CopyDBClusterSnapshotResponse -> Int)
-> (CopyDBClusterSnapshotResponse
    -> Int -> CopyDBClusterSnapshotResponse)
-> Lens
     CopyDBClusterSnapshotResponse CopyDBClusterSnapshotResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:CopyDBClusterSnapshotResponse' :: CopyDBClusterSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CopyDBClusterSnapshotResponse
s@CopyDBClusterSnapshotResponse' {} Int
a -> CopyDBClusterSnapshotResponse
s {$sel:httpStatus:CopyDBClusterSnapshotResponse' :: Int
httpStatus = Int
a} :: CopyDBClusterSnapshotResponse)

instance Prelude.NFData CopyDBClusterSnapshotResponse