{-# 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.ModifyCluster
-- 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)
--
-- Modifies the settings for a cluster.
--
-- You can also change node type and the number of nodes to scale up or
-- down the cluster. When resizing a cluster, you must specify both the
-- number of nodes and the node type even if one of the parameters does not
-- change.
--
-- You can add another security or parameter group, or change the admin
-- user password. Resetting a cluster password or modifying the security
-- groups associated with a cluster do not need a reboot. However,
-- modifying a parameter group requires a reboot for parameters to take
-- effect. For more information about managing clusters, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html Amazon Redshift Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
module Amazonka.Redshift.ModifyCluster
  ( -- * Creating a Request
    ModifyCluster (..),
    newModifyCluster,

    -- * Request Lenses
    modifyCluster_manualSnapshotRetentionPeriod,
    modifyCluster_enhancedVpcRouting,
    modifyCluster_masterUserPassword,
    modifyCluster_publiclyAccessible,
    modifyCluster_maintenanceTrackName,
    modifyCluster_hsmConfigurationIdentifier,
    modifyCluster_clusterSecurityGroups,
    modifyCluster_automatedSnapshotRetentionPeriod,
    modifyCluster_encrypted,
    modifyCluster_hsmClientCertificateIdentifier,
    modifyCluster_numberOfNodes,
    modifyCluster_elasticIp,
    modifyCluster_preferredMaintenanceWindow,
    modifyCluster_kmsKeyId,
    modifyCluster_availabilityZone,
    modifyCluster_vpcSecurityGroupIds,
    modifyCluster_clusterType,
    modifyCluster_newClusterIdentifier,
    modifyCluster_availabilityZoneRelocation,
    modifyCluster_clusterVersion,
    modifyCluster_nodeType,
    modifyCluster_allowVersionUpgrade,
    modifyCluster_clusterParameterGroupName,
    modifyCluster_port,
    modifyCluster_clusterIdentifier,

    -- * Destructuring the Response
    ModifyClusterResponse (..),
    newModifyClusterResponse,

    -- * Response Lenses
    modifyClusterResponse_cluster,
    modifyClusterResponse_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:/ 'newModifyCluster' smart constructor.
data ModifyCluster = ModifyCluster'
  { -- | The default for number of days that a newly created manual snapshot is
    -- retained. If the value is -1, the manual snapshot is retained
    -- indefinitely. This value doesn\'t retroactively change the retention
    -- periods of existing manual snapshots.
    --
    -- The value must be either -1 or an integer between 1 and 3,653.
    --
    -- The default value is -1.
    ModifyCluster -> 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
    ModifyCluster -> Maybe Bool
enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,
    -- | The new password for the cluster admin user. This change is
    -- asynchronously applied as soon as possible. Between the time of the
    -- request and the completion of the request, the @MasterUserPassword@
    -- element exists in the @PendingModifiedValues@ element of the operation
    -- response.
    --
    -- Operations never return the password, so this operation provides a way
    -- to regain access to the admin user account for a cluster if the password
    -- is lost.
    --
    -- Default: Uses existing setting.
    --
    -- Constraints:
    --
    -- -   Must be between 8 and 64 characters in length.
    --
    -- -   Must contain at least one uppercase letter.
    --
    -- -   Must contain at least one lowercase letter.
    --
    -- -   Must contain one number.
    --
    -- -   Can be any printable ASCII character (ASCII code 33 to 126) except
    --     \' (single quote), \" (double quote), \\, \/, \@, or space.
    ModifyCluster -> Maybe Text
masterUserPassword :: Prelude.Maybe Prelude.Text,
    -- | If @true@, the cluster can be accessed from a public network. Only
    -- clusters in VPCs can be set to be publicly available.
    ModifyCluster -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | The name for the maintenance track that you want to assign for the
    -- cluster. This name change is asynchronous. The new track name stays in
    -- the @PendingModifiedValues@ for the cluster until the next maintenance
    -- window. When the maintenance track changes, the cluster is switched to
    -- the latest cluster release available for the maintenance track. At this
    -- point, the maintenance track name is applied.
    ModifyCluster -> 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.
    ModifyCluster -> Maybe Text
hsmConfigurationIdentifier :: Prelude.Maybe Prelude.Text,
    -- | A list of cluster security groups to be authorized on this cluster. This
    -- change is asynchronously applied as soon as possible.
    --
    -- Security groups currently associated with the cluster, and not in the
    -- list of groups to apply, will be revoked from the cluster.
    --
    -- 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
    ModifyCluster -> 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.
    --
    -- If you decrease the automated snapshot retention period from its current
    -- value, existing automated snapshots that fall outside of the new
    -- retention period will be immediately deleted.
    --
    -- You can\'t disable automated snapshots for RA3 node types. Set the
    -- automated retention period from 1-35 days.
    --
    -- Default: Uses existing setting.
    --
    -- Constraints: Must be a value from 0 to 35.
    ModifyCluster -> Maybe Int
automatedSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | Indicates whether the cluster is encrypted. If the value is encrypted
    -- (true) and you provide a value for the @KmsKeyId@ parameter, we encrypt
    -- the cluster with the provided @KmsKeyId@. If you don\'t provide a
    -- @KmsKeyId@, we encrypt with the default key.
    --
    -- If the value is not encrypted (false), then the cluster is decrypted.
    ModifyCluster -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the name of the HSM client certificate the Amazon Redshift
    -- cluster uses to retrieve the data encryption keys stored in an HSM.
    ModifyCluster -> Maybe Text
hsmClientCertificateIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The new number of nodes of the cluster. If you specify a new number of
    -- nodes, you must also specify the node type parameter.
    --
    -- For more information about resizing clusters, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html Resizing Clusters in Amazon Redshift>
    -- in the /Amazon Redshift Cluster Management Guide/.
    --
    -- Valid Values: Integer greater than @0@.
    ModifyCluster -> Maybe Int
numberOfNodes :: Prelude.Maybe Prelude.Int,
    -- | The Elastic IP (EIP) address for the cluster.
    --
    -- Constraints: The cluster must be provisioned in EC2-VPC and
    -- publicly-accessible through an Internet gateway. For more information
    -- about provisioning clusters in EC2-VPC, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms Supported Platforms to Launch Your Cluster>
    -- in the Amazon Redshift Cluster Management Guide.
    ModifyCluster -> Maybe Text
elasticIp :: Prelude.Maybe Prelude.Text,
    -- | The weekly time range (in UTC) during which system maintenance can
    -- occur, if necessary. If system maintenance is necessary during the
    -- window, it may result in an outage.
    --
    -- This maintenance window change is made immediately. If the new
    -- maintenance window indicates the current time, there must be at least
    -- 120 minutes between the current time and end of the window in order to
    -- ensure that pending changes are applied.
    --
    -- Default: Uses existing setting.
    --
    -- Format: ddd:hh24:mi-ddd:hh24:mi, for example @wed:07:30-wed:08:00@.
    --
    -- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
    --
    -- Constraints: Must be at least 30 minutes.
    ModifyCluster -> 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.
    ModifyCluster -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The option to initiate relocation for an Amazon Redshift cluster to the
    -- target Availability Zone.
    ModifyCluster -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | A list of virtual private cloud (VPC) security groups to be associated
    -- with the cluster. This change is asynchronously applied as soon as
    -- possible.
    ModifyCluster -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The new cluster type.
    --
    -- When you submit your cluster resize request, your existing cluster goes
    -- into a read-only mode. After Amazon Redshift provisions a new cluster
    -- based on your resize requirements, there will be outage for a period
    -- while the old cluster is deleted and your connection is switched to the
    -- new cluster. You can use DescribeResize to track the progress of the
    -- resize request.
    --
    -- Valid Values: @ multi-node | single-node @
    ModifyCluster -> Maybe Text
clusterType :: Prelude.Maybe Prelude.Text,
    -- | The new identifier for the cluster.
    --
    -- 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.
    --
    -- Example: @examplecluster@
    ModifyCluster -> Maybe Text
newClusterIdentifier' :: Prelude.Maybe Prelude.Text,
    -- | The option to enable relocation for an Amazon Redshift cluster between
    -- Availability Zones after the cluster modification is complete.
    ModifyCluster -> Maybe Bool
availabilityZoneRelocation :: Prelude.Maybe Prelude.Bool,
    -- | The new version number of the Amazon Redshift engine to upgrade to.
    --
    -- For major version upgrades, if a non-default cluster parameter group is
    -- currently in use, a new cluster parameter group in the cluster parameter
    -- group family for the new version must be specified. The new cluster
    -- parameter group can be the default for that cluster parameter group
    -- family. For more information about parameters and parameter groups, go
    -- to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Amazon Redshift Parameter Groups>
    -- in the /Amazon Redshift Cluster Management Guide/.
    --
    -- Example: @1.0@
    ModifyCluster -> Maybe Text
clusterVersion :: Prelude.Maybe Prelude.Text,
    -- | The new node type of the cluster. If you specify a new node type, you
    -- must also specify the number of nodes parameter.
    --
    -- For more information about resizing clusters, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html Resizing Clusters in Amazon Redshift>
    -- in the /Amazon Redshift Cluster Management Guide/.
    --
    -- Valid Values: @ds2.xlarge@ | @ds2.8xlarge@ | @dc1.large@ | @dc1.8xlarge@
    -- | @dc2.large@ | @dc2.8xlarge@ | @ra3.xlplus@ | @ra3.4xlarge@ |
    -- @ra3.16xlarge@
    ModifyCluster -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text,
    -- | If @true@, major version upgrades will be applied automatically to the
    -- cluster during the maintenance window.
    --
    -- Default: @false@
    ModifyCluster -> Maybe Bool
allowVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The name of the cluster parameter group to apply to this cluster. This
    -- change is applied only after the cluster is rebooted. To reboot a
    -- cluster use RebootCluster.
    --
    -- Default: Uses existing setting.
    --
    -- Constraints: The cluster parameter group must be in the same parameter
    -- group family that matches the cluster version.
    ModifyCluster -> Maybe Text
clusterParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | The option to change the port of an Amazon Redshift cluster.
    ModifyCluster -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The unique identifier of the cluster to be modified.
    --
    -- Example: @examplecluster@
    ModifyCluster -> Text
clusterIdentifier :: Prelude.Text
  }
  deriving (ModifyCluster -> ModifyCluster -> Bool
(ModifyCluster -> ModifyCluster -> Bool)
-> (ModifyCluster -> ModifyCluster -> Bool) -> Eq ModifyCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyCluster -> ModifyCluster -> Bool
$c/= :: ModifyCluster -> ModifyCluster -> Bool
== :: ModifyCluster -> ModifyCluster -> Bool
$c== :: ModifyCluster -> ModifyCluster -> Bool
Prelude.Eq, ReadPrec [ModifyCluster]
ReadPrec ModifyCluster
Int -> ReadS ModifyCluster
ReadS [ModifyCluster]
(Int -> ReadS ModifyCluster)
-> ReadS [ModifyCluster]
-> ReadPrec ModifyCluster
-> ReadPrec [ModifyCluster]
-> Read ModifyCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyCluster]
$creadListPrec :: ReadPrec [ModifyCluster]
readPrec :: ReadPrec ModifyCluster
$creadPrec :: ReadPrec ModifyCluster
readList :: ReadS [ModifyCluster]
$creadList :: ReadS [ModifyCluster]
readsPrec :: Int -> ReadS ModifyCluster
$creadsPrec :: Int -> ReadS ModifyCluster
Prelude.Read, Int -> ModifyCluster -> ShowS
[ModifyCluster] -> ShowS
ModifyCluster -> String
(Int -> ModifyCluster -> ShowS)
-> (ModifyCluster -> String)
-> ([ModifyCluster] -> ShowS)
-> Show ModifyCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyCluster] -> ShowS
$cshowList :: [ModifyCluster] -> ShowS
show :: ModifyCluster -> String
$cshow :: ModifyCluster -> String
showsPrec :: Int -> ModifyCluster -> ShowS
$cshowsPrec :: Int -> ModifyCluster -> ShowS
Prelude.Show, (forall x. ModifyCluster -> Rep ModifyCluster x)
-> (forall x. Rep ModifyCluster x -> ModifyCluster)
-> Generic ModifyCluster
forall x. Rep ModifyCluster x -> ModifyCluster
forall x. ModifyCluster -> Rep ModifyCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyCluster x -> ModifyCluster
$cfrom :: forall x. ModifyCluster -> Rep ModifyCluster x
Prelude.Generic)

