{-# 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.Redshift.RestoreFromClusterSnapshot
-- 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)
--
-- Creates a new cluster from a snapshot. By default, Amazon Redshift
-- creates the resulting cluster with the same configuration as the
-- original cluster from which the snapshot was created, except that the
-- new cluster is created with the default cluster security and parameter
-- groups. After Amazon Redshift creates the cluster, you can use the
-- ModifyCluster API to associate a different security group and different
-- parameter group with the restored cluster. If you are using a DS node
-- type, you can also choose to change to another DS node type of the same
-- size during restore.
--
-- If you restore a cluster into a VPC, you must provide a cluster subnet
-- group where you want the cluster restored.
--
-- For more information about working with snapshots, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html Amazon Redshift Snapshots>
-- in the /Amazon Redshift Cluster Management Guide/.
module Amazonka.Redshift.RestoreFromClusterSnapshot
  ( -- * Creating a Request
    RestoreFromClusterSnapshot (..),
    newRestoreFromClusterSnapshot,

    -- * Request Lenses
    restoreFromClusterSnapshot_manualSnapshotRetentionPeriod,
    restoreFromClusterSnapshot_enhancedVpcRouting,
    restoreFromClusterSnapshot_additionalInfo,
    restoreFromClusterSnapshot_snapshotScheduleIdentifier,
    restoreFromClusterSnapshot_publiclyAccessible,
    restoreFromClusterSnapshot_snapshotClusterIdentifier,
    restoreFromClusterSnapshot_maintenanceTrackName,
    restoreFromClusterSnapshot_hsmConfigurationIdentifier,
    restoreFromClusterSnapshot_aquaConfigurationStatus,
    restoreFromClusterSnapshot_clusterSecurityGroups,
    restoreFromClusterSnapshot_automatedSnapshotRetentionPeriod,
    restoreFromClusterSnapshot_clusterSubnetGroupName,
    restoreFromClusterSnapshot_hsmClientCertificateIdentifier,
    restoreFromClusterSnapshot_numberOfNodes,
    restoreFromClusterSnapshot_elasticIp,
    restoreFromClusterSnapshot_preferredMaintenanceWindow,
    restoreFromClusterSnapshot_kmsKeyId,
    restoreFromClusterSnapshot_availabilityZone,
    restoreFromClusterSnapshot_vpcSecurityGroupIds,
    restoreFromClusterSnapshot_iamRoles,
    restoreFromClusterSnapshot_availabilityZoneRelocation,
    restoreFromClusterSnapshot_ownerAccount,
    restoreFromClusterSnapshot_nodeType,
    restoreFromClusterSnapshot_allowVersionUpgrade,
    restoreFromClusterSnapshot_clusterParameterGroupName,
    restoreFromClusterSnapshot_port,
    restoreFromClusterSnapshot_clusterIdentifier,
    restoreFromClusterSnapshot_snapshotIdentifier,

    -- * Destructuring the Response
    RestoreFromClusterSnapshotResponse (..),
    newRestoreFromClusterSnapshotResponse,

    -- * Response Lenses
    restoreFromClusterSnapshotResponse_cluster,
    restoreFromClusterSnapshotResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- |
--
-- /See:/ 'newRestoreFromClusterSnapshot' smart constructor.
data RestoreFromClusterSnapshot = RestoreFromClusterSnapshot'
  { -- | The default number of days to retain a manual snapshot. If the value is
    -- -1, the snapshot is retained indefinitely. This setting doesn\'t change
    -- the retention period of existing snapshots.
    --
    -- The value must be either -1 or an integer between 1 and 3,653.
    RestoreFromClusterSnapshot -> Maybe Int
manualSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | An option that specifies whether to create the cluster with enhanced VPC
    -- routing enabled. To create a cluster that uses enhanced VPC routing, the
    -- cluster must be in a VPC. For more information, see
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
    -- in the Amazon Redshift Cluster Management Guide.
    --
    -- If this option is @true@, enhanced VPC routing is enabled.
    --
    -- Default: false
    RestoreFromClusterSnapshot -> Maybe Bool
enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,
    -- | Reserved.
    RestoreFromClusterSnapshot -> Maybe Text
additionalInfo :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the snapshot schedule.
    RestoreFromClusterSnapshot -> Maybe Text
snapshotScheduleIdentifier :: Prelude.Maybe Prelude.Text,
    -- | If @true@, the cluster can be accessed from a public network.
    RestoreFromClusterSnapshot -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | The name of the cluster the source snapshot was created from. This
    -- parameter is required if your IAM user has a policy containing a
    -- snapshot resource element that specifies anything other than * for the
    -- cluster name.
    RestoreFromClusterSnapshot -> Maybe Text
snapshotClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The name of the maintenance track for the restored cluster. When you
    -- take a snapshot, the snapshot inherits the @MaintenanceTrack@ value from
    -- the cluster. The snapshot might be on a different track than the cluster
    -- that was the source for the snapshot. For example, suppose that you take
    -- a snapshot of a cluster that is on the current track and then change the
    -- cluster to be on the trailing track. In this case, the snapshot and the
    -- source cluster are on different tracks.
    RestoreFromClusterSnapshot -> Maybe Text
maintenanceTrackName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the HSM configuration that contains the
    -- information the Amazon Redshift cluster can use to retrieve and store
    -- keys in an HSM.
    RestoreFromClusterSnapshot -> Maybe Text
hsmConfigurationIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The value represents how the cluster is configured to use AQUA (Advanced
    -- Query Accelerator) after the cluster is restored. Possible values
    -- include the following.
    --
    -- -   enabled - Use AQUA if it is available for the current Amazon Web
    --     Services Region and Amazon Redshift node type.
    --
    -- -   disabled - Don\'t use AQUA.
    --
    -- -   auto - Amazon Redshift determines whether to use AQUA.
    RestoreFromClusterSnapshot -> Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Prelude.Maybe AquaConfigurationStatus,
    -- | A list of security groups to be associated with this cluster.
    --
    -- Default: The default cluster security group for Amazon Redshift.
    --
    -- Cluster security groups only apply to clusters outside of VPCs.
    RestoreFromClusterSnapshot -> Maybe [Text]
clusterSecurityGroups :: Prelude.Maybe [Prelude.Text],
    -- | The number of days that automated snapshots are retained. If the value
    -- is 0, automated snapshots are disabled. Even if automated snapshots are
    -- disabled, you can still create manual snapshots when you want with
    -- CreateClusterSnapshot.
    --
    -- You can\'t disable automated snapshots for RA3 node types. Set the
    -- automated retention period from 1-35 days.
    --
    -- Default: The value selected for the cluster from which the snapshot was
    -- taken.
    --
    -- Constraints: Must be a value from 0 to 35.
    RestoreFromClusterSnapshot -> Maybe Int
automatedSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | The name of the subnet group where you want to cluster restored.
    --
    -- A snapshot of cluster in VPC can be restored only in VPC. Therefore, you
    -- must provide subnet group name where you want the cluster restored.
    RestoreFromClusterSnapshot -> Maybe Text
clusterSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the HSM client certificate the Amazon Redshift
    -- cluster uses to retrieve the data encryption keys stored in an HSM.
    RestoreFromClusterSnapshot -> Maybe Text
hsmClientCertificateIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The number of nodes specified when provisioning the restored cluster.
    RestoreFromClusterSnapshot -> Maybe Int
numberOfNodes :: Prelude.Maybe Prelude.Int,
    -- | The elastic IP (EIP) address for the cluster.
    RestoreFromClusterSnapshot -> Maybe Text
elasticIp :: Prelude.Maybe Prelude.Text,
    -- | The weekly time range (in UTC) during which automated cluster
    -- maintenance can occur.
    --
    -- Format: @ddd:hh24:mi-ddd:hh24:mi@
    --
    -- Default: The value selected for the cluster from which the snapshot was
    -- taken. For more information about the time blocks for each region, see
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows Maintenance Windows>
    -- in Amazon Redshift Cluster Management Guide.
    --
    -- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
    --
    -- Constraints: Minimum 30-minute window.
    RestoreFromClusterSnapshot -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The Key Management Service (KMS) key ID of the encryption key that you
    -- want to use to encrypt data in the cluster that you restore from a
    -- shared snapshot.
    RestoreFromClusterSnapshot -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon EC2 Availability Zone in which to restore the cluster.
    --
    -- Default: A random, system-chosen Availability Zone.
    --
    -- Example: @us-east-2a@
    RestoreFromClusterSnapshot -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | A list of Virtual Private Cloud (VPC) security groups to be associated
    -- with the cluster.
    --
    -- Default: The default VPC security group is associated with the cluster.
    --
    -- VPC security groups only apply to clusters in VPCs.
    RestoreFromClusterSnapshot -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A list of Identity and Access Management (IAM) roles that can be used by
    -- the cluster to access other Amazon Web Services services. You must
    -- supply the IAM roles in their Amazon Resource Name (ARN) format. You can
    -- supply up to 10 IAM roles in a single request.
    --
    -- A cluster can have up to 10 IAM roles associated at any time.
    RestoreFromClusterSnapshot -> Maybe [Text]
iamRoles :: Prelude.Maybe [Prelude.Text],
    -- | The option to enable relocation for an Amazon Redshift cluster between
    -- Availability Zones after the cluster is restored.
    RestoreFromClusterSnapshot -> Maybe Bool
availabilityZoneRelocation :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Web Services account used to create or copy the snapshot.
    -- Required if you are restoring a snapshot you do not own, optional if you
    -- own the snapshot.
    RestoreFromClusterSnapshot -> Maybe Text
ownerAccount :: Prelude.Maybe Prelude.Text,
    -- | The node type that the restored cluster will be provisioned with.
    --
    -- Default: The node type of the cluster from which the snapshot was taken.
    -- You can modify this if you are using any DS node type. In that case, you
    -- can choose to restore into another DS node type of the same size. For
    -- example, you can restore ds1.8xlarge into ds2.8xlarge, or ds1.xlarge
    -- into ds2.xlarge. If you have a DC instance type, you must restore into
    -- that same instance type and size. In other words, you can only restore a
    -- dc1.large instance type into another dc1.large instance type or
    -- dc2.large instance type. You can\'t restore dc1.8xlarge to dc2.8xlarge.
    -- First restore to a dc1.8xlarge cluster, then resize to a dc2.8large
    -- cluster. For more information about node types, see
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-about-clusters-and-nodes About Clusters and Nodes>
    -- in the /Amazon Redshift Cluster Management Guide/.
    RestoreFromClusterSnapshot -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text,
    -- | If @true@, major version upgrades can be applied during the maintenance
    -- window to the Amazon Redshift engine that is running on the cluster.
    --
    -- Default: @true@
    RestoreFromClusterSnapshot -> Maybe Bool
allowVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The name of the parameter group to be associated with this cluster.
    --
    -- Default: The default Amazon Redshift cluster parameter group. For
    -- information about the default parameter group, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Working with Amazon Redshift Parameter Groups>.
    --
    -- Constraints:
    --
    -- -   Must be 1 to 255 alphanumeric characters or hyphens.
    --
    -- -   First character must be a letter.
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens.
    RestoreFromClusterSnapshot -> Maybe Text
clusterParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | The port number on which the cluster accepts connections.
    --
    -- Default: The same port as the original cluster.
    --
    -- Constraints: Must be between @1115@ and @65535@.
    RestoreFromClusterSnapshot -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The identifier of the cluster that will be created from restoring the
    -- snapshot.
    --
    -- Constraints:
    --
    -- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
    --
    -- -   Alphabetic characters must be lowercase.
    --
    -- -   First character must be a letter.
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens.
    --
    -- -   Must be unique for all clusters within an Amazon Web Services
    --     account.
    RestoreFromClusterSnapshot -> Text
clusterIdentifier :: Prelude.Text,
    -- | The name of the snapshot from which to create the new cluster. This
    -- parameter isn\'t case sensitive.
    --
    -- Example: @my-snapshot-id@
    RestoreFromClusterSnapshot -> Text
snapshotIdentifier :: Prelude.Text
  }
  deriving (RestoreFromClusterSnapshot -> RestoreFromClusterSnapshot -> Bool
(RestoreFromClusterSnapshot -> RestoreFromClusterSnapshot -> Bool)
-> (RestoreFromClusterSnapshot
    -> RestoreFromClusterSnapshot -> Bool)
-> Eq RestoreFromClusterSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RestoreFromClusterSnapshot -> RestoreFromClusterSnapshot -> Bool
$c/= :: RestoreFromClusterSnapshot -> RestoreFromClusterSnapshot -> Bool
== :: RestoreFromClusterSnapshot -> RestoreFromClusterSnapshot -> Bool
$c== :: RestoreFromClusterSnapshot -> RestoreFromClusterSnapshot -> Bool
Prelude.Eq, ReadPrec [RestoreFromClusterSnapshot]
ReadPrec RestoreFromClusterSnapshot
Int -> ReadS RestoreFromClusterSnapshot
ReadS [RestoreFromClusterSnapshot]
(Int -> ReadS RestoreFromClusterSnapshot)
-> ReadS [RestoreFromClusterSnapshot]
-> ReadPrec RestoreFromClusterSnapshot
-> ReadPrec [RestoreFromClusterSnapshot]
-> Read RestoreFromClusterSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RestoreFromClusterSnapshot]
$creadListPrec :: ReadPrec [RestoreFromClusterSnapshot]
readPrec :: ReadPrec RestoreFromClusterSnapshot
$creadPrec :: ReadPrec RestoreFromClusterSnapshot
readList :: ReadS [RestoreFromClusterSnapshot]
$creadList :: ReadS [RestoreFromClusterSnapshot]
readsPrec :: Int -> ReadS RestoreFromClusterSnapshot
$creadsPrec :: Int -> ReadS RestoreFromClusterSnapshot
Prelude.Read, Int -> RestoreFromClusterSnapshot -> ShowS
[RestoreFromClusterSnapshot] -> ShowS
RestoreFromClusterSnapshot -> String
(Int -> RestoreFromClusterSnapshot -> ShowS)
-> (RestoreFromClusterSnapshot -> String)
-> ([RestoreFromClusterSnapshot] -> ShowS)
-> Show RestoreFromClusterSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RestoreFromClusterSnapshot] -> ShowS
$cshowList :: [RestoreFromClusterSnapshot] -> ShowS
show :: RestoreFromClusterSnapshot -> String
$cshow :: RestoreFromClusterSnapshot -> String
showsPrec :: Int -> RestoreFromClusterSnapshot -> ShowS
$cshowsPrec :: Int -> RestoreFromClusterSnapshot -> ShowS
Prelude.Show, (forall x.
 RestoreFromClusterSnapshot -> Rep RestoreFromClusterSnapshot x)
