{-# 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.ECS.UpdateService
(
UpdateService (..),
newUpdateService,
updateService_cluster,
updateService_platformVersion,
updateService_desiredCount,
updateService_placementConstraints,
updateService_placementStrategy,
updateService_forceNewDeployment,
updateService_taskDefinition,
updateService_healthCheckGracePeriodSeconds,
updateService_networkConfiguration,
updateService_capacityProviderStrategy,
updateService_enableExecuteCommand,
updateService_deploymentConfiguration,
updateService_service,
UpdateServiceResponse (..),
newUpdateServiceResponse,
updateServiceResponse_service,
updateServiceResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ECS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateService = UpdateService'
{
UpdateService -> Maybe Text
cluster :: Prelude.Maybe Prelude.Text,
UpdateService -> Maybe Text
platformVersion :: Prelude.Maybe Prelude.Text,
UpdateService -> Maybe Int
desiredCount :: Prelude.Maybe Prelude.Int,
UpdateService -> Maybe [PlacementConstraint]
placementConstraints :: Prelude.Maybe [PlacementConstraint],
UpdateService -> Maybe [PlacementStrategy]
placementStrategy :: Prelude.Maybe [PlacementStrategy],
UpdateService -> Maybe Bool
forceNewDeployment :: Prelude.Maybe Prelude.Bool,
UpdateService -> Maybe Text
taskDefinition :: Prelude.Maybe Prelude.Text,
UpdateService -> Maybe Int
healthCheckGracePeriodSeconds :: Prelude.Maybe Prelude.Int,
UpdateService -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration,
UpdateService -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],
UpdateService -> Maybe Bool
enableExecuteCommand :: Prelude.Maybe Prelude.Bool,
UpdateService -> Maybe DeploymentConfiguration
deploymentConfiguration :: Prelude.Maybe DeploymentConfiguration,
UpdateService -> Text
service :: Prelude.Text
}
deriving (UpdateService -> UpdateService -> Bool
(UpdateService -> UpdateService -> Bool)
-> (UpdateService -> UpdateService -> Bool) -> Eq UpdateService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateService -> UpdateService -> Bool
$c/= :: UpdateService -> UpdateService -> Bool
== :: UpdateService -> UpdateService -> Bool
$c== :: UpdateService -> UpdateService -> Bool
Prelude.Eq, ReadPrec [UpdateService]
ReadPrec UpdateService
Int -> ReadS UpdateService
ReadS [UpdateService]
(Int -> ReadS UpdateService)
-> ReadS [UpdateService]
-> ReadPrec UpdateService
-> ReadPrec [UpdateService]
-> Read UpdateService
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateService]
$creadListPrec :: ReadPrec [UpdateService]
readPrec :: ReadPrec UpdateService
$creadPrec :: ReadPrec UpdateService
readList :: ReadS [UpdateService]
$creadList :: ReadS [UpdateService]
readsPrec :: Int -> ReadS UpdateService
$creadsPrec :: Int -> ReadS UpdateService
Prelude.Read, Int -> UpdateService -> ShowS
[UpdateService] -> ShowS
UpdateService -> String
(Int -> UpdateService -> ShowS)
-> (UpdateService -> String)
-> ([UpdateService] -> ShowS)
-> Show UpdateService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateService] -> ShowS
$cshowList :: [UpdateService] -> ShowS
show :: UpdateService -> String
$cshow :: UpdateService -> String
showsPrec :: Int -> UpdateService -> ShowS
$cshowsPrec :: Int -> UpdateService -> ShowS
Prelude.Show, (forall x. UpdateService -> Rep UpdateService x)
-> (forall x. Rep UpdateService x -> UpdateService)
-> Generic UpdateService
forall x. Rep UpdateService x -> UpdateService
forall x. UpdateService -> Rep UpdateService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateService x -> UpdateService
$cfrom :: forall x. UpdateService -> Rep UpdateService x
Prelude.Generic)
newUpdateService ::
Prelude.Text ->
UpdateService
newUpdateService :: Text -> UpdateService
newUpdateService Text
pService_ =
UpdateService' :: Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [PlacementConstraint]
-> Maybe [PlacementStrategy]
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe NetworkConfiguration
-> Maybe [CapacityProviderStrategyItem]
-> Maybe Bool
-> Maybe DeploymentConfiguration
-> Text
-> UpdateService
UpdateService'
{ $sel:cluster:UpdateService' :: Maybe Text
cluster = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:platformVersion:UpdateService' :: Maybe Text
platformVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:desiredCount:UpdateService' :: Maybe Int
desiredCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:placementConstraints:UpdateService' :: Maybe [PlacementConstraint]
placementConstraints = Maybe [PlacementConstraint]
forall a. Maybe a
Prelude.Nothing,
$sel:placementStrategy:UpdateService' :: Maybe [PlacementStrategy]
placementStrategy = Maybe [PlacementStrategy]
forall a. Maybe a
Prelude.Nothing,
$sel:forceNewDeployment:UpdateService' :: Maybe Bool
forceNewDeployment = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:taskDefinition:UpdateService' :: Maybe Text
taskDefinition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckGracePeriodSeconds:UpdateService' :: Maybe Int
healthCheckGracePeriodSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:networkConfiguration:UpdateService' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:capacityProviderStrategy:UpdateService' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
forall a. Maybe a
Prelude.Nothing,
$sel:enableExecuteCommand:UpdateService' :: Maybe Bool
enableExecuteCommand = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentConfiguration:UpdateService' :: Maybe DeploymentConfiguration
deploymentConfiguration = Maybe DeploymentConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:service:UpdateService' :: Text
service = Text
pService_
}
updateService_cluster :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Text)
updateService_cluster :: (Maybe Text -> f (Maybe Text)) -> UpdateService -> f UpdateService
updateService_cluster = (UpdateService -> Maybe Text)
-> (UpdateService -> Maybe Text -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Text
cluster :: Maybe Text
$sel:cluster:UpdateService' :: UpdateService -> Maybe Text
cluster} -> Maybe Text
cluster) (\s :: UpdateService
s@UpdateService' {} Maybe Text
a -> UpdateService
s {$sel:cluster:UpdateService' :: Maybe Text
cluster = Maybe Text
a} :: UpdateService)
updateService_platformVersion :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Text)
updateService_platformVersion :: (Maybe Text -> f (Maybe Text)) -> UpdateService -> f UpdateService
updateService_platformVersion = (UpdateService -> Maybe Text)
-> (UpdateService -> Maybe Text -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Text
platformVersion :: Maybe Text
$sel:platformVersion:UpdateService' :: UpdateService -> Maybe Text
platformVersion} -> Maybe Text
platformVersion) (\s :: UpdateService
s@UpdateService' {} Maybe Text
a -> UpdateService
s {$sel:platformVersion:UpdateService' :: Maybe Text
platformVersion = Maybe Text
a} :: UpdateService)
updateService_desiredCount :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Int)
updateService_desiredCount :: (Maybe Int -> f (Maybe Int)) -> UpdateService -> f UpdateService
updateService_desiredCount = (UpdateService -> Maybe Int)
-> (UpdateService -> Maybe Int -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Int
desiredCount :: Maybe Int
$sel:desiredCount:UpdateService' :: UpdateService -> Maybe Int
desiredCount} -> Maybe Int
desiredCount) (\s :: UpdateService
s@UpdateService' {} Maybe Int
a -> UpdateService
s {$sel:desiredCount:UpdateService' :: Maybe Int
desiredCount = Maybe Int
a} :: UpdateService)
updateService_placementConstraints :: Lens.Lens' UpdateService (Prelude.Maybe [PlacementConstraint])
updateService_placementConstraints :: (Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
-> UpdateService -> f UpdateService
updateService_placementConstraints = (UpdateService -> Maybe [PlacementConstraint])
-> (UpdateService -> Maybe [PlacementConstraint] -> UpdateService)
-> Lens
UpdateService
UpdateService
(Maybe [PlacementConstraint])
(Maybe [PlacementConstraint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe [PlacementConstraint]
placementConstraints :: Maybe [PlacementConstraint]
$sel:placementConstraints:UpdateService' :: UpdateService -> Maybe [PlacementConstraint]
placementConstraints} -> Maybe [PlacementConstraint]
placementConstraints) (\s :: UpdateService
s@UpdateService' {} Maybe [PlacementConstraint]
a -> UpdateService
s {$sel:placementConstraints:UpdateService' :: Maybe [PlacementConstraint]
placementConstraints = Maybe [PlacementConstraint]
a} :: UpdateService) ((Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
-> UpdateService -> f UpdateService)
-> ((Maybe [PlacementConstraint]
-> f (Maybe [PlacementConstraint]))
-> Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
-> (Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
-> UpdateService
-> f UpdateService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PlacementConstraint]
[PlacementConstraint]
[PlacementConstraint]
[PlacementConstraint]
-> Iso
(Maybe [PlacementConstraint])
(Maybe [PlacementConstraint])
(Maybe [PlacementConstraint])
(Maybe [PlacementConstraint])
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
[PlacementConstraint]
[PlacementConstraint]
[PlacementConstraint]
[PlacementConstraint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateService_placementStrategy :: Lens.Lens' UpdateService (Prelude.Maybe [PlacementStrategy])
updateService_placementStrategy :: (Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> UpdateService -> f UpdateService
updateService_placementStrategy = (UpdateService -> Maybe [PlacementStrategy])
-> (UpdateService -> Maybe [PlacementStrategy] -> UpdateService)
-> Lens
UpdateService
UpdateService
(Maybe [PlacementStrategy])
(Maybe [PlacementStrategy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe [PlacementStrategy]
placementStrategy :: Maybe [PlacementStrategy]
$sel:placementStrategy:UpdateService' :: UpdateService -> Maybe [PlacementStrategy]
placementStrategy} -> Maybe [PlacementStrategy]
placementStrategy) (\s :: UpdateService
s@UpdateService' {} Maybe [PlacementStrategy]
a -> UpdateService
s {$sel:placementStrategy:UpdateService' :: Maybe [PlacementStrategy]
placementStrategy = Maybe [PlacementStrategy]
a} :: UpdateService) ((Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> UpdateService -> f UpdateService)
-> ((Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> (Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> UpdateService
-> f UpdateService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PlacementStrategy]
[PlacementStrategy]
[PlacementStrategy]
[PlacementStrategy]
-> Iso
(Maybe [PlacementStrategy])
(Maybe [PlacementStrategy])
(Maybe [PlacementStrategy])
(Maybe [PlacementStrategy])
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
[PlacementStrategy]
[PlacementStrategy]
[PlacementStrategy]
[PlacementStrategy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateService_forceNewDeployment :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Bool)
updateService_forceNewDeployment :: (Maybe Bool -> f (Maybe Bool)) -> UpdateService -> f UpdateService
updateService_forceNewDeployment = (UpdateService -> Maybe Bool)
-> (UpdateService -> Maybe Bool -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Bool
forceNewDeployment :: Maybe Bool
$sel:forceNewDeployment:UpdateService' :: UpdateService -> Maybe Bool
forceNewDeployment} -> Maybe Bool
forceNewDeployment) (\s :: UpdateService
s@UpdateService' {} Maybe Bool
a -> UpdateService
s {$sel:forceNewDeployment:UpdateService' :: Maybe Bool
forceNewDeployment = Maybe Bool
a} :: UpdateService)
updateService_taskDefinition :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Text)
updateService_taskDefinition :: (Maybe Text -> f (Maybe Text)) -> UpdateService -> f UpdateService
updateService_taskDefinition = (UpdateService -> Maybe Text)
-> (UpdateService -> Maybe Text -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Text
taskDefinition :: Maybe Text
$sel:taskDefinition:UpdateService' :: UpdateService -> Maybe Text
taskDefinition} -> Maybe Text
taskDefinition) (\s :: UpdateService
s@UpdateService' {} Maybe Text
a -> UpdateService
s {$sel:taskDefinition:UpdateService' :: Maybe Text
taskDefinition = Maybe Text
a} :: UpdateService)
updateService_healthCheckGracePeriodSeconds :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Int)
updateService_healthCheckGracePeriodSeconds :: (Maybe Int -> f (Maybe Int)) -> UpdateService -> f UpdateService
updateService_healthCheckGracePeriodSeconds = (UpdateService -> Maybe Int)
-> (UpdateService -> Maybe Int -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Int
healthCheckGracePeriodSeconds :: Maybe Int
$sel:healthCheckGracePeriodSeconds:UpdateService' :: UpdateService -> Maybe Int
healthCheckGracePeriodSeconds} -> Maybe Int
healthCheckGracePeriodSeconds) (\s :: UpdateService
s@UpdateService' {} Maybe Int
a -> UpdateService
s {$sel:healthCheckGracePeriodSeconds:UpdateService' :: Maybe Int
healthCheckGracePeriodSeconds = Maybe Int
a} :: UpdateService)
updateService_networkConfiguration :: Lens.Lens' UpdateService (Prelude.Maybe NetworkConfiguration)
updateService_networkConfiguration :: (Maybe NetworkConfiguration -> f (Maybe NetworkConfiguration))
-> UpdateService -> f UpdateService
updateService_networkConfiguration = (UpdateService -> Maybe NetworkConfiguration)
-> (UpdateService -> Maybe NetworkConfiguration -> UpdateService)
-> Lens
UpdateService
UpdateService
(Maybe NetworkConfiguration)
(Maybe NetworkConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:UpdateService' :: UpdateService -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: UpdateService
s@UpdateService' {} Maybe NetworkConfiguration
a -> UpdateService
s {$sel:networkConfiguration:UpdateService' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: UpdateService)
updateService_capacityProviderStrategy :: Lens.Lens' UpdateService (Prelude.Maybe [CapacityProviderStrategyItem])
updateService_capacityProviderStrategy :: (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> UpdateService -> f UpdateService
updateService_capacityProviderStrategy = (UpdateService -> Maybe [CapacityProviderStrategyItem])
-> (UpdateService
-> Maybe [CapacityProviderStrategyItem] -> UpdateService)
-> Lens
UpdateService
UpdateService
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:capacityProviderStrategy:UpdateService' :: UpdateService -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy} -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy) (\s :: UpdateService
s@UpdateService' {} Maybe [CapacityProviderStrategyItem]
a -> UpdateService
s {$sel:capacityProviderStrategy:UpdateService' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
a} :: UpdateService) ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> UpdateService -> f UpdateService)
-> ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> UpdateService
-> f UpdateService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
-> Iso
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
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
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateService_enableExecuteCommand :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Bool)
updateService_enableExecuteCommand :: (Maybe Bool -> f (Maybe Bool)) -> UpdateService -> f UpdateService
updateService_enableExecuteCommand = (UpdateService -> Maybe Bool)
-> (UpdateService -> Maybe Bool -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Bool
enableExecuteCommand :: Maybe Bool
$sel:enableExecuteCommand:UpdateService' :: UpdateService -> Maybe Bool
enableExecuteCommand} -> Maybe Bool
enableExecuteCommand) (\s :: UpdateService
s@UpdateService' {} Maybe Bool
a -> UpdateService
s {$sel:enableExecuteCommand:UpdateService' :: Maybe Bool
enableExecuteCommand = Maybe Bool
a} :: UpdateService)
updateService_deploymentConfiguration :: Lens.Lens' UpdateService (Prelude.Maybe DeploymentConfiguration)
updateService_deploymentConfiguration :: (Maybe DeploymentConfiguration
-> f (Maybe DeploymentConfiguration))
-> UpdateService -> f UpdateService
updateService_deploymentConfiguration = (UpdateService -> Maybe DeploymentConfiguration)
-> (UpdateService
-> Maybe DeploymentConfiguration -> UpdateService)
-> Lens
UpdateService
UpdateService
(Maybe DeploymentConfiguration)
(Maybe DeploymentConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe DeploymentConfiguration
deploymentConfiguration :: Maybe DeploymentConfiguration
$sel:deploymentConfiguration:UpdateService' :: UpdateService -> Maybe DeploymentConfiguration
deploymentConfiguration} -> Maybe DeploymentConfiguration
deploymentConfiguration) (\s :: UpdateService
s@UpdateService' {} Maybe DeploymentConfiguration
a -> UpdateService
s {$sel:deploymentConfiguration:UpdateService' :: Maybe DeploymentConfiguration
deploymentConfiguration = Maybe DeploymentConfiguration
a} :: UpdateService)
updateService_service :: Lens.Lens' UpdateService Prelude.Text
updateService_service :: (Text -> f Text) -> UpdateService -> f UpdateService
updateService_service = (UpdateService -> Text)
-> (UpdateService -> Text -> UpdateService)
-> Lens UpdateService UpdateService Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Text
service :: Text
$sel:service:UpdateService' :: UpdateService -> Text
service} -> Text
service) (\s :: UpdateService
s@UpdateService' {} Text
a -> UpdateService
s {$sel:service:UpdateService' :: Text
service = Text
a} :: UpdateService)
instance Core.AWSRequest UpdateService where
type
AWSResponse UpdateService =
UpdateServiceResponse
request :: UpdateService -> Request UpdateService
request = Service -> UpdateService -> Request UpdateService
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateService
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateService)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateService))
-> Logger
-> Service
-> Proxy UpdateService
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateService)))
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 ContainerService -> Int -> UpdateServiceResponse
UpdateServiceResponse'
(Maybe ContainerService -> Int -> UpdateServiceResponse)
-> Either String (Maybe ContainerService)
-> Either String (Int -> UpdateServiceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ContainerService)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"service")
Either String (Int -> UpdateServiceResponse)
-> Either String Int -> Either String UpdateServiceResponse
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 UpdateService
instance Prelude.NFData UpdateService
instance Core.ToHeaders UpdateService where
toHeaders :: UpdateService -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateService -> 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
"AmazonEC2ContainerServiceV20141113.UpdateService" ::
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 UpdateService where
toJSON :: UpdateService -> Value
toJSON UpdateService' {Maybe Bool
Maybe Int
Maybe [CapacityProviderStrategyItem]
Maybe [PlacementConstraint]
Maybe [PlacementStrategy]
Maybe Text
Maybe DeploymentConfiguration
Maybe NetworkConfiguration
Text
service :: Text
deploymentConfiguration :: Maybe DeploymentConfiguration
enableExecuteCommand :: Maybe Bool
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
networkConfiguration :: Maybe NetworkConfiguration
healthCheckGracePeriodSeconds :: Maybe Int
taskDefinition :: Maybe Text
forceNewDeployment :: Maybe Bool
placementStrategy :: Maybe [PlacementStrategy]
placementConstraints :: Maybe [PlacementConstraint]
desiredCount :: Maybe Int
platformVersion :: Maybe Text
cluster :: Maybe Text
$sel:service:UpdateService' :: UpdateService -> Text
$sel:deploymentConfiguration:UpdateService' :: UpdateService -> Maybe DeploymentConfiguration
$sel:enableExecuteCommand:UpdateService' :: UpdateService -> Maybe Bool
$sel:capacityProviderStrategy:UpdateService' :: UpdateService -> Maybe [CapacityProviderStrategyItem]
$sel:networkConfiguration:UpdateService' :: UpdateService -> Maybe NetworkConfiguration
$sel:healthCheckGracePeriodSeconds:UpdateService' :: UpdateService -> Maybe Int
$sel:taskDefinition:UpdateService' :: UpdateService -> Maybe Text
$sel:forceNewDeployment:UpdateService' :: UpdateService -> Maybe Bool
$sel:placementStrategy:UpdateService' :: UpdateService -> Maybe [PlacementStrategy]
$sel:placementConstraints:UpdateService' :: UpdateService -> Maybe [PlacementConstraint]
$sel:desiredCount:UpdateService' :: UpdateService -> Maybe Int
$sel:platformVersion:UpdateService' :: UpdateService -> Maybe Text
$sel:cluster:UpdateService' :: UpdateService -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"cluster" 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
cluster,
(Text
"platformVersion" 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
platformVersion,
(Text
"desiredCount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
desiredCount,
(Text
"placementConstraints" Text -> [PlacementConstraint] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([PlacementConstraint] -> Pair)
-> Maybe [PlacementConstraint] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PlacementConstraint]
placementConstraints,
(Text
"placementStrategy" Text -> [PlacementStrategy] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([PlacementStrategy] -> Pair)
-> Maybe [PlacementStrategy] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PlacementStrategy]
placementStrategy,
(Text
"forceNewDeployment" 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
forceNewDeployment,
(Text
"taskDefinition" 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
taskDefinition,
(Text
"healthCheckGracePeriodSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
healthCheckGracePeriodSeconds,
(Text
"networkConfiguration" Text -> NetworkConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NetworkConfiguration -> Pair)
-> Maybe NetworkConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkConfiguration
networkConfiguration,
(Text
"capacityProviderStrategy" Text -> [CapacityProviderStrategyItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([CapacityProviderStrategyItem] -> Pair)
-> Maybe [CapacityProviderStrategyItem] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy,
(Text
"enableExecuteCommand" 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
enableExecuteCommand,
(Text
"deploymentConfiguration" Text -> DeploymentConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DeploymentConfiguration -> Pair)
-> Maybe DeploymentConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeploymentConfiguration
deploymentConfiguration,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"service" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
service)
]
)
instance Core.ToPath UpdateService where
toPath :: UpdateService -> ByteString
toPath = ByteString -> UpdateService -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateService where
toQuery :: UpdateService -> QueryString
toQuery = QueryString -> UpdateService -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateServiceResponse = UpdateServiceResponse'
{
UpdateServiceResponse -> Maybe ContainerService
service :: Prelude.Maybe ContainerService,
UpdateServiceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateServiceResponse -> UpdateServiceResponse -> Bool
(UpdateServiceResponse -> UpdateServiceResponse -> Bool)
-> (UpdateServiceResponse -> UpdateServiceResponse -> Bool)
-> Eq UpdateServiceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
$c/= :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
== :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
$c== :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
Prelude.Eq, ReadPrec [UpdateServiceResponse]
ReadPrec UpdateServiceResponse
Int -> ReadS UpdateServiceResponse
ReadS [UpdateServiceResponse]
(Int -> ReadS UpdateServiceResponse)
-> ReadS [UpdateServiceResponse]
-> ReadPrec UpdateServiceResponse
-> ReadPrec [UpdateServiceResponse]
-> Read UpdateServiceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServiceResponse]
$creadListPrec :: ReadPrec [UpdateServiceResponse]
readPrec :: ReadPrec UpdateServiceResponse
$creadPrec :: ReadPrec UpdateServiceResponse
readList :: ReadS [UpdateServiceResponse]
$creadList :: ReadS [UpdateServiceResponse]
readsPrec :: Int -> ReadS UpdateServiceResponse
$creadsPrec :: Int -> ReadS UpdateServiceResponse
Prelude.Read, Int -> UpdateServiceResponse -> ShowS
[UpdateServiceResponse] -> ShowS
UpdateServiceResponse -> String
(Int -> UpdateServiceResponse -> ShowS)
-> (UpdateServiceResponse -> String)
-> ([UpdateServiceResponse] -> ShowS)
-> Show UpdateServiceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServiceResponse] -> ShowS
$cshowList :: [UpdateServiceResponse] -> ShowS
show :: UpdateServiceResponse -> String
$cshow :: UpdateServiceResponse -> String
showsPrec :: Int -> UpdateServiceResponse -> ShowS
$cshowsPrec :: Int -> UpdateServiceResponse -> ShowS
Prelude.Show, (forall x. UpdateServiceResponse -> Rep UpdateServiceResponse x)
-> (forall x. Rep UpdateServiceResponse x -> UpdateServiceResponse)
-> Generic UpdateServiceResponse
forall x. Rep UpdateServiceResponse x -> UpdateServiceResponse
forall x. UpdateServiceResponse -> Rep UpdateServiceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServiceResponse x -> UpdateServiceResponse
$cfrom :: forall x. UpdateServiceResponse -> Rep UpdateServiceResponse x
Prelude.Generic)
newUpdateServiceResponse ::
Prelude.Int ->
UpdateServiceResponse
newUpdateServiceResponse :: Int -> UpdateServiceResponse
newUpdateServiceResponse Int
pHttpStatus_ =
UpdateServiceResponse' :: Maybe ContainerService -> Int -> UpdateServiceResponse
UpdateServiceResponse'
{ $sel:service:UpdateServiceResponse' :: Maybe ContainerService
service = Maybe ContainerService
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateServiceResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateServiceResponse_service :: Lens.Lens' UpdateServiceResponse (Prelude.Maybe ContainerService)
updateServiceResponse_service :: (Maybe ContainerService -> f (Maybe ContainerService))
-> UpdateServiceResponse -> f UpdateServiceResponse
updateServiceResponse_service = (UpdateServiceResponse -> Maybe ContainerService)
-> (UpdateServiceResponse
-> Maybe ContainerService -> UpdateServiceResponse)
-> Lens
UpdateServiceResponse
UpdateServiceResponse
(Maybe ContainerService)
(Maybe ContainerService)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceResponse' {Maybe ContainerService
service :: Maybe ContainerService
$sel:service:UpdateServiceResponse' :: UpdateServiceResponse -> Maybe ContainerService
service} -> Maybe ContainerService
service) (\s :: UpdateServiceResponse
s@UpdateServiceResponse' {} Maybe ContainerService
a -> UpdateServiceResponse
s {$sel:service:UpdateServiceResponse' :: Maybe ContainerService
service = Maybe ContainerService
a} :: UpdateServiceResponse)
updateServiceResponse_httpStatus :: Lens.Lens' UpdateServiceResponse Prelude.Int
updateServiceResponse_httpStatus :: (Int -> f Int) -> UpdateServiceResponse -> f UpdateServiceResponse
updateServiceResponse_httpStatus = (UpdateServiceResponse -> Int)
-> (UpdateServiceResponse -> Int -> UpdateServiceResponse)
-> Lens UpdateServiceResponse UpdateServiceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateServiceResponse' :: UpdateServiceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateServiceResponse
s@UpdateServiceResponse' {} Int
a -> UpdateServiceResponse
s {$sel:httpStatus:UpdateServiceResponse' :: Int
httpStatus = Int
a} :: UpdateServiceResponse)
instance Prelude.NFData UpdateServiceResponse