-- |
-- Create a value of 'ModifyCluster' 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', 'modifyCluster_manualSnapshotRetentionPeriod' - The default for number of days that a newly created manual snapshot is
-- retained. If the value is -1, the manual snapshot is retained
-- indefinitely. This value doesn\'t retroactively change the retention
-- periods of existing manual snapshots.
--
-- The value must be either -1 or an integer between 1 and 3,653.
--
-- The default value is -1.
--
-- 'enhancedVpcRouting', 'modifyCluster_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
--
-- 'masterUserPassword', 'modifyCluster_masterUserPassword' - The new password for the cluster admin user. This change is
-- asynchronously applied as soon as possible. Between the time of the
-- request and the completion of the request, the @MasterUserPassword@
-- element exists in the @PendingModifiedValues@ element of the operation
-- response.
--
-- Operations never return the password, so this operation provides a way
-- to regain access to the admin user account for a cluster if the password
-- is lost.
--
-- Default: Uses existing setting.
--
-- Constraints:
--
-- -   Must be between 8 and 64 characters in length.
--
-- -   Must contain at least one uppercase letter.
--
-- -   Must contain at least one lowercase letter.
--
-- -   Must contain one number.
--
-- -   Can be any printable ASCII character (ASCII code 33 to 126) except
--     \' (single quote), \" (double quote), \\, \/, \@, or space.
--
-- 'publiclyAccessible', 'modifyCluster_publiclyAccessible' - If @true@, the cluster can be accessed from a public network. Only
-- clusters in VPCs can be set to be publicly available.
--
-- 'maintenanceTrackName', 'modifyCluster_maintenanceTrackName' - The name for the maintenance track that you want to assign for the
-- cluster. This name change is asynchronous. The new track name stays in
-- the @PendingModifiedValues@ for the cluster until the next maintenance
-- window. When the maintenance track changes, the cluster is switched to
-- the latest cluster release available for the maintenance track. At this
-- point, the maintenance track name is applied.
--
-- 'hsmConfigurationIdentifier', 'modifyCluster_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.
--
-- 'clusterSecurityGroups', 'modifyCluster_clusterSecurityGroups' - A list of cluster security groups to be authorized on this cluster. This
-- change is asynchronously applied as soon as possible.
--
-- Security groups currently associated with the cluster, and not in the
-- list of groups to apply, will be revoked from the cluster.
--
-- 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
--
-- 'automatedSnapshotRetentionPeriod', 'modifyCluster_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.
--
-- If you decrease the automated snapshot retention period from its current
-- value, existing automated snapshots that fall outside of the new
-- retention period will be immediately deleted.
--
-- You can\'t disable automated snapshots for RA3 node types. Set the
-- automated retention period from 1-35 days.
--
-- Default: Uses existing setting.
--
-- Constraints: Must be a value from 0 to 35.
--
-- 'encrypted', 'modifyCluster_encrypted' - Indicates whether the cluster is encrypted. If the value is encrypted
-- (true) and you provide a value for the @KmsKeyId@ parameter, we encrypt
-- the cluster with the provided @KmsKeyId@. If you don\'t provide a
-- @KmsKeyId@, we encrypt with the default key.
--
-- If the value is not encrypted (false), then the cluster is decrypted.
--
-- 'hsmClientCertificateIdentifier', 'modifyCluster_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', 'modifyCluster_numberOfNodes' - The new number of nodes of the cluster. If you specify a new number of
-- nodes, you must also specify the node type parameter.
--
-- For more information about resizing clusters, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html Resizing Clusters in Amazon Redshift>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Valid Values: Integer greater than @0@.
--
-- 'elasticIp', 'modifyCluster_elasticIp' - The Elastic IP (EIP) address for the cluster.
--
-- Constraints: The cluster must be provisioned in EC2-VPC and
-- publicly-accessible through an Internet gateway. For more information
-- about provisioning clusters in EC2-VPC, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms Supported Platforms to Launch Your Cluster>
-- in the Amazon Redshift Cluster Management Guide.
--
-- 'preferredMaintenanceWindow', 'modifyCluster_preferredMaintenanceWindow' - The weekly time range (in UTC) during which system maintenance can
-- occur, if necessary. If system maintenance is necessary during the
-- window, it may result in an outage.
--
-- This maintenance window change is made immediately. If the new
-- maintenance window indicates the current time, there must be at least
-- 120 minutes between the current time and end of the window in order to
-- ensure that pending changes are applied.
--
-- Default: Uses existing setting.
--
-- Format: ddd:hh24:mi-ddd:hh24:mi, for example @wed:07:30-wed:08:00@.
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Must be at least 30 minutes.
--
-- 'kmsKeyId', 'modifyCluster_kmsKeyId' - The Key Management Service (KMS) key ID of the encryption key that you
-- want to use to encrypt data in the cluster.
--
-- 'availabilityZone', 'modifyCluster_availabilityZone' - The option to initiate relocation for an Amazon Redshift cluster to the
-- target Availability Zone.
--
-- 'vpcSecurityGroupIds', 'modifyCluster_vpcSecurityGroupIds' - A list of virtual private cloud (VPC) security groups to be associated
-- with the cluster. This change is asynchronously applied as soon as
-- possible.
--
-- 'clusterType', 'modifyCluster_clusterType' - The new cluster type.
--
-- When you submit your cluster resize request, your existing cluster goes
-- into a read-only mode. After Amazon Redshift provisions a new cluster
-- based on your resize requirements, there will be outage for a period
-- while the old cluster is deleted and your connection is switched to the
-- new cluster. You can use DescribeResize to track the progress of the
-- resize request.
--
-- Valid Values: @ multi-node | single-node @
--
-- 'newClusterIdentifier'', 'modifyCluster_newClusterIdentifier' - The new identifier for the cluster.
--
-- 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.
--
-- Example: @examplecluster@
--
-- 'availabilityZoneRelocation', 'modifyCluster_availabilityZoneRelocation' - The option to enable relocation for an Amazon Redshift cluster between
-- Availability Zones after the cluster modification is complete.
--
-- 'clusterVersion', 'modifyCluster_clusterVersion' - The new version number of the Amazon Redshift engine to upgrade to.
--
-- For major version upgrades, if a non-default cluster parameter group is
-- currently in use, a new cluster parameter group in the cluster parameter
-- group family for the new version must be specified. The new cluster
-- parameter group can be the default for that cluster parameter group
-- family. For more information about parameters and parameter groups, go
-- to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Amazon Redshift Parameter Groups>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Example: @1.0@
--
-- 'nodeType', 'modifyCluster_nodeType' - The new node type of the cluster. If you specify a new node type, you
-- must also specify the number of nodes parameter.
--
-- For more information about resizing clusters, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html Resizing Clusters in Amazon Redshift>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Valid Values: @ds2.xlarge@ | @ds2.8xlarge@ | @dc1.large@ | @dc1.8xlarge@
-- | @dc2.large@ | @dc2.8xlarge@ | @ra3.xlplus@ | @ra3.4xlarge@ |
-- @ra3.16xlarge@
--
-- 'allowVersionUpgrade', 'modifyCluster_allowVersionUpgrade' - If @true@, major version upgrades will be applied automatically to the
-- cluster during the maintenance window.
--
-- Default: @false@
--
-- 'clusterParameterGroupName', 'modifyCluster_clusterParameterGroupName' - The name of the cluster parameter group to apply to this cluster. This
-- change is applied only after the cluster is rebooted. To reboot a
-- cluster use RebootCluster.
--
-- Default: Uses existing setting.
--
-- Constraints: The cluster parameter group must be in the same parameter
-- group family that matches the cluster version.
--
-- 'port', 'modifyCluster_port' - The option to change the port of an Amazon Redshift cluster.
--
-- 'clusterIdentifier', 'modifyCluster_clusterIdentifier' - The unique identifier of the cluster to be modified.
--
-- Example: @examplecluster@
newModifyCluster ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  ModifyCluster
newModifyCluster :: Text -> ModifyCluster
newModifyCluster Text
pClusterIdentifier_ =
  ModifyCluster' :: Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> 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