-> (forall x.
    Rep RestoreFromClusterSnapshot x -> RestoreFromClusterSnapshot)
-> Generic RestoreFromClusterSnapshot
forall x.
Rep RestoreFromClusterSnapshot x -> RestoreFromClusterSnapshot
forall x.
RestoreFromClusterSnapshot -> Rep RestoreFromClusterSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RestoreFromClusterSnapshot x -> RestoreFromClusterSnapshot
$cfrom :: forall x.
RestoreFromClusterSnapshot -> Rep RestoreFromClusterSnapshot x
Prelude.Generic)

-- |
-- Create a value of 'RestoreFromClusterSnapshot' 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:
--
-- 'manualSnapshotRetentionPeriod', 'restoreFromClusterSnapshot_manualSnapshotRetentionPeriod' - The default number of days to retain a manual snapshot. If the value is
-- -1, the snapshot is retained indefinitely. This setting doesn\'t change
-- the retention period of existing snapshots.
--
-- The value must be either -1 or an integer between 1 and 3,653.
--
-- 'enhancedVpcRouting', 'restoreFromClusterSnapshot_enhancedVpcRouting' - An option that specifies whether to create the cluster with enhanced VPC
-- routing enabled. To create a cluster that uses enhanced VPC routing, the
-- cluster must be in a VPC. For more information, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
-- in the Amazon Redshift Cluster Management Guide.
--
-- If this option is @true@, enhanced VPC routing is enabled.
--
-- Default: false
--
-- 'additionalInfo', 'restoreFromClusterSnapshot_additionalInfo' - Reserved.
--
-- 'snapshotScheduleIdentifier', 'restoreFromClusterSnapshot_snapshotScheduleIdentifier' - A unique identifier for the snapshot schedule.
--
-- 'publiclyAccessible', 'restoreFromClusterSnapshot_publiclyAccessible' - If @true@, the cluster can be accessed from a public network.
--
-- 'snapshotClusterIdentifier', 'restoreFromClusterSnapshot_snapshotClusterIdentifier' - The name of the cluster the source snapshot was created from. This
-- parameter is required if your IAM user has a policy containing a
-- snapshot resource element that specifies anything other than * for the
-- cluster name.
--
-- 'maintenanceTrackName', 'restoreFromClusterSnapshot_maintenanceTrackName' - The name of the maintenance track for the restored cluster. When you
-- take a snapshot, the snapshot inherits the @MaintenanceTrack@ value from
-- the cluster. The snapshot might be on a different track than the cluster
-- that was the source for the snapshot. For example, suppose that you take
-- a snapshot of a cluster that is on the current track and then change the
-- cluster to be on the trailing track. In this case, the snapshot and the
-- source cluster are on different tracks.
--
-- 'hsmConfigurationIdentifier', 'restoreFromClusterSnapshot_hsmConfigurationIdentifier' - Specifies the name of the HSM configuration that contains the
-- information the Amazon Redshift cluster can use to retrieve and store
-- keys in an HSM.
--
-- 'aquaConfigurationStatus', 'restoreFromClusterSnapshot_aquaConfigurationStatus' - The value represents how the cluster is configured to use AQUA (Advanced
-- Query Accelerator) after the cluster is restored. Possible values
-- include the following.
--
-- -   enabled - Use AQUA if it is available for the current Amazon Web
--     Services Region and Amazon Redshift node type.
--
-- -   disabled - Don\'t use AQUA.
--
-- -   auto - Amazon Redshift determines whether to use AQUA.
--
-- 'clusterSecurityGroups', 'restoreFromClusterSnapshot_clusterSecurityGroups' - A list of security groups to be associated with this cluster.
--
-- Default: The default cluster security group for Amazon Redshift.
--
-- Cluster security groups only apply to clusters outside of VPCs.
--
-- 'automatedSnapshotRetentionPeriod', 'restoreFromClusterSnapshot_automatedSnapshotRetentionPeriod' - The number of days that automated snapshots are retained. If the value
-- is 0, automated snapshots are disabled. Even if automated snapshots are
-- disabled, you can still create manual snapshots when you want with
-- CreateClusterSnapshot.
--
-- You can\'t disable automated snapshots for RA3 node types. Set the
-- automated retention period from 1-35 days.
--
-- Default: The value selected for the cluster from which the snapshot was
-- taken.
--
-- Constraints: Must be a value from 0 to 35.
--
-- 'clusterSubnetGroupName', 'restoreFromClusterSnapshot_clusterSubnetGroupName' - The name of the subnet group where you want to cluster restored.
--
-- A snapshot of cluster in VPC can be restored only in VPC. Therefore, you
-- must provide subnet group name where you want the cluster restored.
--
-- 'hsmClientCertificateIdentifier', 'restoreFromClusterSnapshot_hsmClientCertificateIdentifier' - Specifies the name of the HSM client certificate the Amazon Redshift
-- cluster uses to retrieve the data encryption keys stored in an HSM.
--
-- 'numberOfNodes', 'restoreFromClusterSnapshot_numberOfNodes' - The number of nodes specified when provisioning the restored cluster.
--
-- 'elasticIp', 'restoreFromClusterSnapshot_elasticIp' - The elastic IP (EIP) address for the cluster.
--
-- 'preferredMaintenanceWindow', 'restoreFromClusterSnapshot_preferredMaintenanceWindow' - The weekly time range (in UTC) during which automated cluster
-- maintenance can occur.
--
-- Format: @ddd:hh24:mi-ddd:hh24:mi@
--
-- Default: The value selected for the cluster from which the snapshot was
-- taken. For more information about the time blocks for each region, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows Maintenance Windows>
-- in Amazon Redshift Cluster Management Guide.
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Minimum 30-minute window.
--
-- 'kmsKeyId', 'restoreFromClusterSnapshot_kmsKeyId' - The Key Management Service (KMS) key ID of the encryption key that you
-- want to use to encrypt data in the cluster that you restore from a
-- shared snapshot.
--
-- 'availabilityZone', 'restoreFromClusterSnapshot_availabilityZone' - The Amazon EC2 Availability Zone in which to restore the cluster.
--
-- Default: A random, system-chosen Availability Zone.
--
-- Example: @us-east-2a@
--
-- 'vpcSecurityGroupIds', 'restoreFromClusterSnapshot_vpcSecurityGroupIds' - A list of Virtual Private Cloud (VPC) security groups to be associated
-- with the cluster.
--
-- Default: The default VPC security group is associated with the cluster.
--
-- VPC security groups only apply to clusters in VPCs.
--
-- 'iamRoles', 'restoreFromClusterSnapshot_iamRoles' - A list of Identity and Access Management (IAM) roles that can be used by
-- the cluster to access other Amazon Web Services services. You must
-- supply the IAM roles in their Amazon Resource Name (ARN) format. You can
-- supply up to 10 IAM roles in a single request.
--
-- A cluster can have up to 10 IAM roles associated at any time.
--
-- 'availabilityZoneRelocation', 'restoreFromClusterSnapshot_availabilityZoneRelocation' - The option to enable relocation for an Amazon Redshift cluster between
-- Availability Zones after the cluster is restored.
--
-- 'ownerAccount', 'restoreFromClusterSnapshot_ownerAccount' - The Amazon Web Services account used to create or copy the snapshot.
-- Required if you are restoring a snapshot you do not own, optional if you
-- own the snapshot.
--
-- 'nodeType', 'restoreFromClusterSnapshot_nodeType' - The node type that the restored cluster will be provisioned with.
--
-- Default: The node type of the cluster from which the snapshot was taken.
-- You can modify this if you are using any DS node type. In that case, you
-- can choose to restore into another DS node type of the same size. For
-- example, you can restore ds1.8xlarge into ds2.8xlarge, or ds1.xlarge
-- into ds2.xlarge. If you have a DC instance type, you must restore into
-- that same instance type and size. In other words, you can only restore a
-- dc1.large instance type into another dc1.large instance type or
-- dc2.large instance type. You can\'t restore dc1.8xlarge to dc2.8xlarge.
-- First restore to a dc1.8xlarge cluster, then resize to a dc2.8large
-- cluster. For more information about node types, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-about-clusters-and-nodes About Clusters and Nodes>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- 'allowVersionUpgrade', 'restoreFromClusterSnapshot_allowVersionUpgrade' - If @true@, major version upgrades can be applied during the maintenance
-- window to the Amazon Redshift engine that is running on the cluster.
--
-- Default: @true@
--
-- 'clusterParameterGroupName', 'restoreFromClusterSnapshot_clusterParameterGroupName' - The name of the parameter group to be associated with this cluster.
--
-- Default: The default Amazon Redshift cluster parameter group. For
-- information about the default parameter group, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Working with Amazon Redshift Parameter Groups>.
--
-- Constraints:
--
-- -   Must be 1 to 255 alphanumeric characters or hyphens.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- 'port', 'restoreFromClusterSnapshot_port' - The port number on which the cluster accepts connections.
--
-- Default: The same port as the original cluster.
--
-- Constraints: Must be between @1115@ and @65535@.
--
-- 'clusterIdentifier', 'restoreFromClusterSnapshot_clusterIdentifier' - The identifier of the cluster that will be created from restoring the
-- snapshot.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
--
-- -   Alphabetic characters must be lowercase.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- -   Must be unique for all clusters within an Amazon Web Services
--     account.
--
-- 'snapshotIdentifier', 'restoreFromClusterSnapshot_snapshotIdentifier' - The name of the snapshot from which to create the new cluster. This
-- parameter isn\'t case sensitive.
--
-- Example: @my-snapshot-id@
newRestoreFromClusterSnapshot ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  -- | 'snapshotIdentifier'
  Prelude.Text ->
  RestoreFromClusterSnapshot
