{-# 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.CodeDeploy.CreateDeployment
(
CreateDeployment (..),
newCreateDeployment,
createDeployment_autoRollbackConfiguration,
createDeployment_deploymentConfigName,
createDeployment_deploymentGroupName,
createDeployment_description,
createDeployment_fileExistsBehavior,
createDeployment_ignoreApplicationStopFailures,
createDeployment_overrideAlarmConfiguration,
createDeployment_revision,
createDeployment_targetInstances,
createDeployment_updateOutdatedInstancesOnly,
createDeployment_applicationName,
CreateDeploymentResponse (..),
newCreateDeploymentResponse,
createDeploymentResponse_deploymentId,
createDeploymentResponse_httpStatus,
)
where
import Amazonka.CodeDeploy.Types
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateDeployment = CreateDeployment'
{
CreateDeployment -> Maybe AutoRollbackConfiguration
autoRollbackConfiguration :: Prelude.Maybe AutoRollbackConfiguration,
CreateDeployment -> Maybe Text
deploymentConfigName :: Prelude.Maybe Prelude.Text,
CreateDeployment -> Maybe Text
deploymentGroupName :: Prelude.Maybe Prelude.Text,
CreateDeployment -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateDeployment -> Maybe FileExistsBehavior
fileExistsBehavior :: Prelude.Maybe FileExistsBehavior,
CreateDeployment -> Maybe Bool
ignoreApplicationStopFailures :: Prelude.Maybe Prelude.Bool,
CreateDeployment -> Maybe AlarmConfiguration
overrideAlarmConfiguration :: Prelude.Maybe AlarmConfiguration,
CreateDeployment -> Maybe RevisionLocation
revision :: Prelude.Maybe RevisionLocation,
CreateDeployment -> Maybe TargetInstances
targetInstances :: Prelude.Maybe TargetInstances,
CreateDeployment -> Maybe Bool
updateOutdatedInstancesOnly :: Prelude.Maybe Prelude.Bool,
CreateDeployment -> Text
applicationName :: Prelude.Text
}
deriving (CreateDeployment -> CreateDeployment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDeployment -> CreateDeployment -> Bool
$c/= :: CreateDeployment -> CreateDeployment -> Bool
== :: CreateDeployment -> CreateDeployment -> Bool
$c== :: CreateDeployment -> CreateDeployment -> Bool
Prelude.Eq, ReadPrec [CreateDeployment]
ReadPrec CreateDeployment
Int -> ReadS CreateDeployment
ReadS [CreateDeployment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDeployment]
$creadListPrec :: ReadPrec [CreateDeployment]
readPrec :: ReadPrec CreateDeployment
$creadPrec :: ReadPrec CreateDeployment
readList :: ReadS [CreateDeployment]
$creadList :: ReadS [CreateDeployment]
readsPrec :: Int -> ReadS CreateDeployment
$creadsPrec :: Int -> ReadS CreateDeployment
Prelude.Read, Int -> CreateDeployment -> ShowS
[CreateDeployment] -> ShowS
CreateDeployment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDeployment] -> ShowS
$cshowList :: [CreateDeployment] -> ShowS
show :: CreateDeployment -> String
$cshow :: CreateDeployment -> String
showsPrec :: Int -> CreateDeployment -> ShowS
$cshowsPrec :: Int -> CreateDeployment -> ShowS
Prelude.Show, forall x. Rep CreateDeployment x -> CreateDeployment
forall x. CreateDeployment -> Rep CreateDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDeployment x -> CreateDeployment
$cfrom :: forall x. CreateDeployment -> Rep CreateDeployment x
Prelude.Generic)
newCreateDeployment ::
Prelude.Text ->
CreateDeployment
newCreateDeployment :: Text -> CreateDeployment
newCreateDeployment Text
pApplicationName_ =
CreateDeployment'
{ $sel:autoRollbackConfiguration:CreateDeployment' :: Maybe AutoRollbackConfiguration
autoRollbackConfiguration =
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentConfigName:CreateDeployment' :: Maybe Text
deploymentConfigName = forall a. Maybe a
Prelude.Nothing,
$sel:deploymentGroupName:CreateDeployment' :: Maybe Text
deploymentGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateDeployment' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:fileExistsBehavior:CreateDeployment' :: Maybe FileExistsBehavior
fileExistsBehavior = forall a. Maybe a
Prelude.Nothing,
$sel:ignoreApplicationStopFailures:CreateDeployment' :: Maybe Bool
ignoreApplicationStopFailures = forall a. Maybe a
Prelude.Nothing,
$sel:overrideAlarmConfiguration:CreateDeployment' :: Maybe AlarmConfiguration
overrideAlarmConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:revision:CreateDeployment' :: Maybe RevisionLocation
revision = forall a. Maybe a
Prelude.Nothing,
$sel:targetInstances:CreateDeployment' :: Maybe TargetInstances
targetInstances = forall a. Maybe a
Prelude.Nothing,
$sel:updateOutdatedInstancesOnly:CreateDeployment' :: Maybe Bool
updateOutdatedInstancesOnly = forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:CreateDeployment' :: Text
applicationName = Text
pApplicationName_
}
createDeployment_autoRollbackConfiguration :: Lens.Lens' CreateDeployment (Prelude.Maybe AutoRollbackConfiguration)
createDeployment_autoRollbackConfiguration :: Lens' CreateDeployment (Maybe AutoRollbackConfiguration)
createDeployment_autoRollbackConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe AutoRollbackConfiguration
autoRollbackConfiguration :: Maybe AutoRollbackConfiguration
$sel:autoRollbackConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AutoRollbackConfiguration
autoRollbackConfiguration} -> Maybe AutoRollbackConfiguration
autoRollbackConfiguration) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe AutoRollbackConfiguration
a -> CreateDeployment
s {$sel:autoRollbackConfiguration:CreateDeployment' :: Maybe AutoRollbackConfiguration
autoRollbackConfiguration = Maybe AutoRollbackConfiguration
a} :: CreateDeployment)
createDeployment_deploymentConfigName :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Text)
createDeployment_deploymentConfigName :: Lens' CreateDeployment (Maybe Text)
createDeployment_deploymentConfigName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe Text
deploymentConfigName :: Maybe Text
$sel:deploymentConfigName:CreateDeployment' :: CreateDeployment -> Maybe Text
deploymentConfigName} -> Maybe Text
deploymentConfigName) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe Text
a -> CreateDeployment
s {$sel:deploymentConfigName:CreateDeployment' :: Maybe Text
deploymentConfigName = Maybe Text
a} :: CreateDeployment)
createDeployment_deploymentGroupName :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Text)
createDeployment_deploymentGroupName :: Lens' CreateDeployment (Maybe Text)
createDeployment_deploymentGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe Text
deploymentGroupName :: Maybe Text
$sel:deploymentGroupName:CreateDeployment' :: CreateDeployment -> Maybe Text
deploymentGroupName} -> Maybe Text
deploymentGroupName) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe Text
a -> CreateDeployment
s {$sel:deploymentGroupName:CreateDeployment' :: Maybe Text
deploymentGroupName = Maybe Text
a} :: CreateDeployment)
createDeployment_description :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Text)
createDeployment_description :: Lens' CreateDeployment (Maybe Text)
createDeployment_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe Text
description :: Maybe Text
$sel:description:CreateDeployment' :: CreateDeployment -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe Text
a -> CreateDeployment
s {$sel:description:CreateDeployment' :: Maybe Text
description = Maybe Text
a} :: CreateDeployment)
createDeployment_fileExistsBehavior :: Lens.Lens' CreateDeployment (Prelude.Maybe FileExistsBehavior)
createDeployment_fileExistsBehavior :: Lens' CreateDeployment (Maybe FileExistsBehavior)
createDeployment_fileExistsBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe FileExistsBehavior
fileExistsBehavior :: Maybe FileExistsBehavior
$sel:fileExistsBehavior:CreateDeployment' :: CreateDeployment -> Maybe FileExistsBehavior
fileExistsBehavior} -> Maybe FileExistsBehavior
fileExistsBehavior) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe FileExistsBehavior
a -> CreateDeployment
s {$sel:fileExistsBehavior:CreateDeployment' :: Maybe FileExistsBehavior
fileExistsBehavior = Maybe FileExistsBehavior
a} :: CreateDeployment)
createDeployment_ignoreApplicationStopFailures :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Bool)
createDeployment_ignoreApplicationStopFailures :: Lens' CreateDeployment (Maybe Bool)
createDeployment_ignoreApplicationStopFailures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe Bool
ignoreApplicationStopFailures :: Maybe Bool
$sel:ignoreApplicationStopFailures:CreateDeployment' :: CreateDeployment -> Maybe Bool
ignoreApplicationStopFailures} -> Maybe Bool
ignoreApplicationStopFailures) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe Bool
a -> CreateDeployment
s {$sel:ignoreApplicationStopFailures:CreateDeployment' :: Maybe Bool
ignoreApplicationStopFailures = Maybe Bool
a} :: CreateDeployment)
createDeployment_overrideAlarmConfiguration :: Lens.Lens' CreateDeployment (Prelude.Maybe AlarmConfiguration)
createDeployment_overrideAlarmConfiguration :: Lens' CreateDeployment (Maybe AlarmConfiguration)
createDeployment_overrideAlarmConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe AlarmConfiguration
overrideAlarmConfiguration :: Maybe AlarmConfiguration
$sel:overrideAlarmConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AlarmConfiguration
overrideAlarmConfiguration} -> Maybe AlarmConfiguration
overrideAlarmConfiguration) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe AlarmConfiguration
a -> CreateDeployment
s {$sel:overrideAlarmConfiguration:CreateDeployment' :: Maybe AlarmConfiguration
overrideAlarmConfiguration = Maybe AlarmConfiguration
a} :: CreateDeployment)
createDeployment_revision :: Lens.Lens' CreateDeployment (Prelude.Maybe RevisionLocation)
createDeployment_revision :: Lens' CreateDeployment (Maybe RevisionLocation)
createDeployment_revision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe RevisionLocation
revision :: Maybe RevisionLocation
$sel:revision:CreateDeployment' :: CreateDeployment -> Maybe RevisionLocation
revision} -> Maybe RevisionLocation
revision) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe RevisionLocation
a -> CreateDeployment
s {$sel:revision:CreateDeployment' :: Maybe RevisionLocation
revision = Maybe RevisionLocation
a} :: CreateDeployment)
createDeployment_targetInstances :: Lens.Lens' CreateDeployment (Prelude.Maybe TargetInstances)
createDeployment_targetInstances :: Lens' CreateDeployment (Maybe TargetInstances)
createDeployment_targetInstances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe TargetInstances
targetInstances :: Maybe TargetInstances
$sel:targetInstances:CreateDeployment' :: CreateDeployment -> Maybe TargetInstances
targetInstances} -> Maybe TargetInstances
targetInstances) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe TargetInstances
a -> CreateDeployment
s {$sel:targetInstances:CreateDeployment' :: Maybe TargetInstances
targetInstances = Maybe TargetInstances
a} :: CreateDeployment)
createDeployment_updateOutdatedInstancesOnly :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Bool)
createDeployment_updateOutdatedInstancesOnly :: Lens' CreateDeployment (Maybe Bool)
createDeployment_updateOutdatedInstancesOnly = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Maybe Bool
updateOutdatedInstancesOnly :: Maybe Bool
$sel:updateOutdatedInstancesOnly:CreateDeployment' :: CreateDeployment -> Maybe Bool
updateOutdatedInstancesOnly} -> Maybe Bool
updateOutdatedInstancesOnly) (\s :: CreateDeployment
s@CreateDeployment' {} Maybe Bool
a -> CreateDeployment
s {$sel:updateOutdatedInstancesOnly:CreateDeployment' :: Maybe Bool
updateOutdatedInstancesOnly = Maybe Bool
a} :: CreateDeployment)
createDeployment_applicationName :: Lens.Lens' CreateDeployment Prelude.Text
createDeployment_applicationName :: Lens' CreateDeployment Text
createDeployment_applicationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeployment' {Text
applicationName :: Text
$sel:applicationName:CreateDeployment' :: CreateDeployment -> Text
applicationName} -> Text
applicationName) (\s :: CreateDeployment
s@CreateDeployment' {} Text
a -> CreateDeployment
s {$sel:applicationName:CreateDeployment' :: Text
applicationName = Text
a} :: CreateDeployment)
instance Core.AWSRequest CreateDeployment where
type
AWSResponse CreateDeployment =
CreateDeploymentResponse
request :: (Service -> Service)
-> CreateDeployment -> Request CreateDeployment
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDeployment)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateDeploymentResponse
CreateDeploymentResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"deploymentId")
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 CreateDeployment where
hashWithSalt :: Int -> CreateDeployment -> Int
hashWithSalt Int
_salt CreateDeployment' {Maybe Bool
Maybe Text
Maybe AlarmConfiguration
Maybe AutoRollbackConfiguration
Maybe FileExistsBehavior
Maybe RevisionLocation
Maybe TargetInstances
Text
applicationName :: Text
updateOutdatedInstancesOnly :: Maybe Bool
targetInstances :: Maybe TargetInstances
revision :: Maybe RevisionLocation
overrideAlarmConfiguration :: Maybe AlarmConfiguration
ignoreApplicationStopFailures :: Maybe Bool
fileExistsBehavior :: Maybe FileExistsBehavior
description :: Maybe Text
deploymentGroupName :: Maybe Text
deploymentConfigName :: Maybe Text
autoRollbackConfiguration :: Maybe AutoRollbackConfiguration
$sel:applicationName:CreateDeployment' :: CreateDeployment -> Text
$sel:updateOutdatedInstancesOnly:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:targetInstances:CreateDeployment' :: CreateDeployment -> Maybe TargetInstances
$sel:revision:CreateDeployment' :: CreateDeployment -> Maybe RevisionLocation
$sel:overrideAlarmConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AlarmConfiguration
$sel:ignoreApplicationStopFailures:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:fileExistsBehavior:CreateDeployment' :: CreateDeployment -> Maybe FileExistsBehavior
$sel:description:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:deploymentGroupName:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:deploymentConfigName:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:autoRollbackConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AutoRollbackConfiguration
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoRollbackConfiguration
autoRollbackConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deploymentConfigName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deploymentGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileExistsBehavior
fileExistsBehavior
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
ignoreApplicationStopFailures
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AlarmConfiguration
overrideAlarmConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RevisionLocation
revision
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TargetInstances
targetInstances
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
updateOutdatedInstancesOnly
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationName
instance Prelude.NFData CreateDeployment where
rnf :: CreateDeployment -> ()
rnf CreateDeployment' {Maybe Bool
Maybe Text
Maybe AlarmConfiguration
Maybe AutoRollbackConfiguration
Maybe FileExistsBehavior
Maybe RevisionLocation
Maybe TargetInstances
Text
applicationName :: Text
updateOutdatedInstancesOnly :: Maybe Bool
targetInstances :: Maybe TargetInstances
revision :: Maybe RevisionLocation
overrideAlarmConfiguration :: Maybe AlarmConfiguration
ignoreApplicationStopFailures :: Maybe Bool
fileExistsBehavior :: Maybe FileExistsBehavior
description :: Maybe Text
deploymentGroupName :: Maybe Text
deploymentConfigName :: Maybe Text
autoRollbackConfiguration :: Maybe AutoRollbackConfiguration
$sel:applicationName:CreateDeployment' :: CreateDeployment -> Text
$sel:updateOutdatedInstancesOnly:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:targetInstances:CreateDeployment' :: CreateDeployment -> Maybe TargetInstances
$sel:revision:CreateDeployment' :: CreateDeployment -> Maybe RevisionLocation
$sel:overrideAlarmConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AlarmConfiguration
$sel:ignoreApplicationStopFailures:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:fileExistsBehavior:CreateDeployment' :: CreateDeployment -> Maybe FileExistsBehavior
$sel:description:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:deploymentGroupName:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:deploymentConfigName:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:autoRollbackConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AutoRollbackConfiguration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AutoRollbackConfiguration
autoRollbackConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deploymentConfigName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deploymentGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileExistsBehavior
fileExistsBehavior
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
ignoreApplicationStopFailures
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AlarmConfiguration
overrideAlarmConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RevisionLocation
revision
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TargetInstances
targetInstances
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
updateOutdatedInstancesOnly
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationName
instance Data.ToHeaders CreateDeployment where
toHeaders :: CreateDeployment -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"CodeDeploy_20141006.CreateDeployment" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateDeployment where
toJSON :: CreateDeployment -> Value
toJSON CreateDeployment' {Maybe Bool
Maybe Text
Maybe AlarmConfiguration
Maybe AutoRollbackConfiguration
Maybe FileExistsBehavior
Maybe RevisionLocation
Maybe TargetInstances
Text
applicationName :: Text
updateOutdatedInstancesOnly :: Maybe Bool
targetInstances :: Maybe TargetInstances
revision :: Maybe RevisionLocation
overrideAlarmConfiguration :: Maybe AlarmConfiguration
ignoreApplicationStopFailures :: Maybe Bool
fileExistsBehavior :: Maybe FileExistsBehavior
description :: Maybe Text
deploymentGroupName :: Maybe Text
deploymentConfigName :: Maybe Text
autoRollbackConfiguration :: Maybe AutoRollbackConfiguration
$sel:applicationName:CreateDeployment' :: CreateDeployment -> Text
$sel:updateOutdatedInstancesOnly:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:targetInstances:CreateDeployment' :: CreateDeployment -> Maybe TargetInstances
$sel:revision:CreateDeployment' :: CreateDeployment -> Maybe RevisionLocation
$sel:overrideAlarmConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AlarmConfiguration
$sel:ignoreApplicationStopFailures:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:fileExistsBehavior:CreateDeployment' :: CreateDeployment -> Maybe FileExistsBehavior
$sel:description:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:deploymentGroupName:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:deploymentConfigName:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:autoRollbackConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AutoRollbackConfiguration
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"autoRollbackConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoRollbackConfiguration
autoRollbackConfiguration,
(Key
"deploymentConfigName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deploymentConfigName,
(Key
"deploymentGroupName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deploymentGroupName,
(Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"fileExistsBehavior" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileExistsBehavior
fileExistsBehavior,
(Key
"ignoreApplicationStopFailures" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
ignoreApplicationStopFailures,
(Key
"overrideAlarmConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AlarmConfiguration
overrideAlarmConfiguration,
(Key
"revision" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RevisionLocation
revision,
(Key
"targetInstances" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetInstances
targetInstances,
(Key
"updateOutdatedInstancesOnly" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
updateOutdatedInstancesOnly,
forall a. a -> Maybe a
Prelude.Just
(Key
"applicationName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
applicationName)
]
)
instance Data.ToPath CreateDeployment where
toPath :: CreateDeployment -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateDeployment where
toQuery :: CreateDeployment -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateDeploymentResponse = CreateDeploymentResponse'
{
CreateDeploymentResponse -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
CreateDeploymentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateDeploymentResponse -> CreateDeploymentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDeploymentResponse -> CreateDeploymentResponse -> Bool
$c/= :: CreateDeploymentResponse -> CreateDeploymentResponse -> Bool
== :: CreateDeploymentResponse -> CreateDeploymentResponse -> Bool
$c== :: CreateDeploymentResponse -> CreateDeploymentResponse -> Bool
Prelude.Eq, ReadPrec [CreateDeploymentResponse]
ReadPrec CreateDeploymentResponse
Int -> ReadS CreateDeploymentResponse
ReadS [CreateDeploymentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDeploymentResponse]
$creadListPrec :: ReadPrec [CreateDeploymentResponse]
readPrec :: ReadPrec CreateDeploymentResponse
$creadPrec :: ReadPrec CreateDeploymentResponse
readList :: ReadS [CreateDeploymentResponse]
$creadList :: ReadS [CreateDeploymentResponse]
readsPrec :: Int -> ReadS CreateDeploymentResponse
$creadsPrec :: Int -> ReadS CreateDeploymentResponse
Prelude.Read, Int -> CreateDeploymentResponse -> ShowS
[CreateDeploymentResponse] -> ShowS
CreateDeploymentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDeploymentResponse] -> ShowS
$cshowList :: [CreateDeploymentResponse] -> ShowS
show :: CreateDeploymentResponse -> String
$cshow :: CreateDeploymentResponse -> String
showsPrec :: Int -> CreateDeploymentResponse -> ShowS
$cshowsPrec :: Int -> CreateDeploymentResponse -> ShowS
Prelude.Show, forall x.
Rep CreateDeploymentResponse x -> CreateDeploymentResponse
forall x.
CreateDeploymentResponse -> Rep CreateDeploymentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDeploymentResponse x -> CreateDeploymentResponse
$cfrom :: forall x.
CreateDeploymentResponse -> Rep CreateDeploymentResponse x
Prelude.Generic)
newCreateDeploymentResponse ::
Prelude.Int ->
CreateDeploymentResponse
newCreateDeploymentResponse :: Int -> CreateDeploymentResponse
newCreateDeploymentResponse Int
pHttpStatus_ =
CreateDeploymentResponse'
{ $sel:deploymentId:CreateDeploymentResponse' :: Maybe Text
deploymentId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateDeploymentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createDeploymentResponse_deploymentId :: Lens.Lens' CreateDeploymentResponse (Prelude.Maybe Prelude.Text)
createDeploymentResponse_deploymentId :: Lens' CreateDeploymentResponse (Maybe Text)
createDeploymentResponse_deploymentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentResponse' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:CreateDeploymentResponse' :: CreateDeploymentResponse -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: CreateDeploymentResponse
s@CreateDeploymentResponse' {} Maybe Text
a -> CreateDeploymentResponse
s {$sel:deploymentId:CreateDeploymentResponse' :: Maybe Text
deploymentId = Maybe Text
a} :: CreateDeploymentResponse)
createDeploymentResponse_httpStatus :: Lens.Lens' CreateDeploymentResponse Prelude.Int
createDeploymentResponse_httpStatus :: Lens' CreateDeploymentResponse Int
createDeploymentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDeploymentResponse' :: CreateDeploymentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDeploymentResponse
s@CreateDeploymentResponse' {} Int
a -> CreateDeploymentResponse
s {$sel:httpStatus:CreateDeploymentResponse' :: Int
httpStatus = Int
a} :: CreateDeploymentResponse)
instance Prelude.NFData CreateDeploymentResponse where
rnf :: CreateDeploymentResponse -> ()
rnf CreateDeploymentResponse' {Int
Maybe Text
httpStatus :: Int
deploymentId :: Maybe Text
$sel:httpStatus:CreateDeploymentResponse' :: CreateDeploymentResponse -> Int
$sel:deploymentId:CreateDeploymentResponse' :: CreateDeploymentResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deploymentId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus