{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.
--
-- This command doesn\'t apply to RDS Custom.
--
-- 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 and MySQL 8.0-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
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]
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
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. 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 and MySQL 8.0-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'
      { $sel:tags:CreateDBParameterGroup' :: Maybe [Tag]
tags = 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 :: Lens' CreateDBParameterGroup (Maybe [Tag])
createDBParameterGroup_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' CreateDBParameterGroup Text
createDBParameterGroup_dbParameterGroupName = 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 and MySQL 8.0-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 :: Lens' CreateDBParameterGroup Text
createDBParameterGroup_dbParameterGroupFamily = 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 :: Lens' CreateDBParameterGroup Text
createDBParameterGroup_description = 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 :: (Service -> Service)
-> CreateDBParameterGroup -> Request CreateDBParameterGroup
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateDBParameterGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBParameterGroup)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBParameterGroup")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateDBParameterGroup where
  hashWithSalt :: Int -> CreateDBParameterGroup -> Int
hashWithSalt Int
_salt 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]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbParameterGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbParameterGroupFamily
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
description

instance Prelude.NFData CreateDBParameterGroup where
  rnf :: CreateDBParameterGroup -> ()
rnf 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]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbParameterGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbParameterGroupFamily
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
description

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

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

instance Data.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]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateDBParameterGroup" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Tag" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"DBParameterGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbParameterGroupName,
        ByteString
"DBParameterGroupFamily"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbParameterGroupFamily,
        ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: 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
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]
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
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.
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'
    { $sel:dbParameterGroup:CreateDBParameterGroupResponse' :: Maybe DBParameterGroup
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 :: Lens' CreateDBParameterGroupResponse (Maybe DBParameterGroup)
createDBParameterGroupResponse_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 :: Lens' CreateDBParameterGroupResponse Int
createDBParameterGroupResponse_httpStatus = 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
  where
  rnf :: CreateDBParameterGroupResponse -> ()
rnf CreateDBParameterGroupResponse' {Int
Maybe DBParameterGroup
httpStatus :: Int
dbParameterGroup :: Maybe DBParameterGroup
$sel:httpStatus:CreateDBParameterGroupResponse' :: CreateDBParameterGroupResponse -> Int
$sel:dbParameterGroup:CreateDBParameterGroupResponse' :: CreateDBParameterGroupResponse -> Maybe DBParameterGroup
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DBParameterGroup
dbParameterGroup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus