{-# 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.ElasticSearch.UpdateElasticsearchDomainConfig
-- 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 cluster configuration of the specified Elasticsearch
-- domain, setting as setting the instance type and the number of
-- instances.
module Amazonka.ElasticSearch.UpdateElasticsearchDomainConfig
  ( -- * Creating a Request
    UpdateElasticsearchDomainConfig (..),
    newUpdateElasticsearchDomainConfig,

    -- * Request Lenses
    updateElasticsearchDomainConfig_eBSOptions,
    updateElasticsearchDomainConfig_nodeToNodeEncryptionOptions,
    updateElasticsearchDomainConfig_accessPolicies,
    updateElasticsearchDomainConfig_autoTuneOptions,
    updateElasticsearchDomainConfig_logPublishingOptions,
    updateElasticsearchDomainConfig_advancedSecurityOptions,
    updateElasticsearchDomainConfig_elasticsearchClusterConfig,
    updateElasticsearchDomainConfig_snapshotOptions,
    updateElasticsearchDomainConfig_cognitoOptions,
    updateElasticsearchDomainConfig_encryptionAtRestOptions,
    updateElasticsearchDomainConfig_vPCOptions,
    updateElasticsearchDomainConfig_domainEndpointOptions,
    updateElasticsearchDomainConfig_advancedOptions,
    updateElasticsearchDomainConfig_domainName,

    -- * Destructuring the Response
    UpdateElasticsearchDomainConfigResponse (..),
    newUpdateElasticsearchDomainConfigResponse,

    -- * Response Lenses
    updateElasticsearchDomainConfigResponse_httpStatus,
    updateElasticsearchDomainConfigResponse_domainConfig,
  )
where

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

-- | Container for the parameters to the @UpdateElasticsearchDomain@
-- operation. Specifies the type and number of instances in the domain
-- cluster.
--
-- /See:/ 'newUpdateElasticsearchDomainConfig' smart constructor.
data UpdateElasticsearchDomainConfig = UpdateElasticsearchDomainConfig'
  { -- | Specify the type and size of the EBS volume that you want to use.
    UpdateElasticsearchDomainConfig -> Maybe EBSOptions
eBSOptions :: Prelude.Maybe EBSOptions,
    -- | Specifies the NodeToNodeEncryptionOptions.
    UpdateElasticsearchDomainConfig
-> Maybe NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions :: Prelude.Maybe NodeToNodeEncryptionOptions,
    -- | IAM access policy as a JSON-formatted string.
    UpdateElasticsearchDomainConfig -> Maybe Text
accessPolicies :: Prelude.Maybe Prelude.Text,
    -- | Specifies Auto-Tune options.
    UpdateElasticsearchDomainConfig -> Maybe AutoTuneOptions
autoTuneOptions :: Prelude.Maybe AutoTuneOptions,
    -- | Map of @LogType@ and @LogPublishingOption@, each containing options to
    -- publish a given type of Elasticsearch log.
    UpdateElasticsearchDomainConfig
-> Maybe (HashMap LogType LogPublishingOption)
logPublishingOptions :: Prelude.Maybe (Prelude.HashMap LogType LogPublishingOption),
    -- | Specifies advanced security options.
    UpdateElasticsearchDomainConfig
-> Maybe AdvancedSecurityOptionsInput
advancedSecurityOptions :: Prelude.Maybe AdvancedSecurityOptionsInput,
    -- | The type and number of instances to instantiate for the domain cluster.
    UpdateElasticsearchDomainConfig -> Maybe ElasticsearchClusterConfig
elasticsearchClusterConfig :: Prelude.Maybe ElasticsearchClusterConfig,
    -- | Option to set the time, in UTC format, for the daily automated snapshot.
    -- Default value is @0@ hours.
    UpdateElasticsearchDomainConfig -> Maybe SnapshotOptions
snapshotOptions :: Prelude.Maybe SnapshotOptions,
    -- | Options to specify the Cognito user and identity pools for Kibana
    -- authentication. For more information, see
    -- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html Amazon Cognito Authentication for Kibana>.
    UpdateElasticsearchDomainConfig -> Maybe CognitoOptions
cognitoOptions :: Prelude.Maybe CognitoOptions,
    -- | Specifies the Encryption At Rest Options.
    UpdateElasticsearchDomainConfig -> Maybe EncryptionAtRestOptions
encryptionAtRestOptions :: Prelude.Maybe EncryptionAtRestOptions,
    -- | Options to specify the subnets and security groups for VPC endpoint. For
    -- more information, see
    -- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc Creating a VPC>
    -- in /VPC Endpoints for Amazon Elasticsearch Service Domains/
    UpdateElasticsearchDomainConfig -> Maybe VPCOptions
vPCOptions :: Prelude.Maybe VPCOptions,
    -- | Options to specify configuration that will be applied to the domain
    -- endpoint.
    UpdateElasticsearchDomainConfig -> Maybe DomainEndpointOptions
domainEndpointOptions :: Prelude.Maybe DomainEndpointOptions,
    -- | Modifies the advanced option to allow references to indices in an HTTP
    -- request body. Must be @false@ when configuring access to individual
    -- sub-resources. By default, the value is @true@. See
    -- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options Configuration Advanced Options>
    -- for more information.
    UpdateElasticsearchDomainConfig -> Maybe (HashMap Text Text)
advancedOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the Elasticsearch domain that you are updating.
    UpdateElasticsearchDomainConfig -> Text
domainName :: Prelude.Text
  }
  deriving (UpdateElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfig -> Bool
(UpdateElasticsearchDomainConfig
 -> UpdateElasticsearchDomainConfig -> Bool)
-> (UpdateElasticsearchDomainConfig
    -> UpdateElasticsearchDomainConfig -> Bool)
-> Eq UpdateElasticsearchDomainConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfig -> Bool
$c/= :: UpdateElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfig -> Bool
== :: UpdateElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfig -> Bool
$c== :: UpdateElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfig -> Bool
Prelude.Eq, Int -> UpdateElasticsearchDomainConfig -> ShowS
[UpdateElasticsearchDomainConfig] -> ShowS
UpdateElasticsearchDomainConfig -> String
(Int -> UpdateElasticsearchDomainConfig -> ShowS)
-> (UpdateElasticsearchDomainConfig -> String)
-> ([UpdateElasticsearchDomainConfig] -> ShowS)
-> Show UpdateElasticsearchDomainConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateElasticsearchDomainConfig] -> ShowS
$cshowList :: [UpdateElasticsearchDomainConfig] -> ShowS
show :: UpdateElasticsearchDomainConfig -> String
$cshow :: UpdateElasticsearchDomainConfig -> String
showsPrec :: Int -> UpdateElasticsearchDomainConfig -> ShowS
$cshowsPrec :: Int -> UpdateElasticsearchDomainConfig -> ShowS
Prelude.Show, (forall x.
 UpdateElasticsearchDomainConfig
 -> Rep UpdateElasticsearchDomainConfig x)
-> (forall x.
    Rep UpdateElasticsearchDomainConfig x
    -> UpdateElasticsearchDomainConfig)
-> Generic UpdateElasticsearchDomainConfig
forall x.
Rep UpdateElasticsearchDomainConfig x
-> UpdateElasticsearchDomainConfig
forall x.
UpdateElasticsearchDomainConfig
-> Rep UpdateElasticsearchDomainConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateElasticsearchDomainConfig x
-> UpdateElasticsearchDomainConfig
$cfrom :: forall x.
UpdateElasticsearchDomainConfig
-> Rep UpdateElasticsearchDomainConfig x
Prelude.Generic)

