{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.CreateDBParameterGroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new DB parameter group.
--
-- A DB parameter group is initially created with the default parameters
-- for the database engine used by the DB instance. To provide custom
-- values for any of the parameters, you must modify the group after
-- creating it using /ModifyDBParameterGroup/. Once you\'ve created a DB
-- parameter group, you need to associate it with your DB instance using
-- /ModifyDBInstance/. When you associate a new DB parameter group with a
-- running DB instance, you need to reboot the DB instance without failover
-- for the new DB parameter group and associated settings to take effect.
--
-- After you create a DB parameter group, you should wait at least 5
-- minutes before creating your first DB instance that uses that DB
-- parameter group as the default parameter group. This allows Amazon RDS
-- to fully complete the create action before the parameter group is used
-- as the default for a new DB instance. This is especially important for
-- parameters that are critical when creating the default database for a DB
-- instance, such as the character set for the default database defined by
-- the @character_set_database@ parameter. You can use the /Parameter
-- Groups/ option of the
-- <https://console.aws.amazon.com/rds/ Amazon RDS console> or the
-- /DescribeDBParameters/ command to verify that your DB parameter group
-- has been created or modified.
module Amazonka.RDS.CreateDBParameterGroup
  ( -- * Creating a Request
    CreateDBParameterGroup (..),
    newCreateDBParameterGroup,

    -- * Request Lenses
    createDBParameterGroup_tags,
    createDBParameterGroup_dbParameterGroupName,
    createDBParameterGroup_dbParameterGroupFamily,
    createDBParameterGroup_description,

    -- * Destructuring the Response
    CreateDBParameterGroupResponse (..),
    newCreateDBParameterGroupResponse,

    -- * Response Lenses
    createDBParameterGroupResponse_dbParameterGroup,
    createDBParameterGroupResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newCreateDBParameterGroup' smart constructor.
data CreateDBParameterGroup = CreateDBParameterGroup'
  { -- | Tags to assign to the DB parameter group.
    CreateDBParameterGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the DB parameter group.
    --
    -- Constraints:
    --
    -- -   Must be 1 to 255 letters, numbers, or hyphens.
    --
    -- -   First character must be a letter
    --
    -- -   Can\'t end with a hyphen or contain two consecutive hyphens
    --
    -- This value is stored as a lowercase string.
    CreateDBParameterGroup -> Text
dbParameterGroupName :: Prelude.Text,
    -- | The DB parameter group family name. A DB parameter group can be
    -- associated with one and only one DB parameter group family, and can be
    -- applied only to a DB instance running a database engine and engine
    -- version compatible with that DB parameter group family.
    --
    -- To list all of the available parameter group families for a DB engine,
    -- use the following command:
    --
    -- @aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine \<engine>@
    --
    -- For example, to list all of the available parameter group families for
    -- the MySQL DB engine, use the following command:
    --
    -- @aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine mysql@
    --
    -- The output contains duplicates.
    --
    -- The following are the valid DB engine values:
    --
    -- -   @aurora@ (for MySQL 5.6-compatible Aurora)
    --
    -- -   @aurora-mysql@ (for MySQL 5.7-compatible Aurora)
    --
    -- -   @aurora-postgresql@
    --
    -- -   @mariadb@
    --
    -- -   @mysql@
    --
    -- -   @oracle-ee@
    --
    -- -   @oracle-ee-cdb@
    --
    -- -   @oracle-se2@
    --
    -- -   @oracle-se2-cdb@
    --
    -- -   @postgres@
    --
    -- -   @sqlserver-ee@
    --
    -- -   @sqlserver-se@
    --
    -- -   @sqlserver-ex@
    --
    -- -   @sqlserver-web@
    CreateDBParameterGroup -> Text
dbParameterGroupFamily :: Prelude.Text,
    -- | The description for the DB parameter group.
    CreateDBParameterGroup -> Text
description :: Prelude.Text
  }
  deriving (CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
(CreateDBParameterGroup -> CreateDBParameterGroup -> Bool)
-> (CreateDBParameterGroup -> CreateDBParameterGroup -> Bool)
-> Eq CreateDBParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
$c/= :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
== :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
$c== :: CreateDBParameterGroup -> CreateDBParameterGroup -> Bool
Prelude.Eq, ReadPrec [CreateDBParameterGroup]
ReadPrec CreateDBParameterGroup
Int -> ReadS CreateDBParameterGroup
ReadS [CreateDBParameterGroup]
(Int -> ReadS CreateDBParameterGroup)
-> ReadS [CreateDBParameterGroup]
-> ReadPrec CreateDBParameterGroup
-> ReadPrec [CreateDBParameterGroup]
-> Read CreateDBParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBParameterGroup]
$creadListPrec :: ReadPrec [CreateDBParameterGroup]
readPrec :: ReadPrec CreateDBParameterGroup
$creadPrec :: ReadPrec CreateDBParameterGroup
readList :: ReadS [CreateDBParameterGroup]
$creadList :: ReadS [CreateDBParameterGroup]
readsPrec :: Int -> ReadS CreateDBParameterGroup
$creadsPrec :: Int -> ReadS CreateDBParameterGroup
Prelude.Read, Int -> CreateDBParameterGroup -> ShowS
[CreateDBParameterGroup] -> ShowS
CreateDBParameterGroup -> String
(Int -> CreateDBParameterGroup -> ShowS)
-> (CreateDBParameterGroup -> String)
-> ([CreateDBParameterGroup] -> ShowS)
-> Show CreateDBParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBParameterGroup] -> ShowS
$cshowList :: [CreateDBParameterGroup] -> ShowS
show :: CreateDBParameterGroup -> String
$cshow :: CreateDBParameterGroup -> String
showsPrec :: Int -> CreateDBParameterGroup -> ShowS
$cshowsPrec :: Int -> CreateDBParameterGroup -> ShowS
Prelude.Show, (forall x. CreateDBParameterGroup -> Rep CreateDBParameterGroup x)
-> (forall x.
    Rep CreateDBParameterGroup x -> CreateDBParameterGroup)
-> Generic CreateDBParameterGroup
forall x. Rep CreateDBParameterGroup x -> CreateDBParameterGroup
forall x. CreateDBParameterGroup -> Rep CreateDBParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBParameterGroup x -> CreateDBParameterGroup
$cfrom :: forall x. CreateDBParameterGroup -> Rep CreateDBParameterGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBParameterGroup' 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:
--
-- 'tags', 'createDBParameterGroup_tags' - Tags to assign to the DB parameter group.
--
-- 'dbParameterGroupName', 'createDBParameterGroup_dbParameterGroupName' - The name of the DB parameter group.
--
-- Constraints:
--
-- -   Must be 1 to 255 letters, numbers, or hyphens.
--
-- -   First character must be a letter
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens
--
-- This value is stored as a lowercase string.
--
-- 'dbParameterGroupFamily', 'createDBParameterGroup_dbParameterGroupFamily' - The DB parameter group family name. A DB parameter group can be
-- associated with one and only one DB parameter group family, and can be
-- applied only to a DB instance running a database engine and engine
-- version compatible with that DB parameter group family.
--
-- To list all of the available parameter group families for a DB engine,
-- use the following command:
--
-- @aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine \<engine>@
--
-- For example, to list all of the available parameter group families for
-- the MySQL DB engine, use the following command:
--
-- @aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine mysql@
--
-- The output contains duplicates.
--
-- The following are the valid DB engine values:
--
-- -   @aurora@ (for MySQL 5.6-compatible Aurora)
--
-- -   @aurora-mysql@ (for MySQL 5.7-compatible Aurora)
--
-- -   @aurora-postgresql@
--
-- -   @mariadb@
--
-- -   @mysql@
--
-- -   @oracle-ee@
--
-- -   @oracle-ee-cdb@
--
-- -   @oracle-se2@
--
-- -   @oracle-se2-cdb@
--
-- -   @postgres@
--
-- -   @sqlserver-ee@
--
-- -   @sqlserver-se@
--
-- -   @sqlserver-ex@
--
-- -   @sqlserver-web@
--
-- 'description', 'createDBParameterGroup_description' - The description for the DB parameter group.
newCreateDBParameterGroup ::
  -- | 'dbParameterGroupName'
  Prelude.Text ->
  -- | 'dbParameterGroupFamily'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  CreateDBParameterGroup
newCreateDBParameterGroup :: Text -> Text -> Text -> CreateDBParameterGroup
newCreateDBParameterGroup
  Text
pDBParameterGroupName_
  Text
pDBParameterGroupFamily_
  Text
pDescription_ =
    CreateDBParameterGroup' :: Maybe [Tag] -> Text -> Text -> Text -> CreateDBParameterGroup
CreateDBParameterGroup'
      { $sel:tags:CreateDBParameterGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:dbParameterGroupName:CreateDBParameterGroup' :: Text
dbParameterGroupName = Text
pDBParameterGroupName_,
        $sel:dbParameterGroupFamily:CreateDBParameterGroup' :: Text
dbParameterGroupFamily = Text
pDBParameterGroupFamily_,
        $sel:description:CreateDBParameterGroup' :: Text
description = Text
pDescription_
      }

-- | Tags to assign to the DB parameter group.
createDBParameterGroup_tags :: Lens.Lens' CreateDBParameterGroup (Prelude.Maybe [Tag])
createDBParameterGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBParameterGroup -> f CreateDBParameterGroup
createDBParameterGroup_tags = (CreateDBParameterGroup -> Maybe [Tag])
-> (CreateDBParameterGroup
    -> Maybe [Tag] -> CreateDBParameterGroup)
-> Lens
     CreateDBParameterGroup
     CreateDBParameterGroup
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBParameterGroup' :: CreateDBParameterGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Maybe [Tag]
a -> CreateDBParameterGroup
s {$sel:tags:CreateDBParameterGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBParameterGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBParameterGroup -> f CreateDBParameterGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBParameterGroup
-> f CreateDBParameterGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the DB parameter group.
--
-- Constraints:
--
-- -   Must be 1 to 255 letters, numbers, or hyphens.
--
-- -   First character must be a letter
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens
--
-- This value is stored as a lowercase string.
createDBParameterGroup_dbParameterGroupName :: Lens.Lens' CreateDBParameterGroup Prelude.Text
createDBParameterGroup_dbParameterGroupName :: (Text -> f Text)
-> CreateDBParameterGroup -> f CreateDBParameterGroup
createDBParameterGroup_dbParameterGroupName = (CreateDBParameterGroup -> Text)
-> (CreateDBParameterGroup -> Text -> CreateDBParameterGroup)
-> Lens CreateDBParameterGroup CreateDBParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Text
dbParameterGroupName :: Text
$sel:dbParameterGroupName:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
dbParameterGroupName} -> Text
dbParameterGroupName) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Text
a -> CreateDBParameterGroup
s {$sel:dbParameterGroupName:CreateDBParameterGroup' :: Text
dbParameterGroupName = Text
a} :: CreateDBParameterGroup)

-- | The DB parameter group family name. A DB parameter group can be
-- associated with one and only one DB parameter group family, and can be
-- applied only to a DB instance running a database engine and engine
-- version compatible with that DB parameter group family.
--
-- To list all of the available parameter group families for a DB engine,
-- use the following command:
--
-- @aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine \<engine>@
--
-- For example, to list all of the available parameter group families for
-- the MySQL DB engine, use the following command:
--
-- @aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine mysql@
--
-- The output contains duplicates.
--
-- The following are the valid DB engine values:
--
-- -   @aurora@ (for MySQL 5.6-compatible Aurora)
--
-- -   @aurora-mysql@ (for MySQL 5.7-compatible Aurora)
--
-- -   @aurora-postgresql@
--
-- -   @mariadb@
--
-- -   @mysql@
--
-- -   @oracle-ee@
--
-- -   @oracle-ee-cdb@
--
-- -   @oracle-se2@
--
-- -   @oracle-se2-cdb@
--
-- -   @postgres@
--
-- -   @sqlserver-ee@
--
-- -   @sqlserver-se@
--
-- -   @sqlserver-ex@
--
-- -   @sqlserver-web@
createDBParameterGroup_dbParameterGroupFamily :: Lens.Lens' CreateDBParameterGroup Prelude.Text
createDBParameterGroup_dbParameterGroupFamily :: (Text -> f Text)
-> CreateDBParameterGroup -> f CreateDBParameterGroup
createDBParameterGroup_dbParameterGroupFamily = (CreateDBParameterGroup -> Text)
-> (CreateDBParameterGroup -> Text -> CreateDBParameterGroup)
-> Lens CreateDBParameterGroup CreateDBParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Text
dbParameterGroupFamily :: Text
$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
dbParameterGroupFamily} -> Text
dbParameterGroupFamily) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Text
a -> CreateDBParameterGroup
s {$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: Text
dbParameterGroupFamily = Text
a} :: CreateDBParameterGroup)

