{-# 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.OpsWorks.CreateStack
(
CreateStack (..),
newCreateStack,
createStack_defaultRootDeviceType,
createStack_vpcId,
createStack_chefConfiguration,
createStack_agentVersion,
createStack_defaultSshKeyName,
createStack_customJson,
createStack_customCookbooksSource,
createStack_defaultAvailabilityZone,
createStack_attributes,
createStack_defaultOs,
createStack_useOpsworksSecurityGroups,
createStack_useCustomCookbooks,
createStack_defaultSubnetId,
createStack_configurationManager,
createStack_hostnameTheme,
createStack_name,
createStack_region,
createStack_serviceRoleArn,
createStack_defaultInstanceProfileArn,
CreateStackResponse (..),
newCreateStackResponse,
createStackResponse_stackId,
createStackResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorks.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateStack = CreateStack'
{
CreateStack -> Maybe RootDeviceType
defaultRootDeviceType :: Prelude.Maybe RootDeviceType,
CreateStack -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe ChefConfiguration
chefConfiguration :: Prelude.Maybe ChefConfiguration,
CreateStack -> Maybe Text
agentVersion :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe Text
defaultSshKeyName :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe Text
customJson :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe Source
customCookbooksSource :: Prelude.Maybe Source,
CreateStack -> Maybe Text
defaultAvailabilityZone :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes :: Prelude.Maybe (Prelude.HashMap StackAttributesKeys (Prelude.Maybe Prelude.Text)),
CreateStack -> Maybe Text
defaultOs :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe Bool
useOpsworksSecurityGroups :: Prelude.Maybe Prelude.Bool,
CreateStack -> Maybe Bool
useCustomCookbooks :: Prelude.Maybe Prelude.Bool,
CreateStack -> Maybe Text
defaultSubnetId :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe StackConfigurationManager
configurationManager :: Prelude.Maybe StackConfigurationManager,
CreateStack -> Maybe Text
hostnameTheme :: Prelude.Maybe Prelude.Text,
CreateStack -> Text
name :: Prelude.Text,
CreateStack -> Text
region :: Prelude.Text,
CreateStack -> Text
serviceRoleArn :: Prelude.Text,
CreateStack -> Text
defaultInstanceProfileArn :: Prelude.Text
}
deriving (CreateStack -> CreateStack -> Bool
(CreateStack -> CreateStack -> Bool)
-> (CreateStack -> CreateStack -> Bool) -> Eq CreateStack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStack -> CreateStack -> Bool
$c/= :: CreateStack -> CreateStack -> Bool
== :: CreateStack -> CreateStack -> Bool
$c== :: CreateStack -> CreateStack -> Bool
Prelude.Eq, ReadPrec [CreateStack]
ReadPrec CreateStack
Int -> ReadS CreateStack
ReadS [CreateStack]
(Int -> ReadS CreateStack)
-> ReadS [CreateStack]
-> ReadPrec CreateStack
-> ReadPrec [CreateStack]
-> Read CreateStack
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStack]
$creadListPrec :: ReadPrec [CreateStack]
readPrec :: ReadPrec CreateStack
$creadPrec :: ReadPrec CreateStack
readList :: ReadS [CreateStack]
$creadList :: ReadS [CreateStack]
readsPrec :: Int -> ReadS CreateStack
$creadsPrec :: Int -> ReadS CreateStack
Prelude.Read, Int -> CreateStack -> ShowS
[CreateStack] -> ShowS
CreateStack -> String
(Int -> CreateStack -> ShowS)
-> (CreateStack -> String)
-> ([CreateStack] -> ShowS)
-> Show CreateStack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStack] -> ShowS
$cshowList :: [CreateStack] -> ShowS
show :: CreateStack -> String
$cshow :: CreateStack -> String
showsPrec :: Int -> CreateStack -> ShowS
$cshowsPrec :: Int -> CreateStack -> ShowS
Prelude.Show, (forall x. CreateStack -> Rep CreateStack x)
-> (forall x. Rep CreateStack x -> CreateStack)
-> Generic CreateStack
forall x. Rep CreateStack x -> CreateStack
forall x. CreateStack -> Rep CreateStack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStack x -> CreateStack
$cfrom :: forall x. CreateStack -> Rep CreateStack x
Prelude.Generic)
newCreateStack ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateStack
newCreateStack :: Text -> Text -> Text -> Text -> CreateStack
newCreateStack
Text
pName_
Text
pRegion_
Text
pServiceRoleArn_
Text
pDefaultInstanceProfileArn_ =
CreateStack' :: Maybe RootDeviceType
-> Maybe Text
-> Maybe ChefConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe (HashMap StackAttributesKeys (Maybe Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe StackConfigurationManager
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> CreateStack
CreateStack'
{ $sel:defaultRootDeviceType:CreateStack' :: Maybe RootDeviceType
defaultRootDeviceType =
Maybe RootDeviceType
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:CreateStack' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:chefConfiguration:CreateStack' :: Maybe ChefConfiguration
chefConfiguration = Maybe ChefConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:agentVersion:CreateStack' :: Maybe Text
agentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultSshKeyName:CreateStack' :: Maybe Text
defaultSshKeyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customJson:CreateStack' :: Maybe Text
customJson = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customCookbooksSource:CreateStack' :: Maybe Source
customCookbooksSource = Maybe Source
forall a. Maybe a
Prelude.Nothing,
$sel:defaultAvailabilityZone:CreateStack' :: Maybe Text
defaultAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributes:CreateStack' :: Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes = Maybe (HashMap StackAttributesKeys (Maybe Text))
forall a. Maybe a
Prelude.Nothing,
$sel:defaultOs:CreateStack' :: Maybe Text
defaultOs = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:useOpsworksSecurityGroups:CreateStack' :: Maybe Bool
useOpsworksSecurityGroups = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:useCustomCookbooks:CreateStack' :: Maybe Bool
useCustomCookbooks = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:defaultSubnetId:CreateStack' :: Maybe Text
defaultSubnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configurationManager:CreateStack' :: Maybe StackConfigurationManager
configurationManager = Maybe StackConfigurationManager
forall a. Maybe a
Prelude.Nothing,
$sel:hostnameTheme:CreateStack' :: Maybe Text
hostnameTheme = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateStack' :: Text
name = Text
pName_,
$sel:region:CreateStack' :: Text
region = Text
pRegion_,
$sel:serviceRoleArn:CreateStack' :: Text
serviceRoleArn = Text
pServiceRoleArn_,
$sel:defaultInstanceProfileArn:CreateStack' :: Text
defaultInstanceProfileArn =
Text
pDefaultInstanceProfileArn_
}
createStack_defaultRootDeviceType :: Lens.Lens' CreateStack (Prelude.Maybe RootDeviceType)
createStack_defaultRootDeviceType :: (Maybe RootDeviceType -> f (Maybe RootDeviceType))
-> CreateStack -> f CreateStack
createStack_defaultRootDeviceType = (CreateStack -> Maybe RootDeviceType)
-> (CreateStack -> Maybe RootDeviceType -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe RootDeviceType)
(Maybe RootDeviceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe RootDeviceType
defaultRootDeviceType :: Maybe RootDeviceType
$sel:defaultRootDeviceType:CreateStack' :: CreateStack -> Maybe RootDeviceType
defaultRootDeviceType} -> Maybe RootDeviceType
defaultRootDeviceType) (\s :: CreateStack
s@CreateStack' {} Maybe RootDeviceType
a -> CreateStack
s {$sel:defaultRootDeviceType:CreateStack' :: Maybe RootDeviceType
defaultRootDeviceType = Maybe RootDeviceType
a} :: CreateStack)
createStack_vpcId :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_vpcId :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_vpcId = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:CreateStack' :: CreateStack -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:vpcId:CreateStack' :: Maybe Text
vpcId = Maybe Text
a} :: CreateStack)
createStack_chefConfiguration :: Lens.Lens' CreateStack (Prelude.Maybe ChefConfiguration)
createStack_chefConfiguration :: (Maybe ChefConfiguration -> f (Maybe ChefConfiguration))
-> CreateStack -> f CreateStack
createStack_chefConfiguration = (CreateStack -> Maybe ChefConfiguration)
-> (CreateStack -> Maybe ChefConfiguration -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe ChefConfiguration)
(Maybe ChefConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe ChefConfiguration
chefConfiguration :: Maybe ChefConfiguration
$sel:chefConfiguration:CreateStack' :: CreateStack -> Maybe ChefConfiguration
chefConfiguration} -> Maybe ChefConfiguration
chefConfiguration) (\s :: CreateStack
s@CreateStack' {} Maybe ChefConfiguration
a -> CreateStack
s {$sel:chefConfiguration:CreateStack' :: Maybe ChefConfiguration
chefConfiguration = Maybe ChefConfiguration
a} :: CreateStack)
createStack_agentVersion :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_agentVersion :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_agentVersion = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
agentVersion :: Maybe Text
$sel:agentVersion:CreateStack' :: CreateStack -> Maybe Text
agentVersion} -> Maybe Text
agentVersion) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:agentVersion:CreateStack' :: Maybe Text
agentVersion = Maybe Text
a} :: CreateStack)
createStack_defaultSshKeyName :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_defaultSshKeyName :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_defaultSshKeyName = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
defaultSshKeyName :: Maybe Text
$sel:defaultSshKeyName:CreateStack' :: CreateStack -> Maybe Text
defaultSshKeyName} -> Maybe Text
defaultSshKeyName) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:defaultSshKeyName:CreateStack' :: Maybe Text
defaultSshKeyName = Maybe Text
a} :: CreateStack)
createStack_customJson :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_customJson :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_customJson = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
customJson :: Maybe Text
$sel:customJson:CreateStack' :: CreateStack -> Maybe Text
customJson} -> Maybe Text
customJson) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:customJson:CreateStack' :: Maybe Text
customJson = Maybe Text
a} :: CreateStack)
createStack_customCookbooksSource :: Lens.Lens' CreateStack (Prelude.Maybe Source)
createStack_customCookbooksSource :: (Maybe Source -> f (Maybe Source)) -> CreateStack -> f CreateStack
createStack_customCookbooksSource = (CreateStack -> Maybe Source)
-> (CreateStack -> Maybe Source -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Source) (Maybe Source)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Source
customCookbooksSource :: Maybe Source
$sel:customCookbooksSource:CreateStack' :: CreateStack -> Maybe Source
customCookbooksSource} -> Maybe Source
customCookbooksSource) (\s :: CreateStack
s@CreateStack' {} Maybe Source
a -> CreateStack
s {$sel:customCookbooksSource:CreateStack' :: Maybe Source
customCookbooksSource = Maybe Source
a} :: CreateStack)
createStack_defaultAvailabilityZone :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_defaultAvailabilityZone :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_defaultAvailabilityZone = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
defaultAvailabilityZone :: Maybe Text
$sel:defaultAvailabilityZone:CreateStack' :: CreateStack -> Maybe Text
defaultAvailabilityZone} -> Maybe Text
defaultAvailabilityZone) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:defaultAvailabilityZone:CreateStack' :: Maybe Text
defaultAvailabilityZone = Maybe Text
a} :: CreateStack)
createStack_attributes :: Lens.Lens' CreateStack (Prelude.Maybe (Prelude.HashMap StackAttributesKeys (Prelude.Maybe Prelude.Text)))
createStack_attributes :: (Maybe (HashMap StackAttributesKeys (Maybe Text))
-> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> CreateStack -> f CreateStack
createStack_attributes = (CreateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text)))
-> (CreateStack
-> Maybe (HashMap StackAttributesKeys (Maybe Text)) -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe (HashMap StackAttributesKeys (Maybe Text)))
(Maybe (HashMap StackAttributesKeys (Maybe Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes :: Maybe (HashMap StackAttributesKeys (Maybe Text))
$sel:attributes:CreateStack' :: CreateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes} -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes) (\s :: CreateStack
s@CreateStack' {} Maybe (HashMap StackAttributesKeys (Maybe Text))
a -> CreateStack
s {$sel:attributes:CreateStack' :: Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes = Maybe (HashMap StackAttributesKeys (Maybe Text))
a} :: CreateStack) ((Maybe (HashMap StackAttributesKeys (Maybe Text))
-> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> CreateStack -> f CreateStack)
-> ((Maybe (HashMap StackAttributesKeys (Maybe Text))
-> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> Maybe (HashMap StackAttributesKeys (Maybe Text))
-> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> (Maybe (HashMap StackAttributesKeys (Maybe Text))
-> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> CreateStack
-> f CreateStack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap StackAttributesKeys (Maybe Text))
(HashMap StackAttributesKeys (Maybe Text))
(HashMap StackAttributesKeys (Maybe Text))
(HashMap StackAttributesKeys (Maybe Text))
-> Iso
(Maybe (HashMap StackAttributesKeys (Maybe Text)))
(Maybe (HashMap StackAttributesKeys (Maybe Text)))
(Maybe (HashMap StackAttributesKeys (Maybe Text)))
(Maybe (HashMap StackAttributesKeys (Maybe Text)))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap StackAttributesKeys (Maybe Text))
(HashMap StackAttributesKeys (Maybe Text))
(HashMap StackAttributesKeys (Maybe Text))
(HashMap StackAttributesKeys (Maybe Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStack_defaultOs :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_defaultOs :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_defaultOs = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
defaultOs :: Maybe Text
$sel:defaultOs:CreateStack' :: CreateStack -> Maybe Text
defaultOs} -> Maybe Text
defaultOs) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:defaultOs:CreateStack' :: Maybe Text
defaultOs = Maybe Text
a} :: CreateStack)
createStack_useOpsworksSecurityGroups :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Bool)
createStack_useOpsworksSecurityGroups :: (Maybe Bool -> f (Maybe Bool)) -> CreateStack -> f CreateStack
createStack_useOpsworksSecurityGroups = (CreateStack -> Maybe Bool)
-> (CreateStack -> Maybe Bool -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Bool
useOpsworksSecurityGroups :: Maybe Bool
$sel:useOpsworksSecurityGroups:CreateStack' :: CreateStack -> Maybe Bool
useOpsworksSecurityGroups} -> Maybe Bool
useOpsworksSecurityGroups) (\s :: CreateStack
s@CreateStack' {} Maybe Bool
a -> CreateStack
s {$sel:useOpsworksSecurityGroups:CreateStack' :: Maybe Bool
useOpsworksSecurityGroups = Maybe Bool
a} :: CreateStack)
createStack_useCustomCookbooks :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Bool)
createStack_useCustomCookbooks :: (Maybe Bool -> f (Maybe Bool)) -> CreateStack -> f CreateStack
createStack_useCustomCookbooks = (CreateStack -> Maybe Bool)
-> (CreateStack -> Maybe Bool -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Bool
useCustomCookbooks :: Maybe Bool
$sel:useCustomCookbooks:CreateStack' :: CreateStack -> Maybe Bool
useCustomCookbooks} -> Maybe Bool
useCustomCookbooks) (\s :: CreateStack
s@CreateStack' {} Maybe Bool
a -> CreateStack
s {$sel:useCustomCookbooks:CreateStack' :: Maybe Bool
useCustomCookbooks = Maybe Bool
a} :: CreateStack)
createStack_defaultSubnetId :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_defaultSubnetId :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_defaultSubnetId = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
defaultSubnetId :: Maybe Text
$sel:defaultSubnetId:CreateStack' :: CreateStack -> Maybe Text
defaultSubnetId} -> Maybe Text
defaultSubnetId) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:defaultSubnetId:CreateStack' :: Maybe Text
defaultSubnetId = Maybe Text
a} :: CreateStack)
createStack_configurationManager :: Lens.Lens' CreateStack (Prelude.Maybe StackConfigurationManager)
createStack_configurationManager :: (Maybe StackConfigurationManager
-> f (Maybe StackConfigurationManager))
-> CreateStack -> f CreateStack
createStack_configurationManager = (CreateStack -> Maybe StackConfigurationManager)
-> (CreateStack -> Maybe StackConfigurationManager -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe StackConfigurationManager)
(Maybe StackConfigurationManager)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe StackConfigurationManager
configurationManager :: Maybe StackConfigurationManager
$sel:configurationManager:CreateStack' :: CreateStack -> Maybe StackConfigurationManager
configurationManager} -> Maybe StackConfigurationManager
configurationManager) (\s :: CreateStack
s@CreateStack' {} Maybe StackConfigurationManager
a -> CreateStack
s {$sel:configurationManager:CreateStack' :: Maybe StackConfigurationManager
configurationManager = Maybe StackConfigurationManager
a} :: CreateStack)
createStack_hostnameTheme :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_hostnameTheme :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_hostnameTheme = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
hostnameTheme :: Maybe Text
$sel:hostnameTheme:CreateStack' :: CreateStack -> Maybe Text
hostnameTheme} -> Maybe Text
hostnameTheme) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:hostnameTheme:CreateStack' :: Maybe Text
hostnameTheme = Maybe Text
a} :: CreateStack)
createStack_name :: Lens.Lens' CreateStack Prelude.Text
createStack_name :: (Text -> f Text) -> CreateStack -> f CreateStack
createStack_name = (CreateStack -> Text)
-> (CreateStack -> Text -> CreateStack)
-> Lens CreateStack CreateStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Text
name :: Text
$sel:name:CreateStack' :: CreateStack -> Text
name} -> Text
name) (\s :: CreateStack
s@CreateStack' {} Text
a -> CreateStack
s {$sel:name:CreateStack' :: Text
name = Text
a} :: CreateStack)
createStack_region :: Lens.Lens' CreateStack Prelude.Text
createStack_region :: (Text -> f Text) -> CreateStack -> f CreateStack
createStack_region = (CreateStack -> Text)
-> (CreateStack -> Text -> CreateStack)
-> Lens CreateStack CreateStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Text
region :: Text
$sel:region:CreateStack' :: CreateStack -> Text
region} -> Text
region) (\s :: CreateStack
s@CreateStack' {} Text
a -> CreateStack
s {$sel:region:CreateStack' :: Text
region = Text
a} :: CreateStack)
createStack_serviceRoleArn :: Lens.Lens' CreateStack Prelude.Text
createStack_serviceRoleArn :: (Text -> f Text) -> CreateStack -> f CreateStack
createStack_serviceRoleArn = (CreateStack -> Text)
-> (CreateStack -> Text -> CreateStack)
-> Lens CreateStack CreateStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Text
serviceRoleArn :: Text
$sel:serviceRoleArn:CreateStack' :: CreateStack -> Text
serviceRoleArn} -> Text
serviceRoleArn) (\s :: CreateStack
s@CreateStack' {} Text
a -> CreateStack
s {$sel:serviceRoleArn:CreateStack' :: Text
serviceRoleArn = Text
a} :: CreateStack)
createStack_defaultInstanceProfileArn :: Lens.Lens' CreateStack Prelude.Text
createStack_defaultInstanceProfileArn :: (Text -> f Text) -> CreateStack -> f CreateStack
createStack_defaultInstanceProfileArn = (CreateStack -> Text)
-> (CreateStack -> Text -> CreateStack)
-> Lens CreateStack CreateStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Text
defaultInstanceProfileArn :: Text
$sel:defaultInstanceProfileArn:CreateStack' :: CreateStack -> Text
defaultInstanceProfileArn} -> Text
defaultInstanceProfileArn) (\s :: CreateStack
s@CreateStack' {} Text
a -> CreateStack
s {$sel:defaultInstanceProfileArn:CreateStack' :: Text
defaultInstanceProfileArn = Text
a} :: CreateStack)
instance Core.AWSRequest CreateStack where
type AWSResponse CreateStack = CreateStackResponse
request :: CreateStack -> Request CreateStack
request = Service -> CreateStack -> Request CreateStack
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStack)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateStack))
-> Logger
-> Service
-> Proxy CreateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStack)))
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 ->
Maybe Text -> Int -> CreateStackResponse
CreateStackResponse'
(Maybe Text -> Int -> CreateStackResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateStackResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StackId")
Either String (Int -> CreateStackResponse)
-> Either String Int -> Either String CreateStackResponse
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 CreateStack
instance Prelude.NFData CreateStack
instance Core.ToHeaders CreateStack where
toHeaders :: CreateStack -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateStack -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"OpsWorks_20130218.CreateStack" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateStack where
toJSON :: CreateStack -> Value
toJSON CreateStack' {Maybe Bool
Maybe Text
Maybe (HashMap StackAttributesKeys (Maybe Text))
Maybe ChefConfiguration
Maybe RootDeviceType
Maybe Source
Maybe StackConfigurationManager
Text
defaultInstanceProfileArn :: Text
serviceRoleArn :: Text
region :: Text
name :: Text
hostnameTheme :: Maybe Text
configurationManager :: Maybe StackConfigurationManager
defaultSubnetId :: Maybe Text
useCustomCookbooks :: Maybe Bool
useOpsworksSecurityGroups :: Maybe Bool
defaultOs :: Maybe Text
attributes :: Maybe (HashMap StackAttributesKeys (Maybe Text))
defaultAvailabilityZone :: Maybe Text
customCookbooksSource :: Maybe Source
customJson :: Maybe Text
defaultSshKeyName :: Maybe Text
agentVersion :: Maybe Text
chefConfiguration :: Maybe ChefConfiguration
vpcId :: Maybe Text
defaultRootDeviceType :: Maybe RootDeviceType
$sel:defaultInstanceProfileArn:CreateStack' :: CreateStack -> Text
$sel:serviceRoleArn:CreateStack' :: CreateStack -> Text
$sel:region:CreateStack' :: CreateStack -> Text
$sel:name:CreateStack' :: CreateStack -> Text
$sel:hostnameTheme:CreateStack' :: CreateStack -> Maybe Text
$sel:configurationManager:CreateStack' :: CreateStack -> Maybe StackConfigurationManager
$sel:defaultSubnetId:CreateStack' :: CreateStack -> Maybe Text
$sel:useCustomCookbooks:CreateStack' :: CreateStack -> Maybe Bool
$sel:useOpsworksSecurityGroups:CreateStack' :: CreateStack -> Maybe Bool
$sel:defaultOs:CreateStack' :: CreateStack -> Maybe Text
$sel:attributes:CreateStack' :: CreateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
$sel:defaultAvailabilityZone:CreateStack' :: CreateStack -> Maybe Text
$sel:customCookbooksSource:CreateStack' :: CreateStack -> Maybe Source
$sel:customJson:CreateStack' :: CreateStack -> Maybe Text
$sel:defaultSshKeyName:CreateStack' :: CreateStack -> Maybe Text
$sel:agentVersion:CreateStack' :: CreateStack -> Maybe Text
$sel:chefConfiguration:CreateStack' :: CreateStack -> Maybe ChefConfiguration
$sel:vpcId:CreateStack' :: CreateStack -> Maybe Text
$sel:defaultRootDeviceType:CreateStack' :: CreateStack -> Maybe RootDeviceType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DefaultRootDeviceType" Text -> RootDeviceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(RootDeviceType -> Pair) -> Maybe RootDeviceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RootDeviceType
defaultRootDeviceType,
(Text
"VpcId" 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
vpcId,
(Text
"ChefConfiguration" Text -> ChefConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ChefConfiguration -> Pair)
-> Maybe ChefConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChefConfiguration
chefConfiguration,
(Text
"AgentVersion" 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
agentVersion,
(Text
"DefaultSshKeyName" 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
defaultSshKeyName,
(Text
"CustomJson" 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
customJson,
(Text
"CustomCookbooksSource" Text -> Source -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Source -> Pair) -> Maybe Source -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Source
customCookbooksSource,
(Text
"DefaultAvailabilityZone" 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
defaultAvailabilityZone,
(Text
"Attributes" Text -> HashMap StackAttributesKeys (Maybe Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap StackAttributesKeys (Maybe Text) -> Pair)
-> Maybe (HashMap StackAttributesKeys (Maybe Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes,
(Text
"DefaultOs" 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
defaultOs,
(Text
"UseOpsworksSecurityGroups" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useOpsworksSecurityGroups,
(Text
"UseCustomCookbooks" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useCustomCookbooks,
(Text
"DefaultSubnetId" 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
defaultSubnetId,
(Text
"ConfigurationManager" Text -> StackConfigurationManager -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(StackConfigurationManager -> Pair)
-> Maybe StackConfigurationManager -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StackConfigurationManager
configurationManager,
(Text
"HostnameTheme" 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
hostnameTheme,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Region" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
region),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ServiceRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceRoleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"DefaultInstanceProfileArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
defaultInstanceProfileArn
)
]
)
instance Core.ToPath CreateStack where
toPath :: CreateStack -> ByteString
toPath = ByteString -> CreateStack -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateStack where
toQuery :: CreateStack -> QueryString
toQuery = QueryString -> CreateStack -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateStackResponse = CreateStackResponse'
{
CreateStackResponse -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
CreateStackResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateStackResponse -> CreateStackResponse -> Bool
(CreateStackResponse -> CreateStackResponse -> Bool)
-> (CreateStackResponse -> CreateStackResponse -> Bool)
-> Eq CreateStackResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStackResponse -> CreateStackResponse -> Bool
$c/= :: CreateStackResponse -> CreateStackResponse -> Bool
== :: CreateStackResponse -> CreateStackResponse -> Bool
$c== :: CreateStackResponse -> CreateStackResponse -> Bool
Prelude.Eq, ReadPrec [CreateStackResponse]
ReadPrec CreateStackResponse
Int -> ReadS CreateStackResponse
ReadS [CreateStackResponse]
(Int -> ReadS CreateStackResponse)
-> ReadS [CreateStackResponse]
-> ReadPrec CreateStackResponse
-> ReadPrec [CreateStackResponse]
-> Read CreateStackResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStackResponse]
$creadListPrec :: ReadPrec [CreateStackResponse]
readPrec :: ReadPrec CreateStackResponse
$creadPrec :: ReadPrec CreateStackResponse
readList :: ReadS [CreateStackResponse]
$creadList :: ReadS [CreateStackResponse]
readsPrec :: Int -> ReadS CreateStackResponse
$creadsPrec :: Int -> ReadS CreateStackResponse
Prelude.Read, Int -> CreateStackResponse -> ShowS
[CreateStackResponse] -> ShowS
CreateStackResponse -> String
(Int -> CreateStackResponse -> ShowS)
-> (CreateStackResponse -> String)
-> ([CreateStackResponse] -> ShowS)
-> Show CreateStackResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStackResponse] -> ShowS
$cshowList :: [CreateStackResponse] -> ShowS
show :: CreateStackResponse -> String
$cshow :: CreateStackResponse -> String
showsPrec :: Int -> CreateStackResponse -> ShowS
$cshowsPrec :: Int -> CreateStackResponse -> ShowS
Prelude.Show, (forall x. CreateStackResponse -> Rep CreateStackResponse x)
-> (forall x. Rep CreateStackResponse x -> CreateStackResponse)
-> Generic CreateStackResponse
forall x. Rep CreateStackResponse x -> CreateStackResponse
forall x. CreateStackResponse -> Rep CreateStackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStackResponse x -> CreateStackResponse
$cfrom :: forall x. CreateStackResponse -> Rep CreateStackResponse x
Prelude.Generic)
newCreateStackResponse ::
Prelude.Int ->
CreateStackResponse
newCreateStackResponse :: Int -> CreateStackResponse
newCreateStackResponse Int
pHttpStatus_ =
CreateStackResponse' :: Maybe Text -> Int -> CreateStackResponse
CreateStackResponse'
{ $sel:stackId:CreateStackResponse' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStackResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStackResponse_stackId :: Lens.Lens' CreateStackResponse (Prelude.Maybe Prelude.Text)
createStackResponse_stackId :: (Maybe Text -> f (Maybe Text))
-> CreateStackResponse -> f CreateStackResponse
createStackResponse_stackId = (CreateStackResponse -> Maybe Text)
-> (CreateStackResponse -> Maybe Text -> CreateStackResponse)
-> Lens
CreateStackResponse CreateStackResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackResponse' {Maybe Text
stackId :: Maybe Text
$sel:stackId:CreateStackResponse' :: CreateStackResponse -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: CreateStackResponse
s@CreateStackResponse' {} Maybe Text
a -> CreateStackResponse
s {$sel:stackId:CreateStackResponse' :: Maybe Text
stackId = Maybe Text
a} :: CreateStackResponse)
createStackResponse_httpStatus :: Lens.Lens' CreateStackResponse Prelude.Int
createStackResponse_httpStatus :: (Int -> f Int) -> CreateStackResponse -> f CreateStackResponse
createStackResponse_httpStatus = (CreateStackResponse -> Int)
-> (CreateStackResponse -> Int -> CreateStackResponse)
-> Lens CreateStackResponse CreateStackResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateStackResponse' :: CreateStackResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateStackResponse
s@CreateStackResponse' {} Int
a -> CreateStackResponse
s {$sel:httpStatus:CreateStackResponse' :: Int
httpStatus = Int
a} :: CreateStackResponse)
instance Prelude.NFData CreateStackResponse