newRestoreFromClusterSnapshot :: Text -> Text -> RestoreFromClusterSnapshot
newRestoreFromClusterSnapshot
  Text
pClusterIdentifier_
  Text
pSnapshotIdentifier_ =
    RestoreFromClusterSnapshot' :: Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AquaConfigurationStatus
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> RestoreFromClusterSnapshot
RestoreFromClusterSnapshot'
      { $sel:manualSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: Maybe Int
manualSnapshotRetentionPeriod =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:enhancedVpcRouting:RestoreFromClusterSnapshot' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:additionalInfo:RestoreFromClusterSnapshot' :: Maybe Text
additionalInfo = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotScheduleIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
snapshotScheduleIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:publiclyAccessible:RestoreFromClusterSnapshot' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotClusterIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
snapshotClusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maintenanceTrackName:RestoreFromClusterSnapshot' :: Maybe Text
maintenanceTrackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:hsmConfigurationIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:aquaConfigurationStatus:RestoreFromClusterSnapshot' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus = Maybe AquaConfigurationStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSecurityGroups:RestoreFromClusterSnapshot' :: Maybe [Text]
clusterSecurityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:automatedSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: Maybe Int
automatedSnapshotRetentionPeriod =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSubnetGroupName:RestoreFromClusterSnapshot' :: Maybe Text
clusterSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:hsmClientCertificateIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
hsmClientCertificateIdentifier =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:numberOfNodes:RestoreFromClusterSnapshot' :: Maybe Int
numberOfNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:elasticIp:RestoreFromClusterSnapshot' :: Maybe Text
elasticIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:preferredMaintenanceWindow:RestoreFromClusterSnapshot' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:RestoreFromClusterSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZone:RestoreFromClusterSnapshot' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcSecurityGroupIds:RestoreFromClusterSnapshot' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:iamRoles:RestoreFromClusterSnapshot' :: Maybe [Text]
iamRoles = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZoneRelocation:RestoreFromClusterSnapshot' :: Maybe Bool
availabilityZoneRelocation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:ownerAccount:RestoreFromClusterSnapshot' :: Maybe Text
ownerAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nodeType:RestoreFromClusterSnapshot' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:allowVersionUpgrade:RestoreFromClusterSnapshot' :: Maybe Bool
allowVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterParameterGroupName:RestoreFromClusterSnapshot' :: Maybe Text
clusterParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:port:RestoreFromClusterSnapshot' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterIdentifier:RestoreFromClusterSnapshot' :: Text
clusterIdentifier = Text
pClusterIdentifier_,
        $sel:snapshotIdentifier:RestoreFromClusterSnapshot' :: Text
snapshotIdentifier = Text
pSnapshotIdentifier_
      }

-- | The default number of days to retain a manual snapshot. If the value is
-- -1, the snapshot is retained indefinitely. This setting doesn\'t change
-- the retention period of existing snapshots.
--
-- The value must be either -1 or an integer between 1 and 3,653.
restoreFromClusterSnapshot_manualSnapshotRetentionPeriod :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Int)
restoreFromClusterSnapshot_manualSnapshotRetentionPeriod :: (Maybe Int -> f (Maybe Int))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_manualSnapshotRetentionPeriod = (RestoreFromClusterSnapshot -> Maybe Int)
-> (RestoreFromClusterSnapshot
    -> Maybe Int -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
$sel:manualSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
manualSnapshotRetentionPeriod} -> Maybe Int
manualSnapshotRetentionPeriod) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Int
a -> RestoreFromClusterSnapshot
s {$sel:manualSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: Maybe Int
manualSnapshotRetentionPeriod = Maybe Int
a} :: RestoreFromClusterSnapshot)

-- | An option that specifies whether to create the cluster with enhanced VPC
-- routing enabled. To create a cluster that uses enhanced VPC routing, the
-- cluster must be in a VPC. For more information, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
-- in the Amazon Redshift Cluster Management Guide.
--
-- If this option is @true@, enhanced VPC routing is enabled.
--
-- Default: false
restoreFromClusterSnapshot_enhancedVpcRouting :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Bool)
restoreFromClusterSnapshot_enhancedVpcRouting :: (Maybe Bool -> f (Maybe Bool))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_enhancedVpcRouting = (RestoreFromClusterSnapshot -> Maybe Bool)
-> (RestoreFromClusterSnapshot
    -> Maybe Bool -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Bool
enhancedVpcRouting :: Maybe Bool
$sel:enhancedVpcRouting:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
enhancedVpcRouting} -> Maybe Bool
enhancedVpcRouting) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Bool
a -> RestoreFromClusterSnapshot
s {$sel:enhancedVpcRouting:RestoreFromClusterSnapshot' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
a} :: RestoreFromClusterSnapshot)

-- | Reserved.
restoreFromClusterSnapshot_additionalInfo :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_additionalInfo :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_additionalInfo = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
additionalInfo :: Maybe Text
$sel:additionalInfo:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
additionalInfo} -> Maybe Text
additionalInfo) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:additionalInfo:RestoreFromClusterSnapshot' :: Maybe Text
additionalInfo = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | A unique identifier for the snapshot schedule.
restoreFromClusterSnapshot_snapshotScheduleIdentifier :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_snapshotScheduleIdentifier :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_snapshotScheduleIdentifier = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
snapshotScheduleIdentifier :: Maybe Text
$sel:snapshotScheduleIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
snapshotScheduleIdentifier} -> Maybe Text
snapshotScheduleIdentifier) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:snapshotScheduleIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
snapshotScheduleIdentifier = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | If @true@, the cluster can be accessed from a public network.
restoreFromClusterSnapshot_publiclyAccessible :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Bool)
restoreFromClusterSnapshot_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_publiclyAccessible = (RestoreFromClusterSnapshot -> Maybe Bool)
-> (RestoreFromClusterSnapshot
    -> Maybe Bool -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Bool
a -> RestoreFromClusterSnapshot
s {$sel:publiclyAccessible:RestoreFromClusterSnapshot' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: RestoreFromClusterSnapshot)

-- | The name of the cluster the source snapshot was created from. This
-- parameter is required if your IAM user has a policy containing a
-- snapshot resource element that specifies anything other than * for the
-- cluster name.
restoreFromClusterSnapshot_snapshotClusterIdentifier :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_snapshotClusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_snapshotClusterIdentifier = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
snapshotClusterIdentifier :: Maybe Text
$sel:snapshotClusterIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
snapshotClusterIdentifier} -> Maybe Text
snapshotClusterIdentifier) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:snapshotClusterIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
snapshotClusterIdentifier = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The name of the maintenance track for the restored cluster. When you
-- take a snapshot, the snapshot inherits the @MaintenanceTrack@ value from
-- the cluster. The snapshot might be on a different track than the cluster
-- that was the source for the snapshot. For example, suppose that you take
-- a snapshot of a cluster that is on the current track and then change the
-- cluster to be on the trailing track. In this case, the snapshot and the
-- source cluster are on different tracks.
restoreFromClusterSnapshot_maintenanceTrackName :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_maintenanceTrackName :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_maintenanceTrackName = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
maintenanceTrackName :: Maybe Text
$sel:maintenanceTrackName:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
maintenanceTrackName} -> Maybe Text
maintenanceTrackName) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:maintenanceTrackName:RestoreFromClusterSnapshot' :: Maybe Text
maintenanceTrackName = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | Specifies the name of the HSM configuration that contains the
-- information the Amazon Redshift cluster can use to retrieve and store
-- keys in an HSM.
restoreFromClusterSnapshot_hsmConfigurationIdentifier :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_hsmConfigurationIdentifier :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_hsmConfigurationIdentifier = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
hsmConfigurationIdentifier :: Maybe Text
$sel:hsmConfigurationIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
hsmConfigurationIdentifier} -> Maybe Text
hsmConfigurationIdentifier) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:hsmConfigurationIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The value represents how the cluster is configured to use AQUA (Advanced
-- Query Accelerator) after the cluster is restored. Possible values
-- include the following.
--
-- -   enabled - Use AQUA if it is available for the current Amazon Web
--     Services Region and Amazon Redshift node type.
--
-- -   disabled - Don\'t use AQUA.
--
-- -   auto - Amazon Redshift determines whether to use AQUA.
restoreFromClusterSnapshot_aquaConfigurationStatus :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe AquaConfigurationStatus)
restoreFromClusterSnapshot_aquaConfigurationStatus :: (Maybe AquaConfigurationStatus
 -> f (Maybe AquaConfigurationStatus))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_aquaConfigurationStatus = (RestoreFromClusterSnapshot -> Maybe AquaConfigurationStatus)
-> (RestoreFromClusterSnapshot
    -> Maybe AquaConfigurationStatus -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe AquaConfigurationStatus)
     (Maybe AquaConfigurationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
$sel:aquaConfigurationStatus:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe AquaConfigurationStatus
aquaConfigurationStatus} -> Maybe AquaConfigurationStatus
aquaConfigurationStatus) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe AquaConfigurationStatus
a -> RestoreFromClusterSnapshot
s {$sel:aquaConfigurationStatus:RestoreFromClusterSnapshot' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus = Maybe AquaConfigurationStatus
a} :: RestoreFromClusterSnapshot)