-- |
-- Create a value of 'UpdateElasticsearchDomainConfig' 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:
--
-- 'eBSOptions', 'updateElasticsearchDomainConfig_eBSOptions' - Specify the type and size of the EBS volume that you want to use.
--
-- 'nodeToNodeEncryptionOptions', 'updateElasticsearchDomainConfig_nodeToNodeEncryptionOptions' - Specifies the NodeToNodeEncryptionOptions.
--
-- 'accessPolicies', 'updateElasticsearchDomainConfig_accessPolicies' - IAM access policy as a JSON-formatted string.
--
-- 'autoTuneOptions', 'updateElasticsearchDomainConfig_autoTuneOptions' - Specifies Auto-Tune options.
--
-- 'logPublishingOptions', 'updateElasticsearchDomainConfig_logPublishingOptions' - Map of @LogType@ and @LogPublishingOption@, each containing options to
-- publish a given type of Elasticsearch log.
--
-- 'advancedSecurityOptions', 'updateElasticsearchDomainConfig_advancedSecurityOptions' - Specifies advanced security options.
--
-- 'elasticsearchClusterConfig', 'updateElasticsearchDomainConfig_elasticsearchClusterConfig' - The type and number of instances to instantiate for the domain cluster.
--
-- 'snapshotOptions', 'updateElasticsearchDomainConfig_snapshotOptions' - Option to set the time, in UTC format, for the daily automated snapshot.
-- Default value is @0@ hours.
--
-- 'cognitoOptions', 'updateElasticsearchDomainConfig_cognitoOptions' - Options to specify the Cognito user and identity pools for Kibana
-- authentication. For more information, see
-- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html Amazon Cognito Authentication for Kibana>.
--
-- 'encryptionAtRestOptions', 'updateElasticsearchDomainConfig_encryptionAtRestOptions' - Specifies the Encryption At Rest Options.
--
-- 'vPCOptions', 'updateElasticsearchDomainConfig_vPCOptions' - Options to specify the subnets and security groups for VPC endpoint. For
-- more information, see
-- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc Creating a VPC>
-- in /VPC Endpoints for Amazon Elasticsearch Service Domains/
--
-- 'domainEndpointOptions', 'updateElasticsearchDomainConfig_domainEndpointOptions' - Options to specify configuration that will be applied to the domain
-- endpoint.
--
-- 'advancedOptions', 'updateElasticsearchDomainConfig_advancedOptions' - Modifies the advanced option to allow references to indices in an HTTP
-- request body. Must be @false@ when configuring access to individual
-- sub-resources. By default, the value is @true@. See
-- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options Configuration Advanced Options>
-- for more information.
--
-- 'domainName', 'updateElasticsearchDomainConfig_domainName' - The name of the Elasticsearch domain that you are updating.
newUpdateElasticsearchDomainConfig ::
  -- | 'domainName'
  Prelude.Text ->
  UpdateElasticsearchDomainConfig
newUpdateElasticsearchDomainConfig :: Text -> UpdateElasticsearchDomainConfig
newUpdateElasticsearchDomainConfig Text
pDomainName_ =
  UpdateElasticsearchDomainConfig' :: Maybe EBSOptions
-> Maybe NodeToNodeEncryptionOptions
-> Maybe Text
-> Maybe AutoTuneOptions
-> Maybe (HashMap LogType LogPublishingOption)
-> Maybe AdvancedSecurityOptionsInput
-> Maybe ElasticsearchClusterConfig
-> Maybe SnapshotOptions
-> Maybe CognitoOptions
-> Maybe EncryptionAtRestOptions
-> Maybe VPCOptions
-> Maybe DomainEndpointOptions
-> Maybe (HashMap Text Text)
-> Text
-> UpdateElasticsearchDomainConfig
UpdateElasticsearchDomainConfig'
    { $sel:eBSOptions:UpdateElasticsearchDomainConfig' :: Maybe EBSOptions
eBSOptions =
        Maybe EBSOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeToNodeEncryptionOptions:UpdateElasticsearchDomainConfig' :: Maybe NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions =
        Maybe NodeToNodeEncryptionOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:accessPolicies:UpdateElasticsearchDomainConfig' :: Maybe Text
accessPolicies = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoTuneOptions:UpdateElasticsearchDomainConfig' :: Maybe AutoTuneOptions
autoTuneOptions = Maybe AutoTuneOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:logPublishingOptions:UpdateElasticsearchDomainConfig' :: Maybe (HashMap LogType LogPublishingOption)
logPublishingOptions = Maybe (HashMap LogType LogPublishingOption)
forall a. Maybe a
Prelude.Nothing,
      $sel:advancedSecurityOptions:UpdateElasticsearchDomainConfig' :: Maybe AdvancedSecurityOptionsInput
advancedSecurityOptions = Maybe AdvancedSecurityOptionsInput
forall a. Maybe a
Prelude.Nothing,
      $sel:elasticsearchClusterConfig:UpdateElasticsearchDomainConfig' :: Maybe ElasticsearchClusterConfig
elasticsearchClusterConfig =
        Maybe ElasticsearchClusterConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotOptions:UpdateElasticsearchDomainConfig' :: Maybe SnapshotOptions
snapshotOptions = Maybe SnapshotOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:cognitoOptions:UpdateElasticsearchDomainConfig' :: Maybe CognitoOptions
cognitoOptions = Maybe CognitoOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionAtRestOptions:UpdateElasticsearchDomainConfig' :: Maybe EncryptionAtRestOptions
encryptionAtRestOptions = Maybe EncryptionAtRestOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:vPCOptions:UpdateElasticsearchDomainConfig' :: Maybe VPCOptions
vPCOptions = Maybe VPCOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:domainEndpointOptions:UpdateElasticsearchDomainConfig' :: Maybe DomainEndpointOptions
domainEndpointOptions = Maybe DomainEndpointOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:advancedOptions:UpdateElasticsearchDomainConfig' :: Maybe (HashMap Text Text)
advancedOptions = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:UpdateElasticsearchDomainConfig' :: Text
domainName = Text
pDomainName_
    }

-- | Specify the type and size of the EBS volume that you want to use.
updateElasticsearchDomainConfig_eBSOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe EBSOptions)
updateElasticsearchDomainConfig_eBSOptions :: (Maybe EBSOptions -> f (Maybe EBSOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_eBSOptions = (UpdateElasticsearchDomainConfig -> Maybe EBSOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe EBSOptions -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe EBSOptions)
     (Maybe EBSOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe EBSOptions
eBSOptions :: Maybe EBSOptions
$sel:eBSOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe EBSOptions
eBSOptions} -> Maybe EBSOptions
eBSOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe EBSOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:eBSOptions:UpdateElasticsearchDomainConfig' :: Maybe EBSOptions
eBSOptions = Maybe EBSOptions
a} :: UpdateElasticsearchDomainConfig)

-- | Specifies the NodeToNodeEncryptionOptions.
updateElasticsearchDomainConfig_nodeToNodeEncryptionOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe NodeToNodeEncryptionOptions)
updateElasticsearchDomainConfig_nodeToNodeEncryptionOptions :: (Maybe NodeToNodeEncryptionOptions
 -> f (Maybe NodeToNodeEncryptionOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_nodeToNodeEncryptionOptions = (UpdateElasticsearchDomainConfig
 -> Maybe NodeToNodeEncryptionOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe NodeToNodeEncryptionOptions
    -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe NodeToNodeEncryptionOptions)
     (Maybe NodeToNodeEncryptionOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions :: Maybe NodeToNodeEncryptionOptions
$sel:nodeToNodeEncryptionOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions} -> Maybe NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe NodeToNodeEncryptionOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:nodeToNodeEncryptionOptions:UpdateElasticsearchDomainConfig' :: Maybe NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions = Maybe NodeToNodeEncryptionOptions
a} :: UpdateElasticsearchDomainConfig)

-- | IAM access policy as a JSON-formatted string.
updateElasticsearchDomainConfig_accessPolicies :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe Prelude.Text)
updateElasticsearchDomainConfig_accessPolicies :: (Maybe Text -> f (Maybe Text))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_accessPolicies = (UpdateElasticsearchDomainConfig -> Maybe Text)
-> (UpdateElasticsearchDomainConfig
    -> Maybe Text -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe Text
accessPolicies :: Maybe Text
$sel:accessPolicies:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe Text
accessPolicies} -> Maybe Text
accessPolicies) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe Text
a -> UpdateElasticsearchDomainConfig
s {$sel:accessPolicies:UpdateElasticsearchDomainConfig' :: Maybe Text
accessPolicies = Maybe Text
a} :: UpdateElasticsearchDomainConfig)

-- | Specifies Auto-Tune options.
updateElasticsearchDomainConfig_autoTuneOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe AutoTuneOptions)
updateElasticsearchDomainConfig_autoTuneOptions :: (Maybe AutoTuneOptions -> f (Maybe AutoTuneOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_autoTuneOptions = (UpdateElasticsearchDomainConfig -> Maybe AutoTuneOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe AutoTuneOptions -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe AutoTuneOptions)
     (Maybe AutoTuneOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe AutoTuneOptions
autoTuneOptions :: Maybe AutoTuneOptions
$sel:autoTuneOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe AutoTuneOptions
autoTuneOptions} -> Maybe AutoTuneOptions
autoTuneOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe AutoTuneOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:autoTuneOptions:UpdateElasticsearchDomainConfig' :: Maybe AutoTuneOptions
autoTuneOptions = Maybe AutoTuneOptions
a} :: UpdateElasticsearchDomainConfig)