-> ModifyCluster
ModifyCluster'
    { $sel:manualSnapshotRetentionPeriod:ModifyCluster' :: Maybe Int
manualSnapshotRetentionPeriod =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:enhancedVpcRouting:ModifyCluster' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:masterUserPassword:ModifyCluster' :: Maybe Text
masterUserPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publiclyAccessible:ModifyCluster' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maintenanceTrackName:ModifyCluster' :: Maybe Text
maintenanceTrackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hsmConfigurationIdentifier:ModifyCluster' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterSecurityGroups:ModifyCluster' :: Maybe [Text]
clusterSecurityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:automatedSnapshotRetentionPeriod:ModifyCluster' :: Maybe Int
automatedSnapshotRetentionPeriod = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:encrypted:ModifyCluster' :: Maybe Bool
encrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:hsmClientCertificateIdentifier:ModifyCluster' :: Maybe Text
hsmClientCertificateIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfNodes:ModifyCluster' :: Maybe Int
numberOfNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:elasticIp:ModifyCluster' :: Maybe Text
elasticIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:ModifyCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:ModifyCluster' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:ModifyCluster' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSecurityGroupIds:ModifyCluster' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterType:ModifyCluster' :: Maybe Text
clusterType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:newClusterIdentifier':ModifyCluster' :: Maybe Text
newClusterIdentifier' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZoneRelocation:ModifyCluster' :: Maybe Bool
availabilityZoneRelocation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterVersion:ModifyCluster' :: Maybe Text
clusterVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeType:ModifyCluster' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:allowVersionUpgrade:ModifyCluster' :: Maybe Bool
allowVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterParameterGroupName:ModifyCluster' :: Maybe Text
clusterParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:ModifyCluster' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterIdentifier:ModifyCluster' :: Text
clusterIdentifier = Text
pClusterIdentifier_
    }

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

