{-# 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 #-}
module Amazonka.DocumentDB.CreateDBInstance
(
CreateDBInstance (..),
newCreateDBInstance,
createDBInstance_autoMinorVersionUpgrade,
createDBInstance_promotionTier,
createDBInstance_preferredMaintenanceWindow,
createDBInstance_availabilityZone,
createDBInstance_tags,
createDBInstance_dbInstanceIdentifier,
createDBInstance_dbInstanceClass,
createDBInstance_engine,
createDBInstance_dbClusterIdentifier,
CreateDBInstanceResponse (..),
newCreateDBInstanceResponse,
createDBInstanceResponse_dbInstance,
createDBInstanceResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.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
data CreateDBInstance = CreateDBInstance'
{
CreateDBInstance -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
CreateDBInstance -> Maybe Int
promotionTier :: Prelude.Maybe Prelude.Int,
CreateDBInstance -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
CreateDBInstance -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
CreateDBInstance -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateDBInstance -> Text
dbInstanceIdentifier :: Prelude.Text,
CreateDBInstance -> Text
dbInstanceClass :: Prelude.Text,
CreateDBInstance -> Text
engine :: Prelude.Text,
CreateDBInstance -> Text
dbClusterIdentifier :: Prelude.Text
}
deriving (CreateDBInstance -> CreateDBInstance -> Bool
(CreateDBInstance -> CreateDBInstance -> Bool)
-> (CreateDBInstance -> CreateDBInstance -> Bool)
-> Eq CreateDBInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBInstance -> CreateDBInstance -> Bool
$c/= :: CreateDBInstance -> CreateDBInstance -> Bool
== :: CreateDBInstance -> CreateDBInstance -> Bool
$c== :: CreateDBInstance -> CreateDBInstance -> Bool
Prelude.Eq, ReadPrec [CreateDBInstance]
ReadPrec CreateDBInstance
Int -> ReadS CreateDBInstance
ReadS [CreateDBInstance]
(Int -> ReadS CreateDBInstance)
-> ReadS [CreateDBInstance]
-> ReadPrec CreateDBInstance
-> ReadPrec [CreateDBInstance]
-> Read CreateDBInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBInstance]
$creadListPrec :: ReadPrec [CreateDBInstance]
readPrec :: ReadPrec CreateDBInstance
$creadPrec :: ReadPrec CreateDBInstance
readList :: ReadS [CreateDBInstance]
$creadList :: ReadS [CreateDBInstance]
readsPrec :: Int -> ReadS CreateDBInstance
$creadsPrec :: Int -> ReadS CreateDBInstance
Prelude.Read, Int -> CreateDBInstance -> ShowS
[CreateDBInstance] -> ShowS
CreateDBInstance -> String
(Int -> CreateDBInstance -> ShowS)
-> (CreateDBInstance -> String)
-> ([CreateDBInstance] -> ShowS)
-> Show CreateDBInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBInstance] -> ShowS
$cshowList :: [CreateDBInstance] -> ShowS
show :: CreateDBInstance -> String
$cshow :: CreateDBInstance -> String
showsPrec :: Int -> CreateDBInstance -> ShowS
$cshowsPrec :: Int -> CreateDBInstance -> ShowS
Prelude.Show, (forall x. CreateDBInstance -> Rep CreateDBInstance x)
-> (forall x. Rep CreateDBInstance x -> CreateDBInstance)
-> Generic CreateDBInstance
forall x. Rep CreateDBInstance x -> CreateDBInstance
forall x. CreateDBInstance -> Rep CreateDBInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBInstance x -> CreateDBInstance
$cfrom :: forall x. CreateDBInstance -> Rep CreateDBInstance x
Prelude.Generic)
newCreateDBInstance ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateDBInstance
newCreateDBInstance :: Text -> Text -> Text -> Text -> CreateDBInstance
newCreateDBInstance
Text
pDBInstanceIdentifier_
Text
pDBInstanceClass_
Text
pEngine_
Text
pDBClusterIdentifier_ =
CreateDBInstance' :: Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> Text
-> CreateDBInstance
CreateDBInstance'
{ $sel:autoMinorVersionUpgrade:CreateDBInstance' :: Maybe Bool
autoMinorVersionUpgrade =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:promotionTier:CreateDBInstance' :: Maybe Int
promotionTier = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:preferredMaintenanceWindow:CreateDBInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZone:CreateDBInstance' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateDBInstance' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:dbInstanceIdentifier:CreateDBInstance' :: Text
dbInstanceIdentifier = Text
pDBInstanceIdentifier_,
$sel:dbInstanceClass:CreateDBInstance' :: Text
dbInstanceClass = Text
pDBInstanceClass_,
$sel:engine:CreateDBInstance' :: Text
engine = Text
pEngine_,
$sel:dbClusterIdentifier:CreateDBInstance' :: Text
dbClusterIdentifier = Text
pDBClusterIdentifier_
}
createDBInstance_autoMinorVersionUpgrade :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Bool)
createDBInstance_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_autoMinorVersionUpgrade = (CreateDBInstance -> Maybe Bool)
-> (CreateDBInstance -> Maybe Bool -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Bool
a -> CreateDBInstance
s {$sel:autoMinorVersionUpgrade:CreateDBInstance' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: CreateDBInstance)
createDBInstance_promotionTier :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Int)
createDBInstance_promotionTier :: (Maybe Int -> f (Maybe Int))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_promotionTier = (CreateDBInstance -> Maybe Int)
-> (CreateDBInstance -> Maybe Int -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Int
promotionTier :: Maybe Int
$sel:promotionTier:CreateDBInstance' :: CreateDBInstance -> Maybe Int
promotionTier} -> Maybe Int
promotionTier) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Int
a -> CreateDBInstance
s {$sel:promotionTier:CreateDBInstance' :: Maybe Int
promotionTier = Maybe Int
a} :: CreateDBInstance)
createDBInstance_preferredMaintenanceWindow :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_preferredMaintenanceWindow = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CreateDBInstance' :: CreateDBInstance -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:preferredMaintenanceWindow:CreateDBInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CreateDBInstance)
createDBInstance_availabilityZone :: Lens.Lens' CreateDBInstance (Prelude.Maybe Prelude.Text)
createDBInstance_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_availabilityZone = (CreateDBInstance -> Maybe Text)
-> (CreateDBInstance -> Maybe Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:CreateDBInstance' :: CreateDBInstance -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe Text
a -> CreateDBInstance
s {$sel:availabilityZone:CreateDBInstance' :: Maybe Text
availabilityZone = Maybe Text
a} :: CreateDBInstance)
createDBInstance_tags :: Lens.Lens' CreateDBInstance (Prelude.Maybe [Tag])
createDBInstance_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBInstance -> f CreateDBInstance
createDBInstance_tags = (CreateDBInstance -> Maybe [Tag])
-> (CreateDBInstance -> Maybe [Tag] -> CreateDBInstance)
-> Lens
CreateDBInstance CreateDBInstance (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBInstance' :: CreateDBInstance -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBInstance
s@CreateDBInstance' {} Maybe [Tag]
a -> CreateDBInstance
s {$sel:tags:CreateDBInstance' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBInstance) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBInstance -> f CreateDBInstance)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBInstance
-> f CreateDBInstance
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
createDBInstance_dbInstanceIdentifier :: Lens.Lens' CreateDBInstance Prelude.Text
createDBInstance_dbInstanceIdentifier :: (Text -> f Text) -> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbInstanceIdentifier = (CreateDBInstance -> Text)
-> (CreateDBInstance -> Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Text
dbInstanceIdentifier :: Text
$sel:dbInstanceIdentifier:CreateDBInstance' :: CreateDBInstance -> Text
dbInstanceIdentifier} -> Text
dbInstanceIdentifier) (\s :: CreateDBInstance
s@CreateDBInstance' {} Text
a -> CreateDBInstance
s {$sel:dbInstanceIdentifier:CreateDBInstance' :: Text
dbInstanceIdentifier = Text
a} :: CreateDBInstance)
createDBInstance_dbInstanceClass :: Lens.Lens' CreateDBInstance Prelude.Text
createDBInstance_dbInstanceClass :: (Text -> f Text) -> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbInstanceClass = (CreateDBInstance -> Text)
-> (CreateDBInstance -> Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Text
dbInstanceClass :: Text
$sel:dbInstanceClass:CreateDBInstance' :: CreateDBInstance -> Text
dbInstanceClass} -> Text
dbInstanceClass) (\s :: CreateDBInstance
s@CreateDBInstance' {} Text
a -> CreateDBInstance
s {$sel:dbInstanceClass:CreateDBInstance' :: Text
dbInstanceClass = Text
a} :: CreateDBInstance)
createDBInstance_engine :: Lens.Lens' CreateDBInstance Prelude.Text
createDBInstance_engine :: (Text -> f Text) -> CreateDBInstance -> f CreateDBInstance
createDBInstance_engine = (CreateDBInstance -> Text)
-> (CreateDBInstance -> Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Text
engine :: Text
$sel:engine:CreateDBInstance' :: CreateDBInstance -> Text
engine} -> Text
engine) (\s :: CreateDBInstance
s@CreateDBInstance' {} Text
a -> CreateDBInstance
s {$sel:engine:CreateDBInstance' :: Text
engine = Text
a} :: CreateDBInstance)
createDBInstance_dbClusterIdentifier :: Lens.Lens' CreateDBInstance Prelude.Text
createDBInstance_dbClusterIdentifier :: (Text -> f Text) -> CreateDBInstance -> f CreateDBInstance
createDBInstance_dbClusterIdentifier = (CreateDBInstance -> Text)
-> (CreateDBInstance -> Text -> CreateDBInstance)
-> Lens CreateDBInstance CreateDBInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstance' {Text
dbClusterIdentifier :: Text
$sel:dbClusterIdentifier:CreateDBInstance' :: CreateDBInstance -> Text
dbClusterIdentifier} -> Text
dbClusterIdentifier) (\s :: CreateDBInstance
s@CreateDBInstance' {} Text
a -> CreateDBInstance
s {$sel:dbClusterIdentifier:CreateDBInstance' :: Text
dbClusterIdentifier = Text
a} :: CreateDBInstance)
instance Core.AWSRequest CreateDBInstance where
type
AWSResponse CreateDBInstance =
CreateDBInstanceResponse
request :: CreateDBInstance -> Request CreateDBInstance
request = Service -> CreateDBInstance -> Request CreateDBInstance
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy CreateDBInstance
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDBInstance)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse CreateDBInstance))
-> Logger
-> Service
-> Proxy CreateDBInstance
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDBInstance)))
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
"CreateDBInstanceResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DBInstance -> Int -> CreateDBInstanceResponse
CreateDBInstanceResponse'
(Maybe DBInstance -> Int -> CreateDBInstanceResponse)
-> Either String (Maybe DBInstance)
-> Either String (Int -> CreateDBInstanceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBInstance)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBInstance")
Either String (Int -> CreateDBInstanceResponse)
-> Either String Int -> Either String CreateDBInstanceResponse
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 CreateDBInstance
instance Prelude.NFData CreateDBInstance
instance Core.ToHeaders CreateDBInstance where
toHeaders :: CreateDBInstance -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateDBInstance -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CreateDBInstance where
toPath :: CreateDBInstance -> ByteString
toPath = ByteString -> CreateDBInstance -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateDBInstance where
toQuery :: CreateDBInstance -> QueryString
toQuery CreateDBInstance' {Maybe Bool
Maybe Int
Maybe [Tag]
Maybe Text
Text
dbClusterIdentifier :: Text
engine :: Text
dbInstanceClass :: Text
dbInstanceIdentifier :: Text
tags :: Maybe [Tag]
availabilityZone :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
promotionTier :: Maybe Int
autoMinorVersionUpgrade :: Maybe Bool
$sel:dbClusterIdentifier:CreateDBInstance' :: CreateDBInstance -> Text
$sel:engine:CreateDBInstance' :: CreateDBInstance -> Text
$sel:dbInstanceClass:CreateDBInstance' :: CreateDBInstance -> Text
$sel:dbInstanceIdentifier:CreateDBInstance' :: CreateDBInstance -> Text
$sel:tags:CreateDBInstance' :: CreateDBInstance -> Maybe [Tag]
$sel:availabilityZone:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:preferredMaintenanceWindow:CreateDBInstance' :: CreateDBInstance -> Maybe Text
$sel:promotionTier:CreateDBInstance' :: CreateDBInstance -> Maybe Int
$sel:autoMinorVersionUpgrade:CreateDBInstance' :: CreateDBInstance -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateDBInstance" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"AutoMinorVersionUpgrade"
ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
autoMinorVersionUpgrade,
ByteString
"PromotionTier" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
promotionTier,
ByteString
"PreferredMaintenanceWindow"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preferredMaintenanceWindow,
ByteString
"AvailabilityZone" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
availabilityZone,
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
"DBInstanceIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbInstanceIdentifier,
ByteString
"DBInstanceClass" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbInstanceClass,
ByteString
"Engine" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
engine,
ByteString
"DBClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterIdentifier
]
data CreateDBInstanceResponse = CreateDBInstanceResponse'
{ CreateDBInstanceResponse -> Maybe DBInstance
dbInstance :: Prelude.Maybe DBInstance,
CreateDBInstanceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateDBInstanceResponse -> CreateDBInstanceResponse -> Bool
(CreateDBInstanceResponse -> CreateDBInstanceResponse -> Bool)
-> (CreateDBInstanceResponse -> CreateDBInstanceResponse -> Bool)
-> Eq CreateDBInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBInstanceResponse -> CreateDBInstanceResponse -> Bool
$c/= :: CreateDBInstanceResponse -> CreateDBInstanceResponse -> Bool
== :: CreateDBInstanceResponse -> CreateDBInstanceResponse -> Bool
$c== :: CreateDBInstanceResponse -> CreateDBInstanceResponse -> Bool
Prelude.Eq, ReadPrec [CreateDBInstanceResponse]
ReadPrec CreateDBInstanceResponse
Int -> ReadS CreateDBInstanceResponse
ReadS [CreateDBInstanceResponse]
(Int -> ReadS CreateDBInstanceResponse)
-> ReadS [CreateDBInstanceResponse]
-> ReadPrec CreateDBInstanceResponse
-> ReadPrec [CreateDBInstanceResponse]
-> Read CreateDBInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBInstanceResponse]
$creadListPrec :: ReadPrec [CreateDBInstanceResponse]
readPrec :: ReadPrec CreateDBInstanceResponse
$creadPrec :: ReadPrec CreateDBInstanceResponse
readList :: ReadS [CreateDBInstanceResponse]
$creadList :: ReadS [CreateDBInstanceResponse]
readsPrec :: Int -> ReadS CreateDBInstanceResponse
$creadsPrec :: Int -> ReadS CreateDBInstanceResponse
Prelude.Read, Int -> CreateDBInstanceResponse -> ShowS
[CreateDBInstanceResponse] -> ShowS
CreateDBInstanceResponse -> String
(Int -> CreateDBInstanceResponse -> ShowS)
-> (CreateDBInstanceResponse -> String)
-> ([CreateDBInstanceResponse] -> ShowS)
-> Show CreateDBInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBInstanceResponse] -> ShowS
$cshowList :: [CreateDBInstanceResponse] -> ShowS
show :: CreateDBInstanceResponse -> String
$cshow :: CreateDBInstanceResponse -> String
showsPrec :: Int -> CreateDBInstanceResponse -> ShowS
$cshowsPrec :: Int -> CreateDBInstanceResponse -> ShowS
Prelude.Show, (forall x.
CreateDBInstanceResponse -> Rep CreateDBInstanceResponse x)
-> (forall x.
Rep CreateDBInstanceResponse x -> CreateDBInstanceResponse)
-> Generic CreateDBInstanceResponse
forall x.
Rep CreateDBInstanceResponse x -> CreateDBInstanceResponse
forall x.
CreateDBInstanceResponse -> Rep CreateDBInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDBInstanceResponse x -> CreateDBInstanceResponse
$cfrom :: forall x.
CreateDBInstanceResponse -> Rep CreateDBInstanceResponse x
Prelude.Generic)
newCreateDBInstanceResponse ::
Prelude.Int ->
CreateDBInstanceResponse
newCreateDBInstanceResponse :: Int -> CreateDBInstanceResponse
newCreateDBInstanceResponse Int
pHttpStatus_ =
CreateDBInstanceResponse' :: Maybe DBInstance -> Int -> CreateDBInstanceResponse
CreateDBInstanceResponse'
{ $sel:dbInstance:CreateDBInstanceResponse' :: Maybe DBInstance
dbInstance =
Maybe DBInstance
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateDBInstanceResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createDBInstanceResponse_dbInstance :: Lens.Lens' CreateDBInstanceResponse (Prelude.Maybe DBInstance)
createDBInstanceResponse_dbInstance :: (Maybe DBInstance -> f (Maybe DBInstance))
-> CreateDBInstanceResponse -> f CreateDBInstanceResponse
createDBInstanceResponse_dbInstance = (CreateDBInstanceResponse -> Maybe DBInstance)
-> (CreateDBInstanceResponse
-> Maybe DBInstance -> CreateDBInstanceResponse)
-> Lens
CreateDBInstanceResponse
CreateDBInstanceResponse
(Maybe DBInstance)
(Maybe DBInstance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceResponse' {Maybe DBInstance
dbInstance :: Maybe DBInstance
$sel:dbInstance:CreateDBInstanceResponse' :: CreateDBInstanceResponse -> Maybe DBInstance
dbInstance} -> Maybe DBInstance
dbInstance) (\s :: CreateDBInstanceResponse
s@CreateDBInstanceResponse' {} Maybe DBInstance
a -> CreateDBInstanceResponse
s {$sel:dbInstance:CreateDBInstanceResponse' :: Maybe DBInstance
dbInstance = Maybe DBInstance
a} :: CreateDBInstanceResponse)
createDBInstanceResponse_httpStatus :: Lens.Lens' CreateDBInstanceResponse Prelude.Int
createDBInstanceResponse_httpStatus :: (Int -> f Int)
-> CreateDBInstanceResponse -> f CreateDBInstanceResponse
createDBInstanceResponse_httpStatus = (CreateDBInstanceResponse -> Int)
-> (CreateDBInstanceResponse -> Int -> CreateDBInstanceResponse)
-> Lens CreateDBInstanceResponse CreateDBInstanceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBInstanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDBInstanceResponse' :: CreateDBInstanceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDBInstanceResponse
s@CreateDBInstanceResponse' {} Int
a -> CreateDBInstanceResponse
s {$sel:httpStatus:CreateDBInstanceResponse' :: Int
httpStatus = Int
a} :: CreateDBInstanceResponse)
instance Prelude.NFData CreateDBInstanceResponse