-- | Map of @LogType@ and @LogPublishingOption@, each containing options to
-- publish a given type of Elasticsearch log.
updateElasticsearchDomainConfig_logPublishingOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe (Prelude.HashMap LogType LogPublishingOption))
updateElasticsearchDomainConfig_logPublishingOptions :: (Maybe (HashMap LogType LogPublishingOption)
 -> f (Maybe (HashMap LogType LogPublishingOption)))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_logPublishingOptions = (UpdateElasticsearchDomainConfig
 -> Maybe (HashMap LogType LogPublishingOption))
-> (UpdateElasticsearchDomainConfig
    -> Maybe (HashMap LogType LogPublishingOption)
    -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe (HashMap LogType LogPublishingOption))
     (Maybe (HashMap LogType LogPublishingOption))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe (HashMap LogType LogPublishingOption)
logPublishingOptions :: Maybe (HashMap LogType LogPublishingOption)
$sel:logPublishingOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe (HashMap LogType LogPublishingOption)
logPublishingOptions} -> Maybe (HashMap LogType LogPublishingOption)
logPublishingOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe (HashMap LogType LogPublishingOption)
a -> UpdateElasticsearchDomainConfig
s {$sel:logPublishingOptions:UpdateElasticsearchDomainConfig' :: Maybe (HashMap LogType LogPublishingOption)
logPublishingOptions = Maybe (HashMap LogType LogPublishingOption)
a} :: UpdateElasticsearchDomainConfig) ((Maybe (HashMap LogType LogPublishingOption)
  -> f (Maybe (HashMap LogType LogPublishingOption)))
 -> UpdateElasticsearchDomainConfig
 -> f UpdateElasticsearchDomainConfig)
-> ((Maybe (HashMap LogType LogPublishingOption)
     -> f (Maybe (HashMap LogType LogPublishingOption)))
    -> Maybe (HashMap LogType LogPublishingOption)
    -> f (Maybe (HashMap LogType LogPublishingOption)))
-> (Maybe (HashMap LogType LogPublishingOption)
    -> f (Maybe (HashMap LogType LogPublishingOption)))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap LogType LogPublishingOption)
  (HashMap LogType LogPublishingOption)
  (HashMap LogType LogPublishingOption)
  (HashMap LogType LogPublishingOption)
-> Iso
     (Maybe (HashMap LogType LogPublishingOption))
     (Maybe (HashMap LogType LogPublishingOption))
     (Maybe (HashMap LogType LogPublishingOption))
     (Maybe (HashMap LogType LogPublishingOption))
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
  (HashMap LogType LogPublishingOption)
  (HashMap LogType LogPublishingOption)
  (HashMap LogType LogPublishingOption)
  (HashMap LogType LogPublishingOption)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies advanced security options.
updateElasticsearchDomainConfig_advancedSecurityOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe AdvancedSecurityOptionsInput)
updateElasticsearchDomainConfig_advancedSecurityOptions :: (Maybe AdvancedSecurityOptionsInput
 -> f (Maybe AdvancedSecurityOptionsInput))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_advancedSecurityOptions = (UpdateElasticsearchDomainConfig
 -> Maybe AdvancedSecurityOptionsInput)
-> (UpdateElasticsearchDomainConfig
    -> Maybe AdvancedSecurityOptionsInput
    -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe AdvancedSecurityOptionsInput)
     (Maybe AdvancedSecurityOptionsInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe AdvancedSecurityOptionsInput
advancedSecurityOptions :: Maybe AdvancedSecurityOptionsInput
$sel:advancedSecurityOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe AdvancedSecurityOptionsInput
advancedSecurityOptions} -> Maybe AdvancedSecurityOptionsInput
advancedSecurityOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe AdvancedSecurityOptionsInput
a -> UpdateElasticsearchDomainConfig
s {$sel:advancedSecurityOptions:UpdateElasticsearchDomainConfig' :: Maybe AdvancedSecurityOptionsInput
advancedSecurityOptions = Maybe AdvancedSecurityOptionsInput
a} :: UpdateElasticsearchDomainConfig)

-- | The type and number of instances to instantiate for the domain cluster.
updateElasticsearchDomainConfig_elasticsearchClusterConfig :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe ElasticsearchClusterConfig)
updateElasticsearchDomainConfig_elasticsearchClusterConfig :: (Maybe ElasticsearchClusterConfig
 -> f (Maybe ElasticsearchClusterConfig))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_elasticsearchClusterConfig = (UpdateElasticsearchDomainConfig
 -> Maybe ElasticsearchClusterConfig)
-> (UpdateElasticsearchDomainConfig
    -> Maybe ElasticsearchClusterConfig
    -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe ElasticsearchClusterConfig)
     (Maybe ElasticsearchClusterConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe ElasticsearchClusterConfig
elasticsearchClusterConfig :: Maybe ElasticsearchClusterConfig
$sel:elasticsearchClusterConfig:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe ElasticsearchClusterConfig
elasticsearchClusterConfig} -> Maybe ElasticsearchClusterConfig
elasticsearchClusterConfig) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe ElasticsearchClusterConfig
a -> UpdateElasticsearchDomainConfig
s {$sel:elasticsearchClusterConfig:UpdateElasticsearchDomainConfig' :: Maybe ElasticsearchClusterConfig
elasticsearchClusterConfig = Maybe ElasticsearchClusterConfig
a} :: UpdateElasticsearchDomainConfig)

-- | Option to set the time, in UTC format, for the daily automated snapshot.
-- Default value is @0@ hours.
updateElasticsearchDomainConfig_snapshotOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe SnapshotOptions)
updateElasticsearchDomainConfig_snapshotOptions :: (Maybe SnapshotOptions -> f (Maybe SnapshotOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_snapshotOptions = (UpdateElasticsearchDomainConfig -> Maybe SnapshotOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe SnapshotOptions -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe SnapshotOptions)
     (Maybe SnapshotOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe SnapshotOptions
snapshotOptions :: Maybe SnapshotOptions
$sel:snapshotOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe SnapshotOptions
snapshotOptions} -> Maybe SnapshotOptions
snapshotOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe SnapshotOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:snapshotOptions:UpdateElasticsearchDomainConfig' :: Maybe SnapshotOptions
snapshotOptions = Maybe SnapshotOptions
a} :: UpdateElasticsearchDomainConfig)