-- | 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
modifyCluster_enhancedVpcRouting :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Bool)
modifyCluster_enhancedVpcRouting :: (Maybe Bool -> f (Maybe Bool)) -> ModifyCluster -> f ModifyCluster
modifyCluster_enhancedVpcRouting = (ModifyCluster -> Maybe Bool)
-> (ModifyCluster -> Maybe Bool -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Bool
enhancedVpcRouting :: Maybe Bool
$sel:enhancedVpcRouting:ModifyCluster' :: ModifyCluster -> Maybe Bool
enhancedVpcRouting} -> Maybe Bool
enhancedVpcRouting) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Bool
a -> ModifyCluster
s {$sel:enhancedVpcRouting:ModifyCluster' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
a} :: ModifyCluster)

-- | The new password for the cluster admin user. This change is
-- asynchronously applied as soon as possible. Between the time of the
-- request and the completion of the request, the @MasterUserPassword@
-- element exists in the @PendingModifiedValues@ element of the operation
-- response.
--
-- Operations never return the password, so this operation provides a way
-- to regain access to the admin user account for a cluster if the password
-- is lost.
--
-- Default: Uses existing setting.
--
-- Constraints:
--
-- -   Must be between 8 and 64 characters in length.
--
-- -   Must contain at least one uppercase letter.
--
-- -   Must contain at least one lowercase letter.
--
-- -   Must contain one number.
--
-- -   Can be any printable ASCII character (ASCII code 33 to 126) except
--     \' (single quote), \" (double quote), \\, \/, \@, or space.
modifyCluster_masterUserPassword :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_masterUserPassword :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_masterUserPassword = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
masterUserPassword :: Maybe Text
$sel:masterUserPassword:ModifyCluster' :: ModifyCluster -> Maybe Text
masterUserPassword} -> Maybe Text
masterUserPassword) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:masterUserPassword:ModifyCluster' :: Maybe Text
masterUserPassword = Maybe Text
a} :: ModifyCluster)