-- | The description for the DB parameter group.
createDBParameterGroup_description :: Lens.Lens' CreateDBParameterGroup Prelude.Text
createDBParameterGroup_description :: (Text -> f Text)
-> CreateDBParameterGroup -> f CreateDBParameterGroup
createDBParameterGroup_description = (CreateDBParameterGroup -> Text)
-> (CreateDBParameterGroup -> Text -> CreateDBParameterGroup)
-> Lens CreateDBParameterGroup CreateDBParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroup' {Text
description :: Text
$sel:description:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
description} -> Text
description) (\s :: CreateDBParameterGroup
s@CreateDBParameterGroup' {} Text
a -> CreateDBParameterGroup
s {$sel:description:CreateDBParameterGroup' :: Text
description = Text
a} :: CreateDBParameterGroup)

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

instance Prelude.NFData CreateDBParameterGroup

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

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

instance Core.ToQuery CreateDBParameterGroup where
  toQuery :: CreateDBParameterGroup -> QueryString
toQuery CreateDBParameterGroup' {Maybe [Tag]
Text
description :: Text
dbParameterGroupFamily :: Text
dbParameterGroupName :: Text
tags :: Maybe [Tag]
$sel:description:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupFamily:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:dbParameterGroupName:CreateDBParameterGroup' :: CreateDBParameterGroup -> Text
$sel:tags:CreateDBParameterGroup' :: CreateDBParameterGroup -> Maybe [Tag]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateDBParameterGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"DBParameterGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbParameterGroupName,
        ByteString