-- | Options to specify the Cognito user and identity pools for Kibana
-- authentication. For more information, see
-- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html Amazon Cognito Authentication for Kibana>.
updateElasticsearchDomainConfig_cognitoOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe CognitoOptions)
updateElasticsearchDomainConfig_cognitoOptions :: (Maybe CognitoOptions -> f (Maybe CognitoOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_cognitoOptions = (UpdateElasticsearchDomainConfig -> Maybe CognitoOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe CognitoOptions -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe CognitoOptions)
     (Maybe CognitoOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe CognitoOptions
cognitoOptions :: Maybe CognitoOptions
$sel:cognitoOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe CognitoOptions
cognitoOptions} -> Maybe CognitoOptions
cognitoOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe CognitoOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:cognitoOptions:UpdateElasticsearchDomainConfig' :: Maybe CognitoOptions
cognitoOptions = Maybe CognitoOptions
a} :: UpdateElasticsearchDomainConfig)

-- | Specifies the Encryption At Rest Options.
updateElasticsearchDomainConfig_encryptionAtRestOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe EncryptionAtRestOptions)
updateElasticsearchDomainConfig_encryptionAtRestOptions :: (Maybe EncryptionAtRestOptions
 -> f (Maybe EncryptionAtRestOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_encryptionAtRestOptions = (UpdateElasticsearchDomainConfig -> Maybe EncryptionAtRestOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe EncryptionAtRestOptions
    -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe EncryptionAtRestOptions)
     (Maybe EncryptionAtRestOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe EncryptionAtRestOptions
encryptionAtRestOptions :: Maybe EncryptionAtRestOptions
$sel:encryptionAtRestOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe EncryptionAtRestOptions
encryptionAtRestOptions} -> Maybe EncryptionAtRestOptions
encryptionAtRestOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe EncryptionAtRestOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:encryptionAtRestOptions:UpdateElasticsearchDomainConfig' :: Maybe EncryptionAtRestOptions
encryptionAtRestOptions = Maybe EncryptionAtRestOptions
a} :: UpdateElasticsearchDomainConfig)

-- | Options to specify the subnets and security groups for VPC endpoint. For
-- more information, see
-- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc Creating a VPC>
-- in /VPC Endpoints for Amazon Elasticsearch Service Domains/
updateElasticsearchDomainConfig_vPCOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe VPCOptions)
updateElasticsearchDomainConfig_vPCOptions :: (Maybe VPCOptions -> f (Maybe VPCOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_vPCOptions = (UpdateElasticsearchDomainConfig -> Maybe VPCOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe VPCOptions -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe VPCOptions)
     (Maybe VPCOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe VPCOptions
vPCOptions :: Maybe VPCOptions
$sel:vPCOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe VPCOptions
vPCOptions} -> Maybe VPCOptions
vPCOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe VPCOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:vPCOptions:UpdateElasticsearchDomainConfig' :: Maybe VPCOptions
vPCOptions = Maybe VPCOptions
a} :: UpdateElasticsearchDomainConfig)

-- | Options to specify configuration that will be applied to the domain
-- endpoint.
updateElasticsearchDomainConfig_domainEndpointOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe DomainEndpointOptions)
updateElasticsearchDomainConfig_domainEndpointOptions :: (Maybe DomainEndpointOptions -> f (Maybe DomainEndpointOptions))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_domainEndpointOptions = (UpdateElasticsearchDomainConfig -> Maybe DomainEndpointOptions)
-> (UpdateElasticsearchDomainConfig
    -> Maybe DomainEndpointOptions -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe DomainEndpointOptions)
     (Maybe DomainEndpointOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe DomainEndpointOptions
domainEndpointOptions :: Maybe DomainEndpointOptions
$sel:domainEndpointOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe DomainEndpointOptions
domainEndpointOptions} -> Maybe DomainEndpointOptions
domainEndpointOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe DomainEndpointOptions
a -> UpdateElasticsearchDomainConfig
s {$sel:domainEndpointOptions:UpdateElasticsearchDomainConfig' :: Maybe DomainEndpointOptions
domainEndpointOptions = Maybe DomainEndpointOptions
a} :: UpdateElasticsearchDomainConfig)

-- | Modifies the advanced option to allow references to indices in an HTTP
-- request body. Must be @false@ when configuring access to individual
-- sub-resources. By default, the value is @true@. See
-- <http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options Configuration Advanced Options>
-- for more information.
updateElasticsearchDomainConfig_advancedOptions :: Lens.Lens' UpdateElasticsearchDomainConfig (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateElasticsearchDomainConfig_advancedOptions :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_advancedOptions = (UpdateElasticsearchDomainConfig -> Maybe (HashMap Text Text))
-> (UpdateElasticsearchDomainConfig
    -> Maybe (HashMap Text Text) -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Maybe (HashMap Text Text)
advancedOptions :: Maybe (HashMap Text Text)
$sel:advancedOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe (HashMap Text Text)
advancedOptions} -> Maybe (HashMap Text Text)
advancedOptions) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Maybe (HashMap Text Text)
a -> UpdateElasticsearchDomainConfig
s {$sel:advancedOptions:UpdateElasticsearchDomainConfig' :: Maybe (HashMap Text Text)
advancedOptions = Maybe (HashMap Text Text)
a} :: UpdateElasticsearchDomainConfig) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateElasticsearchDomainConfig
 -> f UpdateElasticsearchDomainConfig)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the Elasticsearch domain that you are updating.