-- | A list of security groups to be associated with this cluster.
--
-- Default: The default cluster security group for Amazon Redshift.
--
-- Cluster security groups only apply to clusters outside of VPCs.
restoreFromClusterSnapshot_clusterSecurityGroups :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe [Prelude.Text])
restoreFromClusterSnapshot_clusterSecurityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_clusterSecurityGroups = (RestoreFromClusterSnapshot -> Maybe [Text])
-> (RestoreFromClusterSnapshot
    -> Maybe [Text] -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe [Text]
clusterSecurityGroups :: Maybe [Text]
$sel:clusterSecurityGroups:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe [Text]
clusterSecurityGroups} -> Maybe [Text]
clusterSecurityGroups) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe [Text]
a -> RestoreFromClusterSnapshot
s {$sel:clusterSecurityGroups:RestoreFromClusterSnapshot' :: Maybe [Text]
clusterSecurityGroups = Maybe [Text]
a} :: RestoreFromClusterSnapshot) ((Maybe [Text] -> f (Maybe [Text]))
 -> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> RestoreFromClusterSnapshot
-> f RestoreFromClusterSnapshot
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 number of days that automated snapshots are retained. If the value
-- is 0, automated snapshots are disabled. Even if automated snapshots are
-- disabled, you can still create manual snapshots when you want with
-- CreateClusterSnapshot.
--
-- You can\'t disable automated snapshots for RA3 node types. Set the
-- automated retention period from 1-35 days.
--
-- Default: The value selected for the cluster from which the snapshot was
-- taken.
--
-- Constraints: Must be a value from 0 to 35.
restoreFromClusterSnapshot_automatedSnapshotRetentionPeriod :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Int)
restoreFromClusterSnapshot_automatedSnapshotRetentionPeriod :: (Maybe Int -> f (Maybe Int))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_automatedSnapshotRetentionPeriod = (RestoreFromClusterSnapshot -> Maybe Int)
-> (RestoreFromClusterSnapshot
    -> Maybe Int -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Int
automatedSnapshotRetentionPeriod :: Maybe Int
$sel:automatedSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
automatedSnapshotRetentionPeriod} -> Maybe Int
automatedSnapshotRetentionPeriod) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Int
a -> RestoreFromClusterSnapshot
s {$sel:automatedSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: Maybe Int
automatedSnapshotRetentionPeriod = Maybe Int
a} :: RestoreFromClusterSnapshot)

-- | The name of the subnet group where you want to cluster restored.
--
-- A snapshot of cluster in VPC can be restored only in VPC. Therefore, you
-- must provide subnet group name where you want the cluster restored.
restoreFromClusterSnapshot_clusterSubnetGroupName :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_clusterSubnetGroupName :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_clusterSubnetGroupName = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
clusterSubnetGroupName :: Maybe Text
$sel:clusterSubnetGroupName:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
clusterSubnetGroupName} -> Maybe Text
clusterSubnetGroupName) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:clusterSubnetGroupName:RestoreFromClusterSnapshot' :: Maybe Text
clusterSubnetGroupName = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | Specifies the name of the HSM client certificate the Amazon Redshift
-- cluster uses to retrieve the data encryption keys stored in an HSM.
restoreFromClusterSnapshot_hsmClientCertificateIdentifier :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_hsmClientCertificateIdentifier :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_hsmClientCertificateIdentifier = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
$sel:hsmClientCertificateIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
hsmClientCertificateIdentifier} -> Maybe Text
hsmClientCertificateIdentifier) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:hsmClientCertificateIdentifier:RestoreFromClusterSnapshot' :: Maybe Text
hsmClientCertificateIdentifier = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The number of nodes specified when provisioning the restored cluster.
restoreFromClusterSnapshot_numberOfNodes :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Int)
restoreFromClusterSnapshot_numberOfNodes :: (Maybe Int -> f (Maybe Int))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_numberOfNodes = (RestoreFromClusterSnapshot -> Maybe Int)
-> (RestoreFromClusterSnapshot
    -> Maybe Int -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Int
numberOfNodes :: Maybe Int
$sel:numberOfNodes:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
numberOfNodes} -> Maybe Int
numberOfNodes) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Int
a -> RestoreFromClusterSnapshot
s {$sel:numberOfNodes:RestoreFromClusterSnapshot' :: Maybe Int
numberOfNodes = Maybe Int
a} :: RestoreFromClusterSnapshot)

-- | The elastic IP (EIP) address for the cluster.
restoreFromClusterSnapshot_elasticIp :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_elasticIp :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_elasticIp = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
elasticIp :: Maybe Text
$sel:elasticIp:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
elasticIp} -> Maybe Text
elasticIp) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:elasticIp:RestoreFromClusterSnapshot' :: Maybe Text
elasticIp = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The weekly time range (in UTC) during which automated cluster
-- maintenance can occur.
--
-- Format: @ddd:hh24:mi-ddd:hh24:mi@
--
-- Default: The value selected for the cluster from which the snapshot was
-- taken. For more information about the time blocks for each region, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows Maintenance Windows>
-- in Amazon Redshift Cluster Management Guide.
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Minimum 30-minute window.
restoreFromClusterSnapshot_preferredMaintenanceWindow :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_preferredMaintenanceWindow = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:preferredMaintenanceWindow:RestoreFromClusterSnapshot' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The Key Management Service (KMS) key ID of the encryption key that you
-- want to use to encrypt data in the cluster that you restore from a
-- shared snapshot.
restoreFromClusterSnapshot_kmsKeyId :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_kmsKeyId = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:kmsKeyId:RestoreFromClusterSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The Amazon EC2 Availability Zone in which to restore the cluster.
--
-- Default: A random, system-chosen Availability Zone.
--
-- Example: @us-east-2a@
restoreFromClusterSnapshot_availabilityZone :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_availabilityZone = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:availabilityZone:RestoreFromClusterSnapshot' :: Maybe Text
availabilityZone = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | A list of Virtual Private Cloud (VPC) security groups to be associated
-- with the cluster.
--
-- Default: The default VPC security group is associated with the cluster.
--
-- VPC security groups only apply to clusters in VPCs.
restoreFromClusterSnapshot_vpcSecurityGroupIds :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe [Prelude.Text])
restoreFromClusterSnapshot_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_vpcSecurityGroupIds = (RestoreFromClusterSnapshot -> Maybe [Text])
-> (RestoreFromClusterSnapshot
    -> Maybe [Text] -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe [Text]
a -> RestoreFromClusterSnapshot
s {$sel:vpcSecurityGroupIds:RestoreFromClusterSnapshot' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: RestoreFromClusterSnapshot) ((Maybe [Text] -> f (Maybe [Text]))
 -> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> RestoreFromClusterSnapshot
-> f RestoreFromClusterSnapshot
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

-- | A list of Identity and Access Management (IAM) roles that can be used by
-- the cluster to access other Amazon Web Services services. You must
-- supply the IAM roles in their Amazon Resource Name (ARN) format. You can
-- supply up to 10 IAM roles in a single request.
--
-- A cluster can have up to 10 IAM roles associated at any time.
restoreFromClusterSnapshot_iamRoles :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe [Prelude.Text])
restoreFromClusterSnapshot_iamRoles :: (Maybe [Text] -> f (Maybe [Text]))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_iamRoles = (RestoreFromClusterSnapshot -> Maybe [Text])
-> (RestoreFromClusterSnapshot
    -> Maybe [Text] -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe [Text]
iamRoles :: Maybe [Text]
$sel:iamRoles:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe [Text]
iamRoles} -> Maybe [Text]
iamRoles) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe [Text]
a -> RestoreFromClusterSnapshot
s {$sel:iamRoles:RestoreFromClusterSnapshot' :: Maybe [Text]
iamRoles = Maybe [Text]
a} :: RestoreFromClusterSnapshot) ((Maybe [Text] -> f (Maybe [Text]))
 -> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> RestoreFromClusterSnapshot
-> f RestoreFromClusterSnapshot
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 option to enable relocation for an Amazon Redshift cluster between
-- Availability Zones after the cluster is restored.
restoreFromClusterSnapshot_availabilityZoneRelocation :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Bool)
restoreFromClusterSnapshot_availabilityZoneRelocation :: (Maybe Bool -> f (Maybe Bool))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_availabilityZoneRelocation = (RestoreFromClusterSnapshot -> Maybe Bool)
-> (RestoreFromClusterSnapshot
    -> Maybe Bool -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Bool
availabilityZoneRelocation :: Maybe Bool
$sel:availabilityZoneRelocation:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
availabilityZoneRelocation} -> Maybe Bool
availabilityZoneRelocation) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Bool
a -> RestoreFromClusterSnapshot
s {$sel:availabilityZoneRelocation:RestoreFromClusterSnapshot' :: Maybe Bool
availabilityZoneRelocation = Maybe Bool
a} :: RestoreFromClusterSnapshot)