-- | If @true@, the cluster can be accessed from a public network. Only
-- clusters in VPCs can be set to be publicly available.
modifyCluster_publiclyAccessible :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Bool)
modifyCluster_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool)) -> ModifyCluster -> f ModifyCluster
modifyCluster_publiclyAccessible = (ModifyCluster -> Maybe Bool)
-> (ModifyCluster -> Maybe Bool -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:ModifyCluster' :: ModifyCluster -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Bool
a -> ModifyCluster
s {$sel:publiclyAccessible:ModifyCluster' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: ModifyCluster)

-- | The name for the maintenance track that you want to assign for the
-- cluster. This name change is asynchronous. The new track name stays in
-- the @PendingModifiedValues@ for the cluster until the next maintenance
-- window. When the maintenance track changes, the cluster is switched to
-- the latest cluster release available for the maintenance track. At this
-- point, the maintenance track name is applied.
modifyCluster_maintenanceTrackName :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_maintenanceTrackName :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_maintenanceTrackName = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
maintenanceTrackName :: Maybe Text
$sel:maintenanceTrackName:ModifyCluster' :: ModifyCluster -> Maybe Text
maintenanceTrackName} -> Maybe Text
maintenanceTrackName) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:maintenanceTrackName:ModifyCluster' :: Maybe Text
maintenanceTrackName = Maybe Text
a} :: ModifyCluster)

-- | 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.
modifyCluster_hsmConfigurationIdentifier :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_hsmConfigurationIdentifier :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_hsmConfigurationIdentifier = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
hsmConfigurationIdentifier :: Maybe Text
$sel:hsmConfigurationIdentifier:ModifyCluster' :: ModifyCluster -> Maybe Text
hsmConfigurationIdentifier} -> Maybe Text
hsmConfigurationIdentifier) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:hsmConfigurationIdentifier:ModifyCluster' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
a} :: ModifyCluster)

-- | A list of cluster security groups to be authorized on this cluster. This
-- change is asynchronously applied as soon as possible.
--
-- Security groups currently associated with the cluster, and not in the
-- list of groups to apply, will be revoked from the cluster.
--
-- 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
modifyCluster_clusterSecurityGroups :: Lens.Lens' ModifyCluster (Prelude.Maybe [Prelude.Text])
modifyCluster_clusterSecurityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyCluster -> f ModifyCluster
modifyCluster_clusterSecurityGroups = (ModifyCluster -> Maybe [Text])
-> (ModifyCluster -> Maybe [Text] -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe [Text]
clusterSecurityGroups :: Maybe [Text]
$sel:clusterSecurityGroups:ModifyCluster' :: ModifyCluster -> Maybe [Text]
clusterSecurityGroups} -> Maybe [Text]
clusterSecurityGroups) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe [Text]
a -> ModifyCluster
s {$sel:clusterSecurityGroups:ModifyCluster' :: Maybe [Text]
clusterSecurityGroups = Maybe [Text]
a} :: ModifyCluster) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyCluster -> f ModifyCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyCluster
-> f ModifyCluster
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.
--
-- If you decrease the automated snapshot retention period from its current
-- value, existing automated snapshots that fall outside of the new
-- retention period will be immediately deleted.
--
-- You can\'t disable automated snapshots for RA3 node types. Set the
-- automated retention period from 1-35 days.
--
-- Default: Uses existing setting.
--
-- Constraints: Must be a value from 0 to 35.
modifyCluster_automatedSnapshotRetentionPeriod :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Int)
modifyCluster_automatedSnapshotRetentionPeriod :: (Maybe Int -> f (Maybe Int)) -> ModifyCluster -> f ModifyCluster
modifyCluster_automatedSnapshotRetentionPeriod = (ModifyCluster -> Maybe Int)
-> (ModifyCluster -> Maybe Int -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Int
automatedSnapshotRetentionPeriod :: Maybe Int
$sel:automatedSnapshotRetentionPeriod:ModifyCluster' :: ModifyCluster -> Maybe Int
automatedSnapshotRetentionPeriod} -> Maybe Int
automatedSnapshotRetentionPeriod) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Int
a -> ModifyCluster
s {$sel:automatedSnapshotRetentionPeriod:ModifyCluster' :: Maybe Int
automatedSnapshotRetentionPeriod = Maybe Int
a} :: ModifyCluster)