updateElasticsearchDomainConfig_domainName :: Lens.Lens' UpdateElasticsearchDomainConfig Prelude.Text
updateElasticsearchDomainConfig_domainName :: (Text -> f Text)
-> UpdateElasticsearchDomainConfig
-> f UpdateElasticsearchDomainConfig
updateElasticsearchDomainConfig_domainName = (UpdateElasticsearchDomainConfig -> Text)
-> (UpdateElasticsearchDomainConfig
    -> Text -> UpdateElasticsearchDomainConfig)
-> Lens
     UpdateElasticsearchDomainConfig
     UpdateElasticsearchDomainConfig
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfig' {Text
domainName :: Text
$sel:domainName:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Text
domainName} -> Text
domainName) (\s :: UpdateElasticsearchDomainConfig
s@UpdateElasticsearchDomainConfig' {} Text
a -> UpdateElasticsearchDomainConfig
s {$sel:domainName:UpdateElasticsearchDomainConfig' :: Text
domainName = Text
a} :: UpdateElasticsearchDomainConfig)

instance
  Core.AWSRequest
    UpdateElasticsearchDomainConfig
  where
  type
    AWSResponse UpdateElasticsearchDomainConfig =
      UpdateElasticsearchDomainConfigResponse
  request :: UpdateElasticsearchDomainConfig
-> Request UpdateElasticsearchDomainConfig
request = Service
-> UpdateElasticsearchDomainConfig
-> Request UpdateElasticsearchDomainConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateElasticsearchDomainConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateElasticsearchDomainConfig)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateElasticsearchDomainConfig))
-> Logger
-> Service
-> Proxy UpdateElasticsearchDomainConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateElasticsearchDomainConfig)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int
-> ElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfigResponse
UpdateElasticsearchDomainConfigResponse'
            (Int
 -> ElasticsearchDomainConfig
 -> UpdateElasticsearchDomainConfigResponse)
-> Either String Int
-> Either
     String
     (ElasticsearchDomainConfig
      -> UpdateElasticsearchDomainConfigResponse)
forall (f :: * -> *) a b. Functor 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))
            Either
  String
  (ElasticsearchDomainConfig
   -> UpdateElasticsearchDomainConfigResponse)
-> Either String ElasticsearchDomainConfig
-> Either String UpdateElasticsearchDomainConfigResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ElasticsearchDomainConfig
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DomainConfig")
      )

instance
  Prelude.Hashable
    UpdateElasticsearchDomainConfig

instance
  Prelude.NFData
    UpdateElasticsearchDomainConfig

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

instance Core.ToJSON UpdateElasticsearchDomainConfig where
  toJSON :: UpdateElasticsearchDomainConfig -> Value
toJSON UpdateElasticsearchDomainConfig' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap LogType LogPublishingOption)
Maybe CognitoOptions
Maybe EncryptionAtRestOptions
Maybe NodeToNodeEncryptionOptions
Maybe AdvancedSecurityOptionsInput
Maybe SnapshotOptions
Maybe DomainEndpointOptions
Maybe AutoTuneOptions
Maybe VPCOptions
Maybe EBSOptions
Maybe ElasticsearchClusterConfig
Text
domainName :: Text
advancedOptions :: Maybe (HashMap Text Text)
domainEndpointOptions :: Maybe DomainEndpointOptions
vPCOptions :: Maybe VPCOptions
encryptionAtRestOptions :: Maybe EncryptionAtRestOptions
cognitoOptions :: Maybe CognitoOptions
snapshotOptions :: Maybe SnapshotOptions
elasticsearchClusterConfig :: Maybe ElasticsearchClusterConfig
advancedSecurityOptions :: Maybe AdvancedSecurityOptionsInput
logPublishingOptions :: Maybe (HashMap LogType LogPublishingOption)
autoTuneOptions :: Maybe AutoTuneOptions
accessPolicies :: Maybe Text
nodeToNodeEncryptionOptions :: Maybe NodeToNodeEncryptionOptions
eBSOptions :: Maybe EBSOptions
$sel:domainName:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Text
$sel:advancedOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe (HashMap Text Text)
$sel:domainEndpointOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe DomainEndpointOptions
$sel:vPCOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe VPCOptions
$sel:encryptionAtRestOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe EncryptionAtRestOptions
$sel:cognitoOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe CognitoOptions
$sel:snapshotOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe SnapshotOptions
$sel:elasticsearchClusterConfig:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe ElasticsearchClusterConfig
$sel:advancedSecurityOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe AdvancedSecurityOptionsInput
$sel:logPublishingOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe (HashMap LogType LogPublishingOption)
$sel:autoTuneOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe AutoTuneOptions
$sel:accessPolicies:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe Text
$sel:nodeToNodeEncryptionOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe NodeToNodeEncryptionOptions
$sel:eBSOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe EBSOptions
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EBSOptions" Text -> EBSOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EBSOptions -> Pair) -> Maybe EBSOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EBSOptions
eBSOptions,
            (Text
"NodeToNodeEncryptionOptions" Text -> NodeToNodeEncryptionOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NodeToNodeEncryptionOptions -> Pair)
-> Maybe NodeToNodeEncryptionOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions,
            (Text
"AccessPolicies" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
accessPolicies,
            (Text
"AutoTuneOptions" Text -> AutoTuneOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AutoTuneOptions -> Pair) -> Maybe AutoTuneOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoTuneOptions
autoTuneOptions,
            (Text
"LogPublishingOptions" Text -> HashMap LogType LogPublishingOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap LogType LogPublishingOption -> Pair)
-> Maybe (HashMap LogType LogPublishingOption) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap LogType LogPublishingOption)
logPublishingOptions,
            (Text
"AdvancedSecurityOptions" Text -> AdvancedSecurityOptionsInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AdvancedSecurityOptionsInput -> Pair)
-> Maybe AdvancedSecurityOptionsInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AdvancedSecurityOptionsInput
advancedSecurityOptions,
            (Text
"ElasticsearchClusterConfig" Text -> ElasticsearchClusterConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ElasticsearchClusterConfig -> Pair)
-> Maybe ElasticsearchClusterConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchClusterConfig
elasticsearchClusterConfig,
            (Text
"SnapshotOptions" Text -> SnapshotOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SnapshotOptions -> Pair) -> Maybe SnapshotOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SnapshotOptions
snapshotOptions,
            (Text
"CognitoOptions" Text -> CognitoOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CognitoOptions -> Pair) -> Maybe CognitoOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CognitoOptions
cognitoOptions,
            (Text
"EncryptionAtRestOptions" Text -> EncryptionAtRestOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EncryptionAtRestOptions -> Pair)
-> Maybe EncryptionAtRestOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionAtRestOptions
encryptionAtRestOptions,
            (Text
"VPCOptions" Text -> VPCOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VPCOptions -> Pair) -> Maybe VPCOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VPCOptions
vPCOptions,
            (Text
"DomainEndpointOptions" Text -> DomainEndpointOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DomainEndpointOptions -> Pair)
-> Maybe DomainEndpointOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DomainEndpointOptions
domainEndpointOptions,
            (Text
"AdvancedOptions" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
advancedOptions
          ]
      )