"DBParameterGroupFamily"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbParameterGroupFamily,
        ByteString
"Description" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
description
      ]

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

-- |
-- Create a value of 'CreateDBParameterGroupResponse' 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:
--
-- 'dbParameterGroup', 'createDBParameterGroupResponse_dbParameterGroup' - Undocumented member.
--
-- 'httpStatus', 'createDBParameterGroupResponse_httpStatus' - The response's http status code.
newCreateDBParameterGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDBParameterGroupResponse
newCreateDBParameterGroupResponse :: Int -> CreateDBParameterGroupResponse
newCreateDBParameterGroupResponse Int
pHttpStatus_ =
  CreateDBParameterGroupResponse' :: Maybe DBParameterGroup -> Int -> CreateDBParameterGroupResponse
CreateDBParameterGroupResponse'
    { $sel:dbParameterGroup:CreateDBParameterGroupResponse' :: Maybe DBParameterGroup
dbParameterGroup =
        Maybe DBParameterGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDBParameterGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createDBParameterGroupResponse_dbParameterGroup :: Lens.Lens' CreateDBParameterGroupResponse (Prelude.Maybe DBParameterGroup)
createDBParameterGroupResponse_dbParameterGroup :: (Maybe DBParameterGroup -> f (Maybe DBParameterGroup))
-> CreateDBParameterGroupResponse
-> f CreateDBParameterGroupResponse
createDBParameterGroupResponse_dbParameterGroup = (CreateDBParameterGroupResponse -> Maybe DBParameterGroup)
-> (CreateDBParameterGroupResponse
    -> Maybe DBParameterGroup -> CreateDBParameterGroupResponse)
-> Lens
     CreateDBParameterGroupResponse
     CreateDBParameterGroupResponse
     (Maybe DBParameterGroup)
     (Maybe DBParameterGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBParameterGroupResponse' {Maybe DBParameterGroup
dbParameterGroup :: Maybe DBParameterGroup
$sel:dbParameterGroup:CreateDBParameterGroupResponse' :: CreateDBParameterGroupResponse -> Maybe DBParameterGroup
dbParameterGroup} -> Maybe DBParameterGroup
dbParameterGroup) (\s :: CreateDBParameterGroupResponse
s@CreateDBParameterGroupResponse' {} Maybe DBParameterGroup
a -> CreateDBParameterGroupResponse
s {$sel:dbParameterGroup:CreateDBParameterGroupResponse' :: Maybe DBParameterGroup
dbParameterGroup = Maybe DBParameterGroup
a} :: CreateDBParameterGroupResponse)

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

instance
  Prelude.NFData
    CreateDBParameterGroupResponse