-- | The Amazon Web Services account used to create or copy the snapshot.
-- Required if you are restoring a snapshot you do not own, optional if you
-- own the snapshot.
restoreFromClusterSnapshot_ownerAccount :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_ownerAccount :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_ownerAccount = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
ownerAccount :: Maybe Text
$sel:ownerAccount:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
ownerAccount} -> Maybe Text
ownerAccount) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:ownerAccount:RestoreFromClusterSnapshot' :: Maybe Text
ownerAccount = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The node type that the restored cluster will be provisioned with.
--
-- Default: The node type of the cluster from which the snapshot was taken.
-- You can modify this if you are using any DS node type. In that case, you
-- can choose to restore into another DS node type of the same size. For
-- example, you can restore ds1.8xlarge into ds2.8xlarge, or ds1.xlarge
-- into ds2.xlarge. If you have a DC instance type, you must restore into
-- that same instance type and size. In other words, you can only restore a
-- dc1.large instance type into another dc1.large instance type or
-- dc2.large instance type. You can\'t restore dc1.8xlarge to dc2.8xlarge.
-- First restore to a dc1.8xlarge cluster, then resize to a dc2.8large
-- cluster. For more information about node types, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-about-clusters-and-nodes About Clusters and Nodes>
-- in the /Amazon Redshift Cluster Management Guide/.
restoreFromClusterSnapshot_nodeType :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_nodeType :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_nodeType = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
nodeType :: Maybe Text
$sel:nodeType:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
nodeType} -> Maybe Text
nodeType) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:nodeType:RestoreFromClusterSnapshot' :: Maybe Text
nodeType = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | If @true@, major version upgrades can be applied during the maintenance
-- window to the Amazon Redshift engine that is running on the cluster.
--
-- Default: @true@
restoreFromClusterSnapshot_allowVersionUpgrade :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Bool)
restoreFromClusterSnapshot_allowVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_allowVersionUpgrade = (RestoreFromClusterSnapshot -> Maybe Bool)
-> (RestoreFromClusterSnapshot
    -> Maybe Bool -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Bool
allowVersionUpgrade :: Maybe Bool
$sel:allowVersionUpgrade:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
allowVersionUpgrade} -> Maybe Bool
allowVersionUpgrade) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Bool
a -> RestoreFromClusterSnapshot
s {$sel:allowVersionUpgrade:RestoreFromClusterSnapshot' :: Maybe Bool
allowVersionUpgrade = Maybe Bool
a} :: RestoreFromClusterSnapshot)

-- | The name of the parameter group to be associated with this cluster.
--
-- Default: The default Amazon Redshift cluster parameter group. For
-- information about the default parameter group, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Working with Amazon Redshift Parameter Groups>.
--
-- Constraints:
--
-- -   Must be 1 to 255 alphanumeric characters or hyphens.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
restoreFromClusterSnapshot_clusterParameterGroupName :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreFromClusterSnapshot_clusterParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_clusterParameterGroupName = (RestoreFromClusterSnapshot -> Maybe Text)
-> (RestoreFromClusterSnapshot
    -> Maybe Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Text
clusterParameterGroupName :: Maybe Text
$sel:clusterParameterGroupName:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
clusterParameterGroupName} -> Maybe Text
clusterParameterGroupName) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Text
a -> RestoreFromClusterSnapshot
s {$sel:clusterParameterGroupName:RestoreFromClusterSnapshot' :: Maybe Text
clusterParameterGroupName = Maybe Text
a} :: RestoreFromClusterSnapshot)

-- | The port number on which the cluster accepts connections.
--
-- Default: The same port as the original cluster.
--
-- Constraints: Must be between @1115@ and @65535@.
restoreFromClusterSnapshot_port :: Lens.Lens' RestoreFromClusterSnapshot (Prelude.Maybe Prelude.Int)
restoreFromClusterSnapshot_port :: (Maybe Int -> f (Maybe Int))
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_port = (RestoreFromClusterSnapshot -> Maybe Int)
-> (RestoreFromClusterSnapshot
    -> Maybe Int -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot
     RestoreFromClusterSnapshot
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Maybe Int
port :: Maybe Int
$sel:port:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
port} -> Maybe Int
port) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Maybe Int
a -> RestoreFromClusterSnapshot
s {$sel:port:RestoreFromClusterSnapshot' :: Maybe Int
port = Maybe Int
a} :: RestoreFromClusterSnapshot)

-- | The identifier of the cluster that will be created from restoring the
-- snapshot.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
--
-- -   Alphabetic characters must be lowercase.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- -   Must be unique for all clusters within an Amazon Web Services
--     account.
restoreFromClusterSnapshot_clusterIdentifier :: Lens.Lens' RestoreFromClusterSnapshot Prelude.Text
restoreFromClusterSnapshot_clusterIdentifier :: (Text -> f Text)
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_clusterIdentifier = (RestoreFromClusterSnapshot -> Text)
-> (RestoreFromClusterSnapshot
    -> Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot RestoreFromClusterSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Text
a -> RestoreFromClusterSnapshot
s {$sel:clusterIdentifier:RestoreFromClusterSnapshot' :: Text
clusterIdentifier = Text
a} :: RestoreFromClusterSnapshot)

-- | The name of the snapshot from which to create the new cluster. This
-- parameter isn\'t case sensitive.
--
-- Example: @my-snapshot-id@
restoreFromClusterSnapshot_snapshotIdentifier :: Lens.Lens' RestoreFromClusterSnapshot Prelude.Text
restoreFromClusterSnapshot_snapshotIdentifier :: (Text -> f Text)
-> RestoreFromClusterSnapshot -> f RestoreFromClusterSnapshot
restoreFromClusterSnapshot_snapshotIdentifier = (RestoreFromClusterSnapshot -> Text)
-> (RestoreFromClusterSnapshot
    -> Text -> RestoreFromClusterSnapshot)
-> Lens
     RestoreFromClusterSnapshot RestoreFromClusterSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshot' {Text
snapshotIdentifier :: Text
$sel:snapshotIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Text
snapshotIdentifier} -> Text
snapshotIdentifier) (\s :: RestoreFromClusterSnapshot
s@RestoreFromClusterSnapshot' {} Text
a -> RestoreFromClusterSnapshot
s {$sel:snapshotIdentifier:RestoreFromClusterSnapshot' :: Text
snapshotIdentifier = Text
a} :: RestoreFromClusterSnapshot)

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