instance Core.ToPath UpdateElasticsearchDomainConfig where
  toPath :: UpdateElasticsearchDomainConfig -> ByteString
toPath UpdateElasticsearchDomainConfig' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap LogType LogPublishingOption)
Maybe CognitoOptions
Maybe EncryptionAtRestOptions
Maybe NodeToNodeEncryptionOptions
Maybe AdvancedSecurityOptionsInput
Maybe SnapshotOptions
Maybe DomainEndpointOptions
Maybe AutoTuneOptions
Maybe VPCOptions
Maybe EBSOptions
Maybe ElasticsearchClusterConfig
Text
domainName :: Text
advancedOptions :: Maybe (HashMap Text Text)
domainEndpointOptions :: Maybe DomainEndpointOptions
vPCOptions :: Maybe VPCOptions
encryptionAtRestOptions :: Maybe EncryptionAtRestOptions
cognitoOptions :: Maybe CognitoOptions
snapshotOptions :: Maybe SnapshotOptions
elasticsearchClusterConfig :: Maybe ElasticsearchClusterConfig
advancedSecurityOptions :: Maybe AdvancedSecurityOptionsInput
logPublishingOptions :: Maybe (HashMap LogType LogPublishingOption)
autoTuneOptions :: Maybe AutoTuneOptions
accessPolicies :: Maybe Text
nodeToNodeEncryptionOptions :: Maybe NodeToNodeEncryptionOptions
eBSOptions :: Maybe EBSOptions
$sel:domainName:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Text
$sel:advancedOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe (HashMap Text Text)
$sel:domainEndpointOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe DomainEndpointOptions
$sel:vPCOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe VPCOptions
$sel:encryptionAtRestOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe EncryptionAtRestOptions
$sel:cognitoOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe CognitoOptions
$sel:snapshotOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe SnapshotOptions
$sel:elasticsearchClusterConfig:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe ElasticsearchClusterConfig
$sel:advancedSecurityOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe AdvancedSecurityOptionsInput
$sel:logPublishingOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe (HashMap LogType LogPublishingOption)
$sel:autoTuneOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe AutoTuneOptions
$sel:accessPolicies:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe Text
$sel:nodeToNodeEncryptionOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig
-> Maybe NodeToNodeEncryptionOptions
$sel:eBSOptions:UpdateElasticsearchDomainConfig' :: UpdateElasticsearchDomainConfig -> Maybe EBSOptions
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2015-01-01/es/domain/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName,
        ByteString
"/config"
      ]

instance Core.ToQuery UpdateElasticsearchDomainConfig where
  toQuery :: UpdateElasticsearchDomainConfig -> QueryString