-- | Indicates whether the cluster is encrypted. If the value is encrypted
-- (true) and you provide a value for the @KmsKeyId@ parameter, we encrypt
-- the cluster with the provided @KmsKeyId@. If you don\'t provide a
-- @KmsKeyId@, we encrypt with the default key.
--
-- If the value is not encrypted (false), then the cluster is decrypted.
modifyCluster_encrypted :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Bool)
modifyCluster_encrypted :: (Maybe Bool -> f (Maybe Bool)) -> ModifyCluster -> f ModifyCluster
modifyCluster_encrypted = (ModifyCluster -> Maybe Bool)
-> (ModifyCluster -> Maybe Bool -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:ModifyCluster' :: ModifyCluster -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Bool
a -> ModifyCluster
s {$sel:encrypted:ModifyCluster' :: Maybe Bool
encrypted = Maybe Bool
a} :: ModifyCluster)

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

-- | The new number of nodes of the cluster. If you specify a new number of
-- nodes, you must also specify the node type parameter.
--
-- For more information about resizing clusters, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html Resizing Clusters in Amazon Redshift>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Valid Values: Integer greater than @0@.
modifyCluster_numberOfNodes :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Int)
modifyCluster_numberOfNodes :: (Maybe Int -> f (Maybe Int)) -> ModifyCluster -> f ModifyCluster
modifyCluster_numberOfNodes = (ModifyCluster -> Maybe Int)
-> (ModifyCluster -> Maybe Int -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Int
numberOfNodes :: Maybe Int
$sel:numberOfNodes:ModifyCluster' :: ModifyCluster -> Maybe Int
numberOfNodes} -> Maybe Int
numberOfNodes) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Int
a -> ModifyCluster
s {$sel:numberOfNodes:ModifyCluster' :: Maybe Int
numberOfNodes = Maybe Int
a} :: ModifyCluster)

-- | The Elastic IP (EIP) address for the cluster.
--
-- Constraints: The cluster must be provisioned in EC2-VPC and
-- publicly-accessible through an Internet gateway. For more information
-- about provisioning clusters in EC2-VPC, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms Supported Platforms to Launch Your Cluster>
-- in the Amazon Redshift Cluster Management Guide.
modifyCluster_elasticIp :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_elasticIp :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_elasticIp = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
elasticIp :: Maybe Text
$sel:elasticIp:ModifyCluster' :: ModifyCluster -> Maybe Text
elasticIp} -> Maybe Text
elasticIp) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:elasticIp:ModifyCluster' :: Maybe Text
elasticIp = Maybe Text
a} :: ModifyCluster)

-- | The weekly time range (in UTC) during which system maintenance can
-- occur, if necessary. If system maintenance is necessary during the
-- window, it may result in an outage.
--
-- This maintenance window change is made immediately. If the new
-- maintenance window indicates the current time, there must be at least
-- 120 minutes between the current time and end of the window in order to
-- ensure that pending changes are applied.
--
-- Default: Uses existing setting.
--
-- Format: ddd:hh24:mi-ddd:hh24:mi, for example @wed:07:30-wed:08:00@.
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Must be at least 30 minutes.
modifyCluster_preferredMaintenanceWindow :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_preferredMaintenanceWindow = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:ModifyCluster' :: ModifyCluster -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:preferredMaintenanceWindow:ModifyCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: ModifyCluster)

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

-- | The option to initiate relocation for an Amazon Redshift cluster to the
-- target Availability Zone.
modifyCluster_availabilityZone :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_availabilityZone :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_availabilityZone = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:ModifyCluster' :: ModifyCluster -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:availabilityZone:ModifyCluster' :: Maybe Text
availabilityZone = Maybe Text
a} :: ModifyCluster)

-- | A list of virtual private cloud (VPC) security groups to be associated
-- with the cluster. This change is asynchronously applied as soon as
-- possible.
modifyCluster_vpcSecurityGroupIds :: Lens.Lens' ModifyCluster (Prelude.Maybe [Prelude.Text])
modifyCluster_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyCluster -> f ModifyCluster
modifyCluster_vpcSecurityGroupIds = (ModifyCluster -> Maybe [Text])
-> (ModifyCluster -> Maybe [Text] -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:ModifyCluster' :: ModifyCluster -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe [Text]
a -> ModifyCluster
s {$sel:vpcSecurityGroupIds:ModifyCluster' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: ModifyCluster) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyCluster -> f ModifyCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyCluster
-> f ModifyCluster
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 new cluster type.
--
-- When you submit your cluster resize request, your existing cluster goes
-- into a read-only mode. After Amazon Redshift provisions a new cluster
-- based on your resize requirements, there will be outage for a period
-- while the old cluster is deleted and your connection is switched to the
-- new cluster. You can use DescribeResize to track the progress of the
-- resize request.
--
-- Valid Values: @ multi-node | single-node @
modifyCluster_clusterType :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_clusterType :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_clusterType = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
clusterType :: Maybe Text
$sel:clusterType:ModifyCluster' :: ModifyCluster -> Maybe Text
clusterType} -> Maybe Text
clusterType) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:clusterType:ModifyCluster' :: Maybe Text
clusterType = Maybe Text
a} :: ModifyCluster)

-- | The new identifier for the cluster.
--
-- 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.
--
-- Example: @examplecluster@
modifyCluster_newClusterIdentifier :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_newClusterIdentifier :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_newClusterIdentifier = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
newClusterIdentifier' :: Maybe Text
$sel:newClusterIdentifier':ModifyCluster' :: ModifyCluster -> Maybe Text
newClusterIdentifier'} -> Maybe Text
newClusterIdentifier') (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:newClusterIdentifier':ModifyCluster' :: Maybe Text
newClusterIdentifier' = Maybe Text
a} :: ModifyCluster)

-- | The option to enable relocation for an Amazon Redshift cluster between
-- Availability Zones after the cluster modification is complete.
modifyCluster_availabilityZoneRelocation :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Bool)
modifyCluster_availabilityZoneRelocation :: (Maybe Bool -> f (Maybe Bool)) -> ModifyCluster -> f ModifyCluster
modifyCluster_availabilityZoneRelocation = (ModifyCluster -> Maybe Bool)
-> (ModifyCluster -> Maybe Bool -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Bool
availabilityZoneRelocation :: Maybe Bool
$sel:availabilityZoneRelocation:ModifyCluster' :: ModifyCluster -> Maybe Bool
availabilityZoneRelocation} -> Maybe Bool
availabilityZoneRelocation) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Bool
a -> ModifyCluster
s {$sel:availabilityZoneRelocation:ModifyCluster' :: Maybe Bool
availabilityZoneRelocation = Maybe Bool
a} :: ModifyCluster)

-- | The new version number of the Amazon Redshift engine to upgrade to.
--
-- For major version upgrades, if a non-default cluster parameter group is
-- currently in use, a new cluster parameter group in the cluster parameter
-- group family for the new version must be specified. The new cluster
-- parameter group can be the default for that cluster parameter group
-- family. For more information about parameters and parameter groups, go
-- to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Amazon Redshift Parameter Groups>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Example: @1.0@
modifyCluster_clusterVersion :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_clusterVersion :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_clusterVersion = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
clusterVersion :: Maybe Text
$sel:clusterVersion:ModifyCluster' :: ModifyCluster -> Maybe Text
clusterVersion} -> Maybe Text
clusterVersion) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:clusterVersion:ModifyCluster' :: Maybe Text
clusterVersion = Maybe Text
a} :: ModifyCluster)

-- | The new node type of the cluster. If you specify a new node type, you
-- must also specify the number of nodes parameter.
--
-- For more information about resizing clusters, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html Resizing Clusters in Amazon Redshift>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Valid Values: @ds2.xlarge@ | @ds2.8xlarge@ | @dc1.large@ | @dc1.8xlarge@
-- | @dc2.large@ | @dc2.8xlarge@ | @ra3.xlplus@ | @ra3.4xlarge@ |
-- @ra3.16xlarge@
modifyCluster_nodeType :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_nodeType :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_nodeType = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
nodeType :: Maybe Text
$sel:nodeType:ModifyCluster' :: ModifyCluster -> Maybe Text
nodeType} -> Maybe Text
nodeType) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:nodeType:ModifyCluster' :: Maybe Text
nodeType = Maybe Text
a} :: ModifyCluster)

-- | If @true@, major version upgrades will be applied automatically to the
-- cluster during the maintenance window.
--
-- Default: @false@
modifyCluster_allowVersionUpgrade :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Bool)
modifyCluster_allowVersionUpgrade :: (Maybe Bool -> f (Maybe Bool)) -> ModifyCluster -> f ModifyCluster
modifyCluster_allowVersionUpgrade = (ModifyCluster -> Maybe Bool)
-> (ModifyCluster -> Maybe Bool -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Bool
allowVersionUpgrade :: Maybe Bool
$sel:allowVersionUpgrade:ModifyCluster' :: ModifyCluster -> Maybe Bool
allowVersionUpgrade} -> Maybe Bool
allowVersionUpgrade) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Bool
a -> ModifyCluster
s {$sel:allowVersionUpgrade:ModifyCluster' :: Maybe Bool
allowVersionUpgrade = Maybe Bool
a} :: ModifyCluster)

-- | The name of the cluster parameter group to apply to this cluster. This
-- change is applied only after the cluster is rebooted. To reboot a
-- cluster use RebootCluster.
--
-- Default: Uses existing setting.
--
-- Constraints: The cluster parameter group must be in the same parameter
-- group family that matches the cluster version.
modifyCluster_clusterParameterGroupName :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Text)
modifyCluster_clusterParameterGroupName :: (Maybe Text -> f (Maybe Text)) -> ModifyCluster -> f ModifyCluster
modifyCluster_clusterParameterGroupName = (ModifyCluster -> Maybe Text)
-> (ModifyCluster -> Maybe Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Text
clusterParameterGroupName :: Maybe Text
$sel:clusterParameterGroupName:ModifyCluster' :: ModifyCluster -> Maybe Text
clusterParameterGroupName} -> Maybe Text
clusterParameterGroupName) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Text
a -> ModifyCluster
s {$sel:clusterParameterGroupName:ModifyCluster' :: Maybe Text
clusterParameterGroupName = Maybe Text
a} :: ModifyCluster)