instance Prelude.NFData RestoreFromClusterSnapshot

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

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

instance Core.ToQuery RestoreFromClusterSnapshot where
  toQuery :: RestoreFromClusterSnapshot -> QueryString
toQuery RestoreFromClusterSnapshot' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
Maybe AquaConfigurationStatus
Text
snapshotIdentifier :: Text
clusterIdentifier :: Text
port :: Maybe Int
clusterParameterGroupName :: Maybe Text
allowVersionUpgrade :: Maybe Bool
nodeType :: Maybe Text
ownerAccount :: Maybe Text
availabilityZoneRelocation :: Maybe Bool
iamRoles :: Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
availabilityZone :: Maybe Text
kmsKeyId :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
elasticIp :: Maybe Text
numberOfNodes :: Maybe Int
hsmClientCertificateIdentifier :: Maybe Text
clusterSubnetGroupName :: Maybe Text
automatedSnapshotRetentionPeriod :: Maybe Int
clusterSecurityGroups :: Maybe [Text]
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
hsmConfigurationIdentifier :: Maybe Text
maintenanceTrackName :: Maybe Text
snapshotClusterIdentifier :: Maybe Text
publiclyAccessible :: Maybe Bool
snapshotScheduleIdentifier :: Maybe Text
additionalInfo :: Maybe Text
enhancedVpcRouting :: Maybe Bool
manualSnapshotRetentionPeriod :: Maybe Int
$sel:snapshotIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Text
$sel:clusterIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Text
$sel:port:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
$sel:clusterParameterGroupName:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:allowVersionUpgrade:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
$sel:nodeType:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:ownerAccount:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:availabilityZoneRelocation:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
$sel:iamRoles:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe [Text]
$sel:vpcSecurityGroupIds:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe [Text]
$sel:availabilityZone:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:kmsKeyId:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:preferredMaintenanceWindow:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:elasticIp:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:numberOfNodes:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
$sel:hsmClientCertificateIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:clusterSubnetGroupName:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:automatedSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
$sel:clusterSecurityGroups:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe [Text]
$sel:aquaConfigurationStatus:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe AquaConfigurationStatus
$sel:hsmConfigurationIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:maintenanceTrackName:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:snapshotClusterIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:publiclyAccessible:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
$sel:snapshotScheduleIdentifier:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:additionalInfo:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Text
$sel:enhancedVpcRouting:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Bool
$sel:manualSnapshotRetentionPeriod:RestoreFromClusterSnapshot' :: RestoreFromClusterSnapshot -> Maybe Int
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"RestoreFromClusterSnapshot" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"ManualSnapshotRetentionPeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
manualSnapshotRetentionPeriod,
        ByteString
"EnhancedVpcRouting" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enhancedVpcRouting,
        ByteString
"AdditionalInfo" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
additionalInfo,
        ByteString
"SnapshotScheduleIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotScheduleIdentifier,
        ByteString
"PubliclyAccessible" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
publiclyAccessible,
        ByteString
"SnapshotClusterIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotClusterIdentifier,
        ByteString
"MaintenanceTrackName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
maintenanceTrackName,
        ByteString
"HsmConfigurationIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
hsmConfigurationIdentifier,
        ByteString
"AquaConfigurationStatus"
          ByteString -> Maybe AquaConfigurationStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe AquaConfigurationStatus
aquaConfigurationStatus,
        ByteString
"ClusterSecurityGroups"
          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
"ClusterSecurityGroupName"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
clusterSecurityGroups
            ),
        ByteString
"AutomatedSnapshotRetentionPeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
automatedSnapshotRetentionPeriod,
        ByteString
"ClusterSubnetGroupName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clusterSubnetGroupName,
        ByteString
"HsmClientCertificateIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
hsmClientCertificateIdentifier,
        ByteString
"NumberOfNodes" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
numberOfNodes,
        ByteString
"ElasticIp" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
elasticIp,
        ByteString
"PreferredMaintenanceWindow"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"KmsKeyId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
kmsKeyId,
        ByteString
"AvailabilityZone" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
availabilityZone,
        ByteString
"VpcSecurityGroupIds"
          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
"VpcSecurityGroupId"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
vpcSecurityGroupIds
            ),
        ByteString
"IamRoles"
          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
"IamRoleArn" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
iamRoles),
        ByteString
"AvailabilityZoneRelocation"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
availabilityZoneRelocation,
        ByteString
"OwnerAccount" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
ownerAccount,
        ByteString
"NodeType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nodeType,
        ByteString
"AllowVersionUpgrade" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
allowVersionUpgrade,
        ByteString
"ClusterParameterGroupName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clusterParameterGroupName,
        ByteString
"Port" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
port,
        ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier,
        ByteString
"SnapshotIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
snapshotIdentifier
      ]

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

-- |
-- Create a value of 'RestoreFromClusterSnapshotResponse' 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:
--
-- 'cluster', 'restoreFromClusterSnapshotResponse_cluster' - Undocumented member.
--
-- 'httpStatus', 'restoreFromClusterSnapshotResponse_httpStatus' - The response's http status code.
newRestoreFromClusterSnapshotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RestoreFromClusterSnapshotResponse
newRestoreFromClusterSnapshotResponse :: Int -> RestoreFromClusterSnapshotResponse
newRestoreFromClusterSnapshotResponse Int
pHttpStatus_ =
  RestoreFromClusterSnapshotResponse' :: Maybe Cluster -> Int -> RestoreFromClusterSnapshotResponse
RestoreFromClusterSnapshotResponse'
    { $sel:cluster:RestoreFromClusterSnapshotResponse' :: Maybe Cluster
cluster =
        Maybe Cluster
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RestoreFromClusterSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
restoreFromClusterSnapshotResponse_cluster :: Lens.Lens' RestoreFromClusterSnapshotResponse (Prelude.Maybe Cluster)
restoreFromClusterSnapshotResponse_cluster :: (Maybe Cluster -> f (Maybe Cluster))
-> RestoreFromClusterSnapshotResponse
-> f RestoreFromClusterSnapshotResponse
restoreFromClusterSnapshotResponse_cluster = (RestoreFromClusterSnapshotResponse -> Maybe Cluster)
-> (RestoreFromClusterSnapshotResponse
    -> Maybe Cluster -> RestoreFromClusterSnapshotResponse)
-> Lens
     RestoreFromClusterSnapshotResponse
     RestoreFromClusterSnapshotResponse
     (Maybe Cluster)
     (Maybe Cluster)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreFromClusterSnapshotResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:RestoreFromClusterSnapshotResponse' :: RestoreFromClusterSnapshotResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: RestoreFromClusterSnapshotResponse
s@RestoreFromClusterSnapshotResponse' {} Maybe Cluster
a -> RestoreFromClusterSnapshotResponse
s {$sel:cluster:RestoreFromClusterSnapshotResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: RestoreFromClusterSnapshotResponse)

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

instance
  Prelude.NFData
    RestoreFromClusterSnapshotResponse