toQuery = QueryString -> UpdateElasticsearchDomainConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | The result of an @UpdateElasticsearchDomain@ request. Contains the
-- status of the Elasticsearch domain being updated.
--
-- /See:/ 'newUpdateElasticsearchDomainConfigResponse' smart constructor.
data UpdateElasticsearchDomainConfigResponse = UpdateElasticsearchDomainConfigResponse'
  { -- | The response's http status code.
    UpdateElasticsearchDomainConfigResponse -> Int
httpStatus :: Prelude.Int,
    -- | The status of the updated Elasticsearch domain.
    UpdateElasticsearchDomainConfigResponse
-> ElasticsearchDomainConfig
domainConfig :: ElasticsearchDomainConfig
  }
  deriving (UpdateElasticsearchDomainConfigResponse
-> UpdateElasticsearchDomainConfigResponse -> Bool
(UpdateElasticsearchDomainConfigResponse
 -> UpdateElasticsearchDomainConfigResponse -> Bool)
-> (UpdateElasticsearchDomainConfigResponse
    -> UpdateElasticsearchDomainConfigResponse -> Bool)
-> Eq UpdateElasticsearchDomainConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateElasticsearchDomainConfigResponse
-> UpdateElasticsearchDomainConfigResponse -> Bool
$c/= :: UpdateElasticsearchDomainConfigResponse
-> UpdateElasticsearchDomainConfigResponse -> Bool
== :: UpdateElasticsearchDomainConfigResponse
-> UpdateElasticsearchDomainConfigResponse -> Bool
$c== :: UpdateElasticsearchDomainConfigResponse
-> UpdateElasticsearchDomainConfigResponse -> Bool
Prelude.Eq, ReadPrec [UpdateElasticsearchDomainConfigResponse]
ReadPrec UpdateElasticsearchDomainConfigResponse
Int -> ReadS UpdateElasticsearchDomainConfigResponse
ReadS [UpdateElasticsearchDomainConfigResponse]
(Int -> ReadS UpdateElasticsearchDomainConfigResponse)
-> ReadS [UpdateElasticsearchDomainConfigResponse]
-> ReadPrec UpdateElasticsearchDomainConfigResponse
-> ReadPrec [UpdateElasticsearchDomainConfigResponse]
-> Read UpdateElasticsearchDomainConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateElasticsearchDomainConfigResponse]
$creadListPrec :: ReadPrec [UpdateElasticsearchDomainConfigResponse]
readPrec :: ReadPrec UpdateElasticsearchDomainConfigResponse
$creadPrec :: ReadPrec UpdateElasticsearchDomainConfigResponse
readList :: ReadS [UpdateElasticsearchDomainConfigResponse]
$creadList :: ReadS [UpdateElasticsearchDomainConfigResponse]
readsPrec :: Int -> ReadS UpdateElasticsearchDomainConfigResponse
$creadsPrec :: Int -> ReadS UpdateElasticsearchDomainConfigResponse
Prelude.Read, Int -> UpdateElasticsearchDomainConfigResponse -> ShowS
[UpdateElasticsearchDomainConfigResponse] -> ShowS
UpdateElasticsearchDomainConfigResponse -> String
(Int -> UpdateElasticsearchDomainConfigResponse -> ShowS)
-> (UpdateElasticsearchDomainConfigResponse -> String)
-> ([UpdateElasticsearchDomainConfigResponse] -> ShowS)
-> Show UpdateElasticsearchDomainConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateElasticsearchDomainConfigResponse] -> ShowS
$cshowList :: [UpdateElasticsearchDomainConfigResponse] -> ShowS
show :: UpdateElasticsearchDomainConfigResponse -> String
$cshow :: UpdateElasticsearchDomainConfigResponse -> String
showsPrec :: Int -> UpdateElasticsearchDomainConfigResponse -> ShowS
$cshowsPrec :: Int -> UpdateElasticsearchDomainConfigResponse -> ShowS
Prelude.Show, (forall x.
 UpdateElasticsearchDomainConfigResponse
 -> Rep UpdateElasticsearchDomainConfigResponse x)
-> (forall x.
    Rep UpdateElasticsearchDomainConfigResponse x
    -> UpdateElasticsearchDomainConfigResponse)
-> Generic UpdateElasticsearchDomainConfigResponse
forall x.
Rep UpdateElasticsearchDomainConfigResponse x
-> UpdateElasticsearchDomainConfigResponse
forall x.
UpdateElasticsearchDomainConfigResponse
-> Rep UpdateElasticsearchDomainConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateElasticsearchDomainConfigResponse x
-> UpdateElasticsearchDomainConfigResponse
$cfrom :: forall x.
UpdateElasticsearchDomainConfigResponse
-> Rep UpdateElasticsearchDomainConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateElasticsearchDomainConfigResponse' 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:
--
-- 'httpStatus', 'updateElasticsearchDomainConfigResponse_httpStatus' - The response's http status code.
--
-- 'domainConfig', 'updateElasticsearchDomainConfigResponse_domainConfig' - The status of the updated Elasticsearch domain.
newUpdateElasticsearchDomainConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'domainConfig'
  ElasticsearchDomainConfig ->
  UpdateElasticsearchDomainConfigResponse
newUpdateElasticsearchDomainConfigResponse :: Int
-> ElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfigResponse
newUpdateElasticsearchDomainConfigResponse
  Int
pHttpStatus_
  ElasticsearchDomainConfig
pDomainConfig_ =
    UpdateElasticsearchDomainConfigResponse' :: Int
-> ElasticsearchDomainConfig
-> UpdateElasticsearchDomainConfigResponse
UpdateElasticsearchDomainConfigResponse'
      { $sel:httpStatus:UpdateElasticsearchDomainConfigResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:domainConfig:UpdateElasticsearchDomainConfigResponse' :: ElasticsearchDomainConfig
domainConfig = ElasticsearchDomainConfig
pDomainConfig_
      }

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

-- | The status of the updated Elasticsearch domain.
updateElasticsearchDomainConfigResponse_domainConfig :: Lens.Lens' UpdateElasticsearchDomainConfigResponse ElasticsearchDomainConfig
updateElasticsearchDomainConfigResponse_domainConfig :: (ElasticsearchDomainConfig -> f ElasticsearchDomainConfig)
-> UpdateElasticsearchDomainConfigResponse
-> f UpdateElasticsearchDomainConfigResponse
updateElasticsearchDomainConfigResponse_domainConfig = (UpdateElasticsearchDomainConfigResponse
 -> ElasticsearchDomainConfig)
-> (UpdateElasticsearchDomainConfigResponse
    -> ElasticsearchDomainConfig
    -> UpdateElasticsearchDomainConfigResponse)
-> Lens
     UpdateElasticsearchDomainConfigResponse
     UpdateElasticsearchDomainConfigResponse
     ElasticsearchDomainConfig
     ElasticsearchDomainConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateElasticsearchDomainConfigResponse' {ElasticsearchDomainConfig
domainConfig :: ElasticsearchDomainConfig
$sel:domainConfig:UpdateElasticsearchDomainConfigResponse' :: UpdateElasticsearchDomainConfigResponse
-> ElasticsearchDomainConfig
domainConfig} -> ElasticsearchDomainConfig
domainConfig) (\s :: UpdateElasticsearchDomainConfigResponse
s@UpdateElasticsearchDomainConfigResponse' {} ElasticsearchDomainConfig
a -> UpdateElasticsearchDomainConfigResponse
s {$sel:domainConfig:UpdateElasticsearchDomainConfigResponse' :: ElasticsearchDomainConfig
domainConfig = ElasticsearchDomainConfig
a} :: UpdateElasticsearchDomainConfigResponse)

instance
  Prelude.NFData
    UpdateElasticsearchDomainConfigResponse