-- | The option to change the port of an Amazon Redshift cluster.
modifyCluster_port :: Lens.Lens' ModifyCluster (Prelude.Maybe Prelude.Int)
modifyCluster_port :: (Maybe Int -> f (Maybe Int)) -> ModifyCluster -> f ModifyCluster
modifyCluster_port = (ModifyCluster -> Maybe Int)
-> (ModifyCluster -> Maybe Int -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Maybe Int
port :: Maybe Int
$sel:port:ModifyCluster' :: ModifyCluster -> Maybe Int
port} -> Maybe Int
port) (\s :: ModifyCluster
s@ModifyCluster' {} Maybe Int
a -> ModifyCluster
s {$sel:port:ModifyCluster' :: Maybe Int
port = Maybe Int
a} :: ModifyCluster)

-- | The unique identifier of the cluster to be modified.
--
-- Example: @examplecluster@
modifyCluster_clusterIdentifier :: Lens.Lens' ModifyCluster Prelude.Text
modifyCluster_clusterIdentifier :: (Text -> f Text) -> ModifyCluster -> f ModifyCluster
modifyCluster_clusterIdentifier = (ModifyCluster -> Text)
-> (ModifyCluster -> Text -> ModifyCluster)
-> Lens ModifyCluster ModifyCluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyCluster' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:ModifyCluster' :: ModifyCluster -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: ModifyCluster
s@ModifyCluster' {} Text
a -> ModifyCluster
s {$sel:clusterIdentifier:ModifyCluster' :: Text
clusterIdentifier = Text
a} :: ModifyCluster)

instance Core.AWSRequest ModifyCluster where
  type
    AWSResponse ModifyCluster =
      ModifyClusterResponse
  request :: ModifyCluster -> Request ModifyCluster
request = Service -> ModifyCluster -> Request ModifyCluster
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ModifyCluster)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyCluster))
-> Logger
-> Service
-> Proxy ModifyCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ModifyCluster)))
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
"ModifyClusterResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Cluster -> Int -> ModifyClusterResponse
ModifyClusterResponse'
            (Maybe Cluster -> Int -> ModifyClusterResponse)
-> Either String (Maybe Cluster)
-> Either String (Int -> ModifyClusterResponse)
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 -> ModifyClusterResponse)
-> Either String Int -> Either String ModifyClusterResponse
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 ModifyCluster

instance Prelude.NFData ModifyCluster

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

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

instance Core.ToQuery ModifyCluster where
  toQuery :: ModifyCluster -> QueryString
toQuery ModifyCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
Text
clusterIdentifier :: Text
port :: Maybe Int
clusterParameterGroupName :: Maybe Text
allowVersionUpgrade :: Maybe Bool
nodeType :: Maybe Text
clusterVersion :: Maybe Text
availabilityZoneRelocation :: Maybe Bool
newClusterIdentifier' :: Maybe Text
clusterType :: Maybe Text
vpcSecurityGroupIds :: Maybe [Text]
availabilityZone :: Maybe Text
kmsKeyId :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
elasticIp :: Maybe Text
numberOfNodes :: Maybe Int
hsmClientCertificateIdentifier :: Maybe Text
encrypted :: Maybe Bool
automatedSnapshotRetentionPeriod :: Maybe Int
clusterSecurityGroups :: Maybe [Text]
hsmConfigurationIdentifier :: Maybe Text
maintenanceTrackName :: Maybe Text
publiclyAccessible :: Maybe Bool
masterUserPassword :: Maybe Text
enhancedVpcRouting :: Maybe Bool
manualSnapshotRetentionPeriod :: Maybe Int
$sel:clusterIdentifier:ModifyCluster' :: ModifyCluster -> Text
$sel:port:ModifyCluster' :: ModifyCluster -> Maybe Int
$sel:clusterParameterGroupName:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:allowVersionUpgrade:ModifyCluster' :: ModifyCluster -> Maybe Bool
$sel:nodeType:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:clusterVersion:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:availabilityZoneRelocation:ModifyCluster' :: ModifyCluster -> Maybe Bool
$sel:newClusterIdentifier':ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:clusterType:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:vpcSecurityGroupIds:ModifyCluster' :: ModifyCluster -> Maybe [Text]
$sel:availabilityZone:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:kmsKeyId:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:preferredMaintenanceWindow:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:elasticIp:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:numberOfNodes:ModifyCluster' :: ModifyCluster -> Maybe Int
$sel:hsmClientCertificateIdentifier:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:encrypted:ModifyCluster' :: ModifyCluster -> Maybe Bool
$sel:automatedSnapshotRetentionPeriod:ModifyCluster' :: ModifyCluster -> Maybe Int
$sel:clusterSecurityGroups:ModifyCluster' :: ModifyCluster -> Maybe [Text]
$sel:hsmConfigurationIdentifier:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:maintenanceTrackName:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:publiclyAccessible:ModifyCluster' :: ModifyCluster -> Maybe Bool
$sel:masterUserPassword:ModifyCluster' :: ModifyCluster -> Maybe Text
$sel:enhancedVpcRouting:ModifyCluster' :: ModifyCluster -> Maybe Bool
$sel:manualSnapshotRetentionPeriod:ModifyCluster' :: ModifyCluster -> 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
"ModifyCluster" :: 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
"MasterUserPassword" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
masterUserPassword,
        ByteString
"PubliclyAccessible" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
publiclyAccessible,
        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
"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
"Encrypted" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
encrypted,
        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
"ClusterType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clusterType,
        ByteString
"NewClusterIdentifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
newClusterIdentifier',
        ByteString
"AvailabilityZoneRelocation"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
availabilityZoneRelocation,
        ByteString
"ClusterVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clusterVersion,
        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
      ]

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

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

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

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

instance Prelude.NFData ModifyClusterResponse