{-# 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_deploymentConfigName,
createDeployment_fileExistsBehavior,
createDeployment_targetInstances,
createDeployment_revision,
createDeployment_description,
createDeployment_autoRollbackConfiguration,
createDeployment_updateOutdatedInstancesOnly,
createDeployment_deploymentGroupName,
createDeployment_ignoreApplicationStopFailures,
createDeployment_applicationName,
CreateDeploymentResponse (..),
newCreateDeploymentResponse,
createDeploymentResponse_deploymentId,
createDeploymentResponse_httpStatus,
)
where
import Amazonka.CodeDeploy.Types
import qualified Amazonka.Core as Core
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 CreateDeployment = CreateDeployment'
{
CreateDeployment -> Maybe Text
deploymentConfigName :: Prelude.Maybe Prelude.Text,
CreateDeployment -> Maybe FileExistsBehavior
fileExistsBehavior :: Prelude.Maybe FileExistsBehavior,
CreateDeployment -> Maybe TargetInstances
targetInstances :: Prelude.Maybe TargetInstances,
CreateDeployment -> Maybe RevisionLocation
revision :: Prelude.Maybe RevisionLocation,
CreateDeployment -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateDeployment -> Maybe AutoRollbackConfiguration
autoRollbackConfiguration :: Prelude.Maybe AutoRollbackConfiguration,
CreateDeployment -> Maybe Bool
updateOutdatedInstancesOnly :: Prelude.Maybe Prelude.Bool,
CreateDeployment -> Maybe Text
deploymentGroupName :: Prelude.Maybe Prelude.Text,
CreateDeployment -> Maybe Bool
ignoreApplicationStopFailures :: Prelude.Maybe Prelude.Bool,
CreateDeployment -> Text
applicationName :: Prelude.Text
}
deriving (CreateDeployment -> CreateDeployment -> Bool
(CreateDeployment -> CreateDeployment -> Bool)
-> (CreateDeployment -> CreateDeployment -> Bool)
-> Eq CreateDeployment
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]
(Int -> ReadS CreateDeployment)
-> ReadS [CreateDeployment]
-> ReadPrec CreateDeployment
-> ReadPrec [CreateDeployment]
-> Read 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
(Int -> CreateDeployment -> ShowS)
-> (CreateDeployment -> String)
-> ([CreateDeployment] -> ShowS)
-> Show CreateDeployment
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. CreateDeployment -> Rep CreateDeployment x)
-> (forall x. Rep CreateDeployment x -> CreateDeployment)
-> Generic CreateDeployment
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' :: Maybe Text
-> Maybe FileExistsBehavior
-> Maybe TargetInstances
-> Maybe RevisionLocation
-> Maybe Text
-> Maybe AutoRollbackConfiguration
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Text
-> CreateDeployment
CreateDeployment'
{ $sel:deploymentConfigName:CreateDeployment' :: Maybe Text
deploymentConfigName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileExistsBehavior:CreateDeployment' :: Maybe FileExistsBehavior
fileExistsBehavior = Maybe FileExistsBehavior
forall a. Maybe a
Prelude.Nothing,
$sel:targetInstances:CreateDeployment' :: Maybe TargetInstances
targetInstances = Maybe TargetInstances
forall a. Maybe a
Prelude.Nothing,
$sel:revision:CreateDeployment' :: Maybe RevisionLocation
revision = Maybe RevisionLocation
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateDeployment' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoRollbackConfiguration:CreateDeployment' :: Maybe AutoRollbackConfiguration
autoRollbackConfiguration = Maybe AutoRollbackConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:updateOutdatedInstancesOnly:CreateDeployment' :: Maybe Bool
updateOutdatedInstancesOnly = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentGroupName:CreateDeployment' :: Maybe Text
deploymentGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ignoreApplicationStopFailures:CreateDeployment' :: Maybe Bool
ignoreApplicationStopFailures = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:CreateDeployment' :: Text
applicationName = Text
pApplicationName_
}
createDeployment_deploymentConfigName :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Text)
createDeployment_deploymentConfigName :: (Maybe Text -> f (Maybe Text))
-> CreateDeployment -> f CreateDeployment
createDeployment_deploymentConfigName = (CreateDeployment -> Maybe Text)
-> (CreateDeployment -> Maybe Text -> CreateDeployment)
-> Lens CreateDeployment CreateDeployment (Maybe Text) (Maybe Text)
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_fileExistsBehavior :: Lens.Lens' CreateDeployment (Prelude.Maybe FileExistsBehavior)
createDeployment_fileExistsBehavior :: (Maybe FileExistsBehavior -> f (Maybe FileExistsBehavior))
-> CreateDeployment -> f CreateDeployment
createDeployment_fileExistsBehavior = (CreateDeployment -> Maybe FileExistsBehavior)
-> (CreateDeployment
-> Maybe FileExistsBehavior -> CreateDeployment)
-> Lens
CreateDeployment
CreateDeployment
(Maybe FileExistsBehavior)
(Maybe 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_targetInstances :: Lens.Lens' CreateDeployment (Prelude.Maybe TargetInstances)
createDeployment_targetInstances :: (Maybe TargetInstances -> f (Maybe TargetInstances))
-> CreateDeployment -> f CreateDeployment
createDeployment_targetInstances = (CreateDeployment -> Maybe TargetInstances)
-> (CreateDeployment -> Maybe TargetInstances -> CreateDeployment)
-> Lens
CreateDeployment
CreateDeployment
(Maybe TargetInstances)
(Maybe 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_revision :: Lens.Lens' CreateDeployment (Prelude.Maybe RevisionLocation)
createDeployment_revision :: (Maybe RevisionLocation -> f (Maybe RevisionLocation))
-> CreateDeployment -> f CreateDeployment
createDeployment_revision = (CreateDeployment -> Maybe RevisionLocation)
-> (CreateDeployment -> Maybe RevisionLocation -> CreateDeployment)
-> Lens
CreateDeployment
CreateDeployment
(Maybe RevisionLocation)
(Maybe RevisionLocation)
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_description :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Text)
createDeployment_description :: (Maybe Text -> f (Maybe Text))
-> CreateDeployment -> f CreateDeployment
createDeployment_description = (CreateDeployment -> Maybe Text)
-> (CreateDeployment -> Maybe Text -> CreateDeployment)
-> Lens CreateDeployment CreateDeployment (Maybe Text) (Maybe Text)
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_autoRollbackConfiguration :: Lens.Lens' CreateDeployment (Prelude.Maybe AutoRollbackConfiguration)
createDeployment_autoRollbackConfiguration :: (Maybe AutoRollbackConfiguration
-> f (Maybe AutoRollbackConfiguration))
-> CreateDeployment -> f CreateDeployment
createDeployment_autoRollbackConfiguration = (CreateDeployment -> Maybe AutoRollbackConfiguration)
-> (CreateDeployment
-> Maybe AutoRollbackConfiguration -> CreateDeployment)
-> Lens
CreateDeployment
CreateDeployment
(Maybe AutoRollbackConfiguration)
(Maybe 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_updateOutdatedInstancesOnly :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Bool)
createDeployment_updateOutdatedInstancesOnly :: (Maybe Bool -> f (Maybe Bool))
-> CreateDeployment -> f CreateDeployment
createDeployment_updateOutdatedInstancesOnly = (CreateDeployment -> Maybe Bool)
-> (CreateDeployment -> Maybe Bool -> CreateDeployment)
-> Lens CreateDeployment CreateDeployment (Maybe Bool) (Maybe Bool)
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_deploymentGroupName :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Text)
createDeployment_deploymentGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateDeployment -> f CreateDeployment
createDeployment_deploymentGroupName = (CreateDeployment -> Maybe Text)
-> (CreateDeployment -> Maybe Text -> CreateDeployment)
-> Lens CreateDeployment CreateDeployment (Maybe Text) (Maybe Text)
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_ignoreApplicationStopFailures :: Lens.Lens' CreateDeployment (Prelude.Maybe Prelude.Bool)
createDeployment_ignoreApplicationStopFailures :: (Maybe Bool -> f (Maybe Bool))
-> CreateDeployment -> f CreateDeployment
createDeployment_ignoreApplicationStopFailures = (CreateDeployment -> Maybe Bool)
-> (CreateDeployment -> Maybe Bool -> CreateDeployment)
-> Lens CreateDeployment CreateDeployment (Maybe Bool) (Maybe Bool)
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_applicationName :: Lens.Lens' CreateDeployment Prelude.Text
createDeployment_applicationName :: (Text -> f Text) -> CreateDeployment -> f CreateDeployment
createDeployment_applicationName = (CreateDeployment -> Text)
-> (CreateDeployment -> Text -> CreateDeployment)
-> Lens CreateDeployment CreateDeployment Text Text
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 :: CreateDeployment -> Request CreateDeployment
request = Service -> CreateDeployment -> Request CreateDeployment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDeployment)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateDeployment))
-> Logger
-> Service
-> Proxy CreateDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDeployment)))
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 -> CreateDeploymentResponse
CreateDeploymentResponse'
(Maybe Text -> Int -> CreateDeploymentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateDeploymentResponse)
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
"deploymentId")
Either String (Int -> CreateDeploymentResponse)
-> Either String Int -> Either String CreateDeploymentResponse
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 CreateDeployment
instance Prelude.NFData CreateDeployment
instance Core.ToHeaders CreateDeployment where
toHeaders :: CreateDeployment -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateDeployment -> 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
"CodeDeploy_20141006.CreateDeployment" ::
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 CreateDeployment where
toJSON :: CreateDeployment -> Value
toJSON CreateDeployment' {Maybe Bool
Maybe Text
Maybe AutoRollbackConfiguration
Maybe FileExistsBehavior
Maybe RevisionLocation
Maybe TargetInstances
Text
applicationName :: Text
ignoreApplicationStopFailures :: Maybe Bool
deploymentGroupName :: Maybe Text
updateOutdatedInstancesOnly :: Maybe Bool
autoRollbackConfiguration :: Maybe AutoRollbackConfiguration
description :: Maybe Text
revision :: Maybe RevisionLocation
targetInstances :: Maybe TargetInstances
fileExistsBehavior :: Maybe FileExistsBehavior
deploymentConfigName :: Maybe Text
$sel:applicationName:CreateDeployment' :: CreateDeployment -> Text
$sel:ignoreApplicationStopFailures:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:deploymentGroupName:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:updateOutdatedInstancesOnly:CreateDeployment' :: CreateDeployment -> Maybe Bool
$sel:autoRollbackConfiguration:CreateDeployment' :: CreateDeployment -> Maybe AutoRollbackConfiguration
$sel:description:CreateDeployment' :: CreateDeployment -> Maybe Text
$sel:revision:CreateDeployment' :: CreateDeployment -> Maybe RevisionLocation
$sel:targetInstances:CreateDeployment' :: CreateDeployment -> Maybe TargetInstances
$sel:fileExistsBehavior:CreateDeployment' :: CreateDeployment -> Maybe FileExistsBehavior
$sel:deploymentConfigName:CreateDeployment' :: CreateDeployment -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"deploymentConfigName" 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
deploymentConfigName,
(Text
"fileExistsBehavior" Text -> FileExistsBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(FileExistsBehavior -> Pair)
-> Maybe FileExistsBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileExistsBehavior
fileExistsBehavior,
(Text
"targetInstances" Text -> TargetInstances -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TargetInstances -> Pair) -> Maybe TargetInstances -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetInstances
targetInstances,
(Text
"revision" Text -> RevisionLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RevisionLocation -> Pair) -> Maybe RevisionLocation -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RevisionLocation
revision,
(Text
"description" 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
description,
(Text
"autoRollbackConfiguration" Text -> AutoRollbackConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AutoRollbackConfiguration -> Pair)
-> Maybe AutoRollbackConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoRollbackConfiguration
autoRollbackConfiguration,
(Text
"updateOutdatedInstancesOnly" 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
updateOutdatedInstancesOnly,
(Text
"deploymentGroupName" 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
deploymentGroupName,
(Text
"ignoreApplicationStopFailures" 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
ignoreApplicationStopFailures,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"applicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName)
]
)
instance Core.ToPath CreateDeployment where
toPath :: CreateDeployment -> ByteString
toPath = ByteString -> CreateDeployment -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateDeployment where
toQuery :: CreateDeployment -> QueryString
toQuery = QueryString -> CreateDeployment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(CreateDeploymentResponse -> CreateDeploymentResponse -> Bool)
-> (CreateDeploymentResponse -> CreateDeploymentResponse -> Bool)
-> Eq CreateDeploymentResponse
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]
(Int -> ReadS CreateDeploymentResponse)
-> ReadS [CreateDeploymentResponse]
-> ReadPrec CreateDeploymentResponse
-> ReadPrec [CreateDeploymentResponse]
-> Read 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
(Int -> CreateDeploymentResponse -> ShowS)
-> (CreateDeploymentResponse -> String)
-> ([CreateDeploymentResponse] -> ShowS)
-> Show CreateDeploymentResponse
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.
CreateDeploymentResponse -> Rep CreateDeploymentResponse x)
-> (forall x.
Rep CreateDeploymentResponse x -> CreateDeploymentResponse)
-> Generic CreateDeploymentResponse
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' :: Maybe Text -> Int -> CreateDeploymentResponse
CreateDeploymentResponse'
{ $sel:deploymentId:CreateDeploymentResponse' :: Maybe Text
deploymentId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateDeploymentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createDeploymentResponse_deploymentId :: Lens.Lens' CreateDeploymentResponse (Prelude.Maybe Prelude.Text)
createDeploymentResponse_deploymentId :: (Maybe Text -> f (Maybe Text))
-> CreateDeploymentResponse -> f CreateDeploymentResponse
createDeploymentResponse_deploymentId = (CreateDeploymentResponse -> Maybe Text)
-> (CreateDeploymentResponse
-> Maybe Text -> CreateDeploymentResponse)
-> Lens
CreateDeploymentResponse
CreateDeploymentResponse
(Maybe Text)
(Maybe Text)
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 :: (Int -> f Int)
-> CreateDeploymentResponse -> f CreateDeploymentResponse
createDeploymentResponse_httpStatus = (CreateDeploymentResponse -> Int)
-> (CreateDeploymentResponse -> Int -> CreateDeploymentResponse)
-> Lens CreateDeploymentResponse CreateDeploymentResponse Int Int
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