{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ECS.Types.ContainerService
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ECS.Types.ContainerService where

import qualified Amazonka.Core as Core
import Amazonka.ECS.Types.CapacityProviderStrategyItem
import Amazonka.ECS.Types.Deployment
import Amazonka.ECS.Types.DeploymentConfiguration
import Amazonka.ECS.Types.DeploymentController
import Amazonka.ECS.Types.LaunchType
import Amazonka.ECS.Types.LoadBalancer
import Amazonka.ECS.Types.NetworkConfiguration
import Amazonka.ECS.Types.PlacementConstraint
import Amazonka.ECS.Types.PlacementStrategy
import Amazonka.ECS.Types.PropagateTags
import Amazonka.ECS.Types.SchedulingStrategy
import Amazonka.ECS.Types.ServiceEvent
import Amazonka.ECS.Types.ServiceRegistry
import Amazonka.ECS.Types.Tag
import Amazonka.ECS.Types.TaskSet
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details on a service within a cluster
--
-- /See:/ 'newContainerService' smart constructor.
data ContainerService = ContainerService'
  { -- | Information about a set of Amazon ECS tasks in either an CodeDeploy or
    -- an @EXTERNAL@ deployment. An Amazon ECS task set includes details such
    -- as the desired number of tasks, how many tasks are running, and whether
    -- the task set serves production traffic.
    ContainerService -> Maybe [TaskSet]
taskSets :: Prelude.Maybe [TaskSet],
    -- | The number of tasks in the cluster that are in the @RUNNING@ state.
    ContainerService -> Maybe Int
runningCount :: Prelude.Maybe Prelude.Int,
    -- | The status of the service. The valid values are @ACTIVE@, @DRAINING@, or
    -- @INACTIVE@.
    ContainerService -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the cluster that hosts the service.
    ContainerService -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether to propagate the tags from the task definition or the
    -- service to the task. If no value is specified, the tags are not
    -- propagated.
    ContainerService -> Maybe PropagateTags
propagateTags :: Prelude.Maybe PropagateTags,
    -- | The Unix timestamp for when the service was created.
    ContainerService -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The platform version on which to run your service. A platform version is
    -- only specified for tasks hosted on Fargate. If one is not specified, the
    -- @LATEST@ platform version is used by default. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate Platform Versions>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerService -> Maybe Text
platformVersion :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether to enable Amazon ECS managed tags for the tasks in the
    -- service. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerService -> Maybe Bool
enableECSManagedTags :: Prelude.Maybe Prelude.Bool,
    -- | The principal that created the service.
    ContainerService -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The desired number of instantiations of the task definition to keep
    -- running on the service. This value is specified when the service is
    -- created with CreateService, and it can be modified with UpdateService.
    ContainerService -> Maybe Int
desiredCount :: Prelude.Maybe Prelude.Int,
    -- | A list of Elastic Load Balancing load balancer objects, containing the
    -- load balancer name, the container name (as it appears in a container
    -- definition), and the container port to access from the load balancer.
    ContainerService -> Maybe [LoadBalancer]
loadBalancers :: Prelude.Maybe [LoadBalancer],
    -- | The number of tasks in the cluster that are in the @PENDING@ state.
    ContainerService -> Maybe Int
pendingCount :: Prelude.Maybe Prelude.Int,
    -- | The placement constraints for the tasks in the service.
    ContainerService -> Maybe [PlacementConstraint]
placementConstraints :: Prelude.Maybe [PlacementConstraint],
    -- | The event stream for your service. A maximum of 100 of the latest events
    -- are displayed.
    ContainerService -> Maybe [ServiceEvent]
events :: Prelude.Maybe [ServiceEvent],
    -- | The placement strategy that determines how tasks for the service are
    -- placed.
    ContainerService -> Maybe [PlacementStrategy]
placementStrategy :: Prelude.Maybe [PlacementStrategy],
    -- | The current state of deployments for the service.
    ContainerService -> Maybe [Deployment]
deployments :: Prelude.Maybe [Deployment],
    -- | The name of your service. Up to 255 letters (uppercase and lowercase),
    -- numbers, underscores, and hyphens are allowed. Service names must be
    -- unique within a cluster, but you can have similarly named services in
    -- multiple clusters within a Region or across multiple Regions.
    ContainerService -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
    -- | The deployment controller type the service is using. When using the
    -- DescribeServices API, this field is omitted if the service is using the
    -- @ECS@ deployment controller type.
    ContainerService -> Maybe DeploymentController
deploymentController :: Prelude.Maybe DeploymentController,
    -- | The launch type the service is using. When using the DescribeServices
    -- API, this field is omitted if the service was created using a capacity
    -- provider strategy.
    ContainerService -> Maybe LaunchType
launchType :: Prelude.Maybe LaunchType,
    -- | The ARN that identifies the service. The ARN contains the @arn:aws:ecs@
    -- namespace, followed by the Region of the service, the Amazon Web
    -- Services account ID of the service owner, the @service@ namespace, and
    -- then the service name. For example,
    -- @arn:aws:ecs:region:012345678910:service\/my-service@.
    ContainerService -> Maybe Text
serviceArn :: Prelude.Maybe Prelude.Text,
    -- | The task definition to use for tasks in the service. This value is
    -- specified when the service is created with CreateService, and it can be
    -- modified with UpdateService.
    ContainerService -> Maybe Text
taskDefinition :: Prelude.Maybe Prelude.Text,
    -- | The scheduling strategy to use for the service. For more information,
    -- see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html Services>.
    --
    -- There are two service scheduler strategies available:
    --
    -- -   @REPLICA@-The replica scheduling strategy places and maintains the
    --     desired number of tasks across your cluster. By default, the service
    --     scheduler spreads tasks across Availability Zones. You can use task
    --     placement strategies and constraints to customize task placement
    --     decisions.
    --
    -- -   @DAEMON@-The daemon scheduling strategy deploys exactly one task on
    --     each active container instance that meets all of the task placement
    --     constraints that you specify in your cluster. The service scheduler
    --     also evaluates the task placement constraints for running tasks and
    --     will stop tasks that do not meet the placement constraints.
    --
    --     Fargate tasks do not support the @DAEMON@ scheduling strategy.
    ContainerService -> Maybe SchedulingStrategy
schedulingStrategy :: Prelude.Maybe SchedulingStrategy,
    -- | The period of time, in seconds, that the Amazon ECS service scheduler
    -- ignores unhealthy Elastic Load Balancing target health checks after a
    -- task has first started.
    ContainerService -> Maybe Int
healthCheckGracePeriodSeconds :: Prelude.Maybe Prelude.Int,
    -- | The VPC subnet and security group configuration for tasks that receive
    -- their own elastic network interface by using the @awsvpc@ networking
    -- mode.
    ContainerService -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration,
    -- | The details of the service discovery registries to assign to this
    -- service. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html Service Discovery>.
    ContainerService -> Maybe [ServiceRegistry]
serviceRegistries :: Prelude.Maybe [ServiceRegistry],
    -- | The capacity provider strategy the service is using. When using the
    -- DescribeServices API, this field is omitted if the service was created
    -- using a launch type.
    ContainerService -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],
    -- | Whether or not the execute command functionality is enabled for the
    -- service. If @true@, the execute command functionality is enabled for all
    -- containers in tasks as part of the service.
    ContainerService -> Maybe Bool
enableExecuteCommand :: Prelude.Maybe Prelude.Bool,
    -- | The metadata that you apply to the service to help you categorize and
    -- organize them. Each tag consists of a key and an optional value, both of
    -- which you define.
    --
    -- The following basic restrictions apply to tags:
    --
    -- -   Maximum number of tags per resource - 50
    --
    -- -   For each resource, each tag key must be unique, and each tag key can
    --     have only one value.
    --
    -- -   Maximum key length - 128 Unicode characters in UTF-8
    --
    -- -   Maximum value length - 256 Unicode characters in UTF-8
    --
    -- -   If your tagging schema is used across multiple services and
    --     resources, remember that other services may have restrictions on
    --     allowed characters. Generally allowed characters are: letters,
    --     numbers, and spaces representable in UTF-8, and the following
    --     characters: + - = . _ : \/ \@.
    --
    -- -   Tag keys and values are case-sensitive.
    --
    -- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
    --     such as a prefix for either keys or values as it is reserved for
    --     Amazon Web Services use. You cannot edit or delete tag keys or
    --     values with this prefix. Tags with this prefix do not count against
    --     your tags per resource limit.
    ContainerService -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The ARN of the IAM role associated with the service that allows the
    -- Amazon ECS container agent to register container instances with an
    -- Elastic Load Balancing load balancer.
    ContainerService -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | Optional deployment parameters that control how many tasks run during
    -- the deployment and the ordering of stopping and starting tasks.
    ContainerService -> Maybe DeploymentConfiguration
deploymentConfiguration :: Prelude.Maybe DeploymentConfiguration
  }
  deriving (ContainerService -> ContainerService -> Bool
(ContainerService -> ContainerService -> Bool)
-> (ContainerService -> ContainerService -> Bool)
-> Eq ContainerService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerService -> ContainerService -> Bool
$c/= :: ContainerService -> ContainerService -> Bool
== :: ContainerService -> ContainerService -> Bool
$c== :: ContainerService -> ContainerService -> Bool
Prelude.Eq, ReadPrec [ContainerService]
ReadPrec ContainerService
Int -> ReadS ContainerService
ReadS [ContainerService]
(Int -> ReadS ContainerService)
-> ReadS [ContainerService]
-> ReadPrec ContainerService
-> ReadPrec [ContainerService]
-> Read ContainerService
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerService]
$creadListPrec :: ReadPrec [ContainerService]
readPrec :: ReadPrec ContainerService
$creadPrec :: ReadPrec ContainerService
readList :: ReadS [ContainerService]
$creadList :: ReadS [ContainerService]
readsPrec :: Int -> ReadS ContainerService
$creadsPrec :: Int -> ReadS ContainerService
Prelude.Read, Int -> ContainerService -> ShowS
[ContainerService] -> ShowS
ContainerService -> String
(Int -> ContainerService -> ShowS)
-> (ContainerService -> String)
-> ([ContainerService] -> ShowS)
-> Show ContainerService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerService] -> ShowS
$cshowList :: [ContainerService] -> ShowS
show :: ContainerService -> String
$cshow :: ContainerService -> String
showsPrec :: Int -> ContainerService -> ShowS
$cshowsPrec :: Int -> ContainerService -> ShowS
Prelude.Show, (forall x. ContainerService -> Rep ContainerService x)
-> (forall x. Rep ContainerService x -> ContainerService)
-> Generic ContainerService
forall x. Rep ContainerService x -> ContainerService
forall x. ContainerService -> Rep ContainerService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerService x -> ContainerService
$cfrom :: forall x. ContainerService -> Rep ContainerService x
Prelude.Generic)

-- |
-- Create a value of 'ContainerService' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'taskSets', 'containerService_taskSets' - Information about a set of Amazon ECS tasks in either an CodeDeploy or
-- an @EXTERNAL@ deployment. An Amazon ECS task set includes details such
-- as the desired number of tasks, how many tasks are running, and whether
-- the task set serves production traffic.
--
-- 'runningCount', 'containerService_runningCount' - The number of tasks in the cluster that are in the @RUNNING@ state.
--
-- 'status', 'containerService_status' - The status of the service. The valid values are @ACTIVE@, @DRAINING@, or
-- @INACTIVE@.
--
-- 'clusterArn', 'containerService_clusterArn' - The Amazon Resource Name (ARN) of the cluster that hosts the service.
--
-- 'propagateTags', 'containerService_propagateTags' - Specifies whether to propagate the tags from the task definition or the
-- service to the task. If no value is specified, the tags are not
-- propagated.
--
-- 'createdAt', 'containerService_createdAt' - The Unix timestamp for when the service was created.
--
-- 'platformVersion', 'containerService_platformVersion' - The platform version on which to run your service. A platform version is
-- only specified for tasks hosted on Fargate. If one is not specified, the
-- @LATEST@ platform version is used by default. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate Platform Versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'enableECSManagedTags', 'containerService_enableECSManagedTags' - Specifies whether to enable Amazon ECS managed tags for the tasks in the
-- service. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'createdBy', 'containerService_createdBy' - The principal that created the service.
--
-- 'desiredCount', 'containerService_desiredCount' - The desired number of instantiations of the task definition to keep
-- running on the service. This value is specified when the service is
-- created with CreateService, and it can be modified with UpdateService.
--
-- 'loadBalancers', 'containerService_loadBalancers' - A list of Elastic Load Balancing load balancer objects, containing the
-- load balancer name, the container name (as it appears in a container
-- definition), and the container port to access from the load balancer.
--
-- 'pendingCount', 'containerService_pendingCount' - The number of tasks in the cluster that are in the @PENDING@ state.
--
-- 'placementConstraints', 'containerService_placementConstraints' - The placement constraints for the tasks in the service.
--
-- 'events', 'containerService_events' - The event stream for your service. A maximum of 100 of the latest events
-- are displayed.
--
-- 'placementStrategy', 'containerService_placementStrategy' - The placement strategy that determines how tasks for the service are
-- placed.
--
-- 'deployments', 'containerService_deployments' - The current state of deployments for the service.
--
-- 'serviceName', 'containerService_serviceName' - The name of your service. Up to 255 letters (uppercase and lowercase),
-- numbers, underscores, and hyphens are allowed. Service names must be
-- unique within a cluster, but you can have similarly named services in
-- multiple clusters within a Region or across multiple Regions.
--
-- 'deploymentController', 'containerService_deploymentController' - The deployment controller type the service is using. When using the
-- DescribeServices API, this field is omitted if the service is using the
-- @ECS@ deployment controller type.
--
-- 'launchType', 'containerService_launchType' - The launch type the service is using. When using the DescribeServices
-- API, this field is omitted if the service was created using a capacity
-- provider strategy.
--
-- 'serviceArn', 'containerService_serviceArn' - The ARN that identifies the service. The ARN contains the @arn:aws:ecs@
-- namespace, followed by the Region of the service, the Amazon Web
-- Services account ID of the service owner, the @service@ namespace, and
-- then the service name. For example,
-- @arn:aws:ecs:region:012345678910:service\/my-service@.
--
-- 'taskDefinition', 'containerService_taskDefinition' - The task definition to use for tasks in the service. This value is
-- specified when the service is created with CreateService, and it can be
-- modified with UpdateService.
--
-- 'schedulingStrategy', 'containerService_schedulingStrategy' - The scheduling strategy to use for the service. For more information,
-- see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html Services>.
--
-- There are two service scheduler strategies available:
--
-- -   @REPLICA@-The replica scheduling strategy places and maintains the
--     desired number of tasks across your cluster. By default, the service
--     scheduler spreads tasks across Availability Zones. You can use task
--     placement strategies and constraints to customize task placement
--     decisions.
--
-- -   @DAEMON@-The daemon scheduling strategy deploys exactly one task on
--     each active container instance that meets all of the task placement
--     constraints that you specify in your cluster. The service scheduler
--     also evaluates the task placement constraints for running tasks and
--     will stop tasks that do not meet the placement constraints.
--
--     Fargate tasks do not support the @DAEMON@ scheduling strategy.
--
-- 'healthCheckGracePeriodSeconds', 'containerService_healthCheckGracePeriodSeconds' - The period of time, in seconds, that the Amazon ECS service scheduler
-- ignores unhealthy Elastic Load Balancing target health checks after a
-- task has first started.
--
-- 'networkConfiguration', 'containerService_networkConfiguration' - The VPC subnet and security group configuration for tasks that receive
-- their own elastic network interface by using the @awsvpc@ networking
-- mode.
--
-- 'serviceRegistries', 'containerService_serviceRegistries' - The details of the service discovery registries to assign to this
-- service. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html Service Discovery>.
--
-- 'capacityProviderStrategy', 'containerService_capacityProviderStrategy' - The capacity provider strategy the service is using. When using the
-- DescribeServices API, this field is omitted if the service was created
-- using a launch type.
--
-- 'enableExecuteCommand', 'containerService_enableExecuteCommand' - Whether or not the execute command functionality is enabled for the
-- service. If @true@, the execute command functionality is enabled for all
-- containers in tasks as part of the service.
--
-- 'tags', 'containerService_tags' - The metadata that you apply to the service to help you categorize and
-- organize them. Each tag consists of a key and an optional value, both of
-- which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
--
-- 'roleArn', 'containerService_roleArn' - The ARN of the IAM role associated with the service that allows the
-- Amazon ECS container agent to register container instances with an
-- Elastic Load Balancing load balancer.
--
-- 'deploymentConfiguration', 'containerService_deploymentConfiguration' - Optional deployment parameters that control how many tasks run during
-- the deployment and the ordering of stopping and starting tasks.
newContainerService ::
  ContainerService
newContainerService :: ContainerService
newContainerService =
  ContainerService' :: Maybe [TaskSet]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe PropagateTags
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe [LoadBalancer]
-> Maybe Int
-> Maybe [PlacementConstraint]
-> Maybe [ServiceEvent]
-> Maybe [PlacementStrategy]
-> Maybe [Deployment]
-> Maybe Text
-> Maybe DeploymentController
-> Maybe LaunchType
-> Maybe Text
-> Maybe Text
-> Maybe SchedulingStrategy
-> Maybe Int
-> Maybe NetworkConfiguration
-> Maybe [ServiceRegistry]
-> Maybe [CapacityProviderStrategyItem]
-> Maybe Bool
-> Maybe [Tag]
-> Maybe Text
-> Maybe DeploymentConfiguration
-> ContainerService
ContainerService'
    { $sel:taskSets:ContainerService' :: Maybe [TaskSet]
taskSets = Maybe [TaskSet]
forall a. Maybe a
Prelude.Nothing,
      $sel:runningCount:ContainerService' :: Maybe Int
runningCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ContainerService' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:ContainerService' :: Maybe Text
clusterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:propagateTags:ContainerService' :: Maybe PropagateTags
propagateTags = Maybe PropagateTags
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:ContainerService' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:platformVersion:ContainerService' :: Maybe Text
platformVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableECSManagedTags:ContainerService' :: Maybe Bool
enableECSManagedTags = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:ContainerService' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:desiredCount:ContainerService' :: Maybe Int
desiredCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:loadBalancers:ContainerService' :: Maybe [LoadBalancer]
loadBalancers = Maybe [LoadBalancer]
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingCount:ContainerService' :: Maybe Int
pendingCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:placementConstraints:ContainerService' :: Maybe [PlacementConstraint]
placementConstraints = Maybe [PlacementConstraint]
forall a. Maybe a
Prelude.Nothing,
      $sel:events:ContainerService' :: Maybe [ServiceEvent]
events = Maybe [ServiceEvent]
forall a. Maybe a
Prelude.Nothing,
      $sel:placementStrategy:ContainerService' :: Maybe [PlacementStrategy]
placementStrategy = Maybe [PlacementStrategy]
forall a. Maybe a
Prelude.Nothing,
      $sel:deployments:ContainerService' :: Maybe [Deployment]
deployments = Maybe [Deployment]
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceName:ContainerService' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentController:ContainerService' :: Maybe DeploymentController
deploymentController = Maybe DeploymentController
forall a. Maybe a
Prelude.Nothing,
      $sel:launchType:ContainerService' :: Maybe LaunchType
launchType = Maybe LaunchType
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceArn:ContainerService' :: Maybe Text
serviceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskDefinition:ContainerService' :: Maybe Text
taskDefinition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schedulingStrategy:ContainerService' :: Maybe SchedulingStrategy
schedulingStrategy = Maybe SchedulingStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:healthCheckGracePeriodSeconds:ContainerService' :: Maybe Int
healthCheckGracePeriodSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:networkConfiguration:ContainerService' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRegistries:ContainerService' :: Maybe [ServiceRegistry]
serviceRegistries = Maybe [ServiceRegistry]
forall a. Maybe a
Prelude.Nothing,
      $sel:capacityProviderStrategy:ContainerService' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
forall a. Maybe a
Prelude.Nothing,
      $sel:enableExecuteCommand:ContainerService' :: Maybe Bool
enableExecuteCommand = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ContainerService' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:ContainerService' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentConfiguration:ContainerService' :: Maybe DeploymentConfiguration
deploymentConfiguration = Maybe DeploymentConfiguration
forall a. Maybe a
Prelude.Nothing
    }

-- | Information about a set of Amazon ECS tasks in either an CodeDeploy or
-- an @EXTERNAL@ deployment. An Amazon ECS task set includes details such
-- as the desired number of tasks, how many tasks are running, and whether
-- the task set serves production traffic.
containerService_taskSets :: Lens.Lens' ContainerService (Prelude.Maybe [TaskSet])
containerService_taskSets :: (Maybe [TaskSet] -> f (Maybe [TaskSet]))
-> ContainerService -> f ContainerService
containerService_taskSets = (ContainerService -> Maybe [TaskSet])
-> (ContainerService -> Maybe [TaskSet] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [TaskSet])
     (Maybe [TaskSet])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [TaskSet]
taskSets :: Maybe [TaskSet]
$sel:taskSets:ContainerService' :: ContainerService -> Maybe [TaskSet]
taskSets} -> Maybe [TaskSet]
taskSets) (\s :: ContainerService
s@ContainerService' {} Maybe [TaskSet]
a -> ContainerService
s {$sel:taskSets:ContainerService' :: Maybe [TaskSet]
taskSets = Maybe [TaskSet]
a} :: ContainerService) ((Maybe [TaskSet] -> f (Maybe [TaskSet]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [TaskSet] -> f (Maybe [TaskSet]))
    -> Maybe [TaskSet] -> f (Maybe [TaskSet]))
-> (Maybe [TaskSet] -> f (Maybe [TaskSet]))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TaskSet] [TaskSet] [TaskSet] [TaskSet]
-> Iso
     (Maybe [TaskSet])
     (Maybe [TaskSet])
     (Maybe [TaskSet])
     (Maybe [TaskSet])
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 [TaskSet] [TaskSet] [TaskSet] [TaskSet]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of tasks in the cluster that are in the @RUNNING@ state.
containerService_runningCount :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Int)
containerService_runningCount :: (Maybe Int -> f (Maybe Int))
-> ContainerService -> f ContainerService
containerService_runningCount = (ContainerService -> Maybe Int)
-> (ContainerService -> Maybe Int -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Int
runningCount :: Maybe Int
$sel:runningCount:ContainerService' :: ContainerService -> Maybe Int
runningCount} -> Maybe Int
runningCount) (\s :: ContainerService
s@ContainerService' {} Maybe Int
a -> ContainerService
s {$sel:runningCount:ContainerService' :: Maybe Int
runningCount = Maybe Int
a} :: ContainerService)

-- | The status of the service. The valid values are @ACTIVE@, @DRAINING@, or
-- @INACTIVE@.
containerService_status :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_status :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_status = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
status :: Maybe Text
$sel:status:ContainerService' :: ContainerService -> Maybe Text
status} -> Maybe Text
status) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:status:ContainerService' :: Maybe Text
status = Maybe Text
a} :: ContainerService)

-- | The Amazon Resource Name (ARN) of the cluster that hosts the service.
containerService_clusterArn :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_clusterArn :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_clusterArn = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:ContainerService' :: ContainerService -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:clusterArn:ContainerService' :: Maybe Text
clusterArn = Maybe Text
a} :: ContainerService)

-- | Specifies whether to propagate the tags from the task definition or the
-- service to the task. If no value is specified, the tags are not
-- propagated.
containerService_propagateTags :: Lens.Lens' ContainerService (Prelude.Maybe PropagateTags)
containerService_propagateTags :: (Maybe PropagateTags -> f (Maybe PropagateTags))
-> ContainerService -> f ContainerService
containerService_propagateTags = (ContainerService -> Maybe PropagateTags)
-> (ContainerService -> Maybe PropagateTags -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe PropagateTags)
     (Maybe PropagateTags)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe PropagateTags
propagateTags :: Maybe PropagateTags
$sel:propagateTags:ContainerService' :: ContainerService -> Maybe PropagateTags
propagateTags} -> Maybe PropagateTags
propagateTags) (\s :: ContainerService
s@ContainerService' {} Maybe PropagateTags
a -> ContainerService
s {$sel:propagateTags:ContainerService' :: Maybe PropagateTags
propagateTags = Maybe PropagateTags
a} :: ContainerService)

-- | The Unix timestamp for when the service was created.
containerService_createdAt :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.UTCTime)
containerService_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerService -> f ContainerService
containerService_createdAt = (ContainerService -> Maybe POSIX)
-> (ContainerService -> Maybe POSIX -> ContainerService)
-> Lens
     ContainerService ContainerService (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ContainerService' :: ContainerService -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ContainerService
s@ContainerService' {} Maybe POSIX
a -> ContainerService
s {$sel:createdAt:ContainerService' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ContainerService) ((Maybe POSIX -> f (Maybe POSIX))
 -> ContainerService -> f ContainerService)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The platform version on which to run your service. A platform version is
-- only specified for tasks hosted on Fargate. If one is not specified, the
-- @LATEST@ platform version is used by default. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate Platform Versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerService_platformVersion :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_platformVersion :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_platformVersion = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
platformVersion :: Maybe Text
$sel:platformVersion:ContainerService' :: ContainerService -> Maybe Text
platformVersion} -> Maybe Text
platformVersion) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:platformVersion:ContainerService' :: Maybe Text
platformVersion = Maybe Text
a} :: ContainerService)

-- | Specifies whether to enable Amazon ECS managed tags for the tasks in the
-- service. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerService_enableECSManagedTags :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Bool)
containerService_enableECSManagedTags :: (Maybe Bool -> f (Maybe Bool))
-> ContainerService -> f ContainerService
containerService_enableECSManagedTags = (ContainerService -> Maybe Bool)
-> (ContainerService -> Maybe Bool -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Bool
enableECSManagedTags :: Maybe Bool
$sel:enableECSManagedTags:ContainerService' :: ContainerService -> Maybe Bool
enableECSManagedTags} -> Maybe Bool
enableECSManagedTags) (\s :: ContainerService
s@ContainerService' {} Maybe Bool
a -> ContainerService
s {$sel:enableECSManagedTags:ContainerService' :: Maybe Bool
enableECSManagedTags = Maybe Bool
a} :: ContainerService)

-- | The principal that created the service.
containerService_createdBy :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_createdBy :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_createdBy = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:ContainerService' :: ContainerService -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:createdBy:ContainerService' :: Maybe Text
createdBy = Maybe Text
a} :: ContainerService)

-- | The desired number of instantiations of the task definition to keep
-- running on the service. This value is specified when the service is
-- created with CreateService, and it can be modified with UpdateService.
containerService_desiredCount :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Int)
containerService_desiredCount :: (Maybe Int -> f (Maybe Int))
-> ContainerService -> f ContainerService
containerService_desiredCount = (ContainerService -> Maybe Int)
-> (ContainerService -> Maybe Int -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Int
desiredCount :: Maybe Int
$sel:desiredCount:ContainerService' :: ContainerService -> Maybe Int
desiredCount} -> Maybe Int
desiredCount) (\s :: ContainerService
s@ContainerService' {} Maybe Int
a -> ContainerService
s {$sel:desiredCount:ContainerService' :: Maybe Int
desiredCount = Maybe Int
a} :: ContainerService)

-- | A list of Elastic Load Balancing load balancer objects, containing the
-- load balancer name, the container name (as it appears in a container
-- definition), and the container port to access from the load balancer.
containerService_loadBalancers :: Lens.Lens' ContainerService (Prelude.Maybe [LoadBalancer])
containerService_loadBalancers :: (Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> ContainerService -> f ContainerService
containerService_loadBalancers = (ContainerService -> Maybe [LoadBalancer])
-> (ContainerService -> Maybe [LoadBalancer] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [LoadBalancer])
     (Maybe [LoadBalancer])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [LoadBalancer]
loadBalancers :: Maybe [LoadBalancer]
$sel:loadBalancers:ContainerService' :: ContainerService -> Maybe [LoadBalancer]
loadBalancers} -> Maybe [LoadBalancer]
loadBalancers) (\s :: ContainerService
s@ContainerService' {} Maybe [LoadBalancer]
a -> ContainerService
s {$sel:loadBalancers:ContainerService' :: Maybe [LoadBalancer]
loadBalancers = Maybe [LoadBalancer]
a} :: ContainerService) ((Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
    -> Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> (Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [LoadBalancer] [LoadBalancer] [LoadBalancer] [LoadBalancer]
-> Iso
     (Maybe [LoadBalancer])
     (Maybe [LoadBalancer])
     (Maybe [LoadBalancer])
     (Maybe [LoadBalancer])
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 [LoadBalancer] [LoadBalancer] [LoadBalancer] [LoadBalancer]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of tasks in the cluster that are in the @PENDING@ state.
containerService_pendingCount :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Int)
containerService_pendingCount :: (Maybe Int -> f (Maybe Int))
-> ContainerService -> f ContainerService
containerService_pendingCount = (ContainerService -> Maybe Int)
-> (ContainerService -> Maybe Int -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Int
pendingCount :: Maybe Int
$sel:pendingCount:ContainerService' :: ContainerService -> Maybe Int
pendingCount} -> Maybe Int
pendingCount) (\s :: ContainerService
s@ContainerService' {} Maybe Int
a -> ContainerService
s {$sel:pendingCount:ContainerService' :: Maybe Int
pendingCount = Maybe Int
a} :: ContainerService)

-- | The placement constraints for the tasks in the service.
containerService_placementConstraints :: Lens.Lens' ContainerService (Prelude.Maybe [PlacementConstraint])
containerService_placementConstraints :: (Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
-> ContainerService -> f ContainerService
containerService_placementConstraints = (ContainerService -> Maybe [PlacementConstraint])
-> (ContainerService
    -> Maybe [PlacementConstraint] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [PlacementConstraint])
     (Maybe [PlacementConstraint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [PlacementConstraint]
placementConstraints :: Maybe [PlacementConstraint]
$sel:placementConstraints:ContainerService' :: ContainerService -> Maybe [PlacementConstraint]
placementConstraints} -> Maybe [PlacementConstraint]
placementConstraints) (\s :: ContainerService
s@ContainerService' {} Maybe [PlacementConstraint]
a -> ContainerService
s {$sel:placementConstraints:ContainerService' :: Maybe [PlacementConstraint]
placementConstraints = Maybe [PlacementConstraint]
a} :: ContainerService) ((Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [PlacementConstraint]
     -> f (Maybe [PlacementConstraint]))
    -> Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
-> (Maybe [PlacementConstraint] -> f (Maybe [PlacementConstraint]))
-> ContainerService
-> f ContainerService
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

-- | The event stream for your service. A maximum of 100 of the latest events
-- are displayed.
containerService_events :: Lens.Lens' ContainerService (Prelude.Maybe [ServiceEvent])
containerService_events :: (Maybe [ServiceEvent] -> f (Maybe [ServiceEvent]))
-> ContainerService -> f ContainerService
containerService_events = (ContainerService -> Maybe [ServiceEvent])
-> (ContainerService -> Maybe [ServiceEvent] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [ServiceEvent])
     (Maybe [ServiceEvent])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [ServiceEvent]
events :: Maybe [ServiceEvent]
$sel:events:ContainerService' :: ContainerService -> Maybe [ServiceEvent]
events} -> Maybe [ServiceEvent]
events) (\s :: ContainerService
s@ContainerService' {} Maybe [ServiceEvent]
a -> ContainerService
s {$sel:events:ContainerService' :: Maybe [ServiceEvent]
events = Maybe [ServiceEvent]
a} :: ContainerService) ((Maybe [ServiceEvent] -> f (Maybe [ServiceEvent]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [ServiceEvent] -> f (Maybe [ServiceEvent]))
    -> Maybe [ServiceEvent] -> f (Maybe [ServiceEvent]))
-> (Maybe [ServiceEvent] -> f (Maybe [ServiceEvent]))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ServiceEvent] [ServiceEvent] [ServiceEvent] [ServiceEvent]
-> Iso
     (Maybe [ServiceEvent])
     (Maybe [ServiceEvent])
     (Maybe [ServiceEvent])
     (Maybe [ServiceEvent])
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 [ServiceEvent] [ServiceEvent] [ServiceEvent] [ServiceEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The placement strategy that determines how tasks for the service are
-- placed.
containerService_placementStrategy :: Lens.Lens' ContainerService (Prelude.Maybe [PlacementStrategy])
containerService_placementStrategy :: (Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> ContainerService -> f ContainerService
containerService_placementStrategy = (ContainerService -> Maybe [PlacementStrategy])
-> (ContainerService
    -> Maybe [PlacementStrategy] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [PlacementStrategy])
     (Maybe [PlacementStrategy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [PlacementStrategy]
placementStrategy :: Maybe [PlacementStrategy]
$sel:placementStrategy:ContainerService' :: ContainerService -> Maybe [PlacementStrategy]
placementStrategy} -> Maybe [PlacementStrategy]
placementStrategy) (\s :: ContainerService
s@ContainerService' {} Maybe [PlacementStrategy]
a -> ContainerService
s {$sel:placementStrategy:ContainerService' :: Maybe [PlacementStrategy]
placementStrategy = Maybe [PlacementStrategy]
a} :: ContainerService) ((Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
    -> Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> (Maybe [PlacementStrategy] -> f (Maybe [PlacementStrategy]))
-> ContainerService
-> f ContainerService
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

-- | The current state of deployments for the service.
containerService_deployments :: Lens.Lens' ContainerService (Prelude.Maybe [Deployment])
containerService_deployments :: (Maybe [Deployment] -> f (Maybe [Deployment]))
-> ContainerService -> f ContainerService
containerService_deployments = (ContainerService -> Maybe [Deployment])
-> (ContainerService -> Maybe [Deployment] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [Deployment])
     (Maybe [Deployment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [Deployment]
deployments :: Maybe [Deployment]
$sel:deployments:ContainerService' :: ContainerService -> Maybe [Deployment]
deployments} -> Maybe [Deployment]
deployments) (\s :: ContainerService
s@ContainerService' {} Maybe [Deployment]
a -> ContainerService
s {$sel:deployments:ContainerService' :: Maybe [Deployment]
deployments = Maybe [Deployment]
a} :: ContainerService) ((Maybe [Deployment] -> f (Maybe [Deployment]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [Deployment] -> f (Maybe [Deployment]))
    -> Maybe [Deployment] -> f (Maybe [Deployment]))
-> (Maybe [Deployment] -> f (Maybe [Deployment]))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Deployment] [Deployment] [Deployment] [Deployment]
-> Iso
     (Maybe [Deployment])
     (Maybe [Deployment])
     (Maybe [Deployment])
     (Maybe [Deployment])
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 [Deployment] [Deployment] [Deployment] [Deployment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of your service. Up to 255 letters (uppercase and lowercase),
-- numbers, underscores, and hyphens are allowed. Service names must be
-- unique within a cluster, but you can have similarly named services in
-- multiple clusters within a Region or across multiple Regions.
containerService_serviceName :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_serviceName :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_serviceName = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
serviceName :: Maybe Text
$sel:serviceName:ContainerService' :: ContainerService -> Maybe Text
serviceName} -> Maybe Text
serviceName) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:serviceName:ContainerService' :: Maybe Text
serviceName = Maybe Text
a} :: ContainerService)

-- | The deployment controller type the service is using. When using the
-- DescribeServices API, this field is omitted if the service is using the
-- @ECS@ deployment controller type.
containerService_deploymentController :: Lens.Lens' ContainerService (Prelude.Maybe DeploymentController)
containerService_deploymentController :: (Maybe DeploymentController -> f (Maybe DeploymentController))
-> ContainerService -> f ContainerService
containerService_deploymentController = (ContainerService -> Maybe DeploymentController)
-> (ContainerService
    -> Maybe DeploymentController -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe DeploymentController)
     (Maybe DeploymentController)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe DeploymentController
deploymentController :: Maybe DeploymentController
$sel:deploymentController:ContainerService' :: ContainerService -> Maybe DeploymentController
deploymentController} -> Maybe DeploymentController
deploymentController) (\s :: ContainerService
s@ContainerService' {} Maybe DeploymentController
a -> ContainerService
s {$sel:deploymentController:ContainerService' :: Maybe DeploymentController
deploymentController = Maybe DeploymentController
a} :: ContainerService)

-- | The launch type the service is using. When using the DescribeServices
-- API, this field is omitted if the service was created using a capacity
-- provider strategy.
containerService_launchType :: Lens.Lens' ContainerService (Prelude.Maybe LaunchType)
containerService_launchType :: (Maybe LaunchType -> f (Maybe LaunchType))
-> ContainerService -> f ContainerService
containerService_launchType = (ContainerService -> Maybe LaunchType)
-> (ContainerService -> Maybe LaunchType -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe LaunchType)
     (Maybe LaunchType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe LaunchType
launchType :: Maybe LaunchType
$sel:launchType:ContainerService' :: ContainerService -> Maybe LaunchType
launchType} -> Maybe LaunchType
launchType) (\s :: ContainerService
s@ContainerService' {} Maybe LaunchType
a -> ContainerService
s {$sel:launchType:ContainerService' :: Maybe LaunchType
launchType = Maybe LaunchType
a} :: ContainerService)

-- | The ARN that identifies the service. The ARN contains the @arn:aws:ecs@
-- namespace, followed by the Region of the service, the Amazon Web
-- Services account ID of the service owner, the @service@ namespace, and
-- then the service name. For example,
-- @arn:aws:ecs:region:012345678910:service\/my-service@.
containerService_serviceArn :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_serviceArn :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_serviceArn = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
serviceArn :: Maybe Text
$sel:serviceArn:ContainerService' :: ContainerService -> Maybe Text
serviceArn} -> Maybe Text
serviceArn) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:serviceArn:ContainerService' :: Maybe Text
serviceArn = Maybe Text
a} :: ContainerService)

-- | The task definition to use for tasks in the service. This value is
-- specified when the service is created with CreateService, and it can be
-- modified with UpdateService.
containerService_taskDefinition :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_taskDefinition :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_taskDefinition = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
taskDefinition :: Maybe Text
$sel:taskDefinition:ContainerService' :: ContainerService -> Maybe Text
taskDefinition} -> Maybe Text
taskDefinition) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:taskDefinition:ContainerService' :: Maybe Text
taskDefinition = Maybe Text
a} :: ContainerService)

-- | The scheduling strategy to use for the service. For more information,
-- see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html Services>.
--
-- There are two service scheduler strategies available:
--
-- -   @REPLICA@-The replica scheduling strategy places and maintains the
--     desired number of tasks across your cluster. By default, the service
--     scheduler spreads tasks across Availability Zones. You can use task
--     placement strategies and constraints to customize task placement
--     decisions.
--
-- -   @DAEMON@-The daemon scheduling strategy deploys exactly one task on
--     each active container instance that meets all of the task placement
--     constraints that you specify in your cluster. The service scheduler
--     also evaluates the task placement constraints for running tasks and
--     will stop tasks that do not meet the placement constraints.
--
--     Fargate tasks do not support the @DAEMON@ scheduling strategy.
containerService_schedulingStrategy :: Lens.Lens' ContainerService (Prelude.Maybe SchedulingStrategy)
containerService_schedulingStrategy :: (Maybe SchedulingStrategy -> f (Maybe SchedulingStrategy))
-> ContainerService -> f ContainerService
containerService_schedulingStrategy = (ContainerService -> Maybe SchedulingStrategy)
-> (ContainerService
    -> Maybe SchedulingStrategy -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe SchedulingStrategy)
     (Maybe SchedulingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe SchedulingStrategy
schedulingStrategy :: Maybe SchedulingStrategy
$sel:schedulingStrategy:ContainerService' :: ContainerService -> Maybe SchedulingStrategy
schedulingStrategy} -> Maybe SchedulingStrategy
schedulingStrategy) (\s :: ContainerService
s@ContainerService' {} Maybe SchedulingStrategy
a -> ContainerService
s {$sel:schedulingStrategy:ContainerService' :: Maybe SchedulingStrategy
schedulingStrategy = Maybe SchedulingStrategy
a} :: ContainerService)

-- | The period of time, in seconds, that the Amazon ECS service scheduler
-- ignores unhealthy Elastic Load Balancing target health checks after a
-- task has first started.
containerService_healthCheckGracePeriodSeconds :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Int)
containerService_healthCheckGracePeriodSeconds :: (Maybe Int -> f (Maybe Int))
-> ContainerService -> f ContainerService
containerService_healthCheckGracePeriodSeconds = (ContainerService -> Maybe Int)
-> (ContainerService -> Maybe Int -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Int
healthCheckGracePeriodSeconds :: Maybe Int
$sel:healthCheckGracePeriodSeconds:ContainerService' :: ContainerService -> Maybe Int
healthCheckGracePeriodSeconds} -> Maybe Int
healthCheckGracePeriodSeconds) (\s :: ContainerService
s@ContainerService' {} Maybe Int
a -> ContainerService
s {$sel:healthCheckGracePeriodSeconds:ContainerService' :: Maybe Int
healthCheckGracePeriodSeconds = Maybe Int
a} :: ContainerService)

-- | The VPC subnet and security group configuration for tasks that receive
-- their own elastic network interface by using the @awsvpc@ networking
-- mode.
containerService_networkConfiguration :: Lens.Lens' ContainerService (Prelude.Maybe NetworkConfiguration)
containerService_networkConfiguration :: (Maybe NetworkConfiguration -> f (Maybe NetworkConfiguration))
-> ContainerService -> f ContainerService
containerService_networkConfiguration = (ContainerService -> Maybe NetworkConfiguration)
-> (ContainerService
    -> Maybe NetworkConfiguration -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe NetworkConfiguration)
     (Maybe NetworkConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:ContainerService' :: ContainerService -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: ContainerService
s@ContainerService' {} Maybe NetworkConfiguration
a -> ContainerService
s {$sel:networkConfiguration:ContainerService' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: ContainerService)

-- | The details of the service discovery registries to assign to this
-- service. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html Service Discovery>.
containerService_serviceRegistries :: Lens.Lens' ContainerService (Prelude.Maybe [ServiceRegistry])
containerService_serviceRegistries :: (Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> ContainerService -> f ContainerService
containerService_serviceRegistries = (ContainerService -> Maybe [ServiceRegistry])
-> (ContainerService
    -> Maybe [ServiceRegistry] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [ServiceRegistry])
     (Maybe [ServiceRegistry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [ServiceRegistry]
serviceRegistries :: Maybe [ServiceRegistry]
$sel:serviceRegistries:ContainerService' :: ContainerService -> Maybe [ServiceRegistry]
serviceRegistries} -> Maybe [ServiceRegistry]
serviceRegistries) (\s :: ContainerService
s@ContainerService' {} Maybe [ServiceRegistry]
a -> ContainerService
s {$sel:serviceRegistries:ContainerService' :: Maybe [ServiceRegistry]
serviceRegistries = Maybe [ServiceRegistry]
a} :: ContainerService) ((Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
    -> Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> (Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
-> Iso
     (Maybe [ServiceRegistry])
     (Maybe [ServiceRegistry])
     (Maybe [ServiceRegistry])
     (Maybe [ServiceRegistry])
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
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
  [ServiceRegistry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The capacity provider strategy the service is using. When using the
-- DescribeServices API, this field is omitted if the service was created
-- using a launch type.
containerService_capacityProviderStrategy :: Lens.Lens' ContainerService (Prelude.Maybe [CapacityProviderStrategyItem])
containerService_capacityProviderStrategy :: (Maybe [CapacityProviderStrategyItem]
 -> f (Maybe [CapacityProviderStrategyItem]))
-> ContainerService -> f ContainerService
containerService_capacityProviderStrategy = (ContainerService -> Maybe [CapacityProviderStrategyItem])
-> (ContainerService
    -> Maybe [CapacityProviderStrategyItem] -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe [CapacityProviderStrategyItem])
     (Maybe [CapacityProviderStrategyItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:capacityProviderStrategy:ContainerService' :: ContainerService -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy} -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy) (\s :: ContainerService
s@ContainerService' {} Maybe [CapacityProviderStrategyItem]
a -> ContainerService
s {$sel:capacityProviderStrategy:ContainerService' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
a} :: ContainerService) ((Maybe [CapacityProviderStrategyItem]
  -> f (Maybe [CapacityProviderStrategyItem]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [CapacityProviderStrategyItem]
     -> f (Maybe [CapacityProviderStrategyItem]))
    -> Maybe [CapacityProviderStrategyItem]
    -> f (Maybe [CapacityProviderStrategyItem]))
-> (Maybe [CapacityProviderStrategyItem]
    -> f (Maybe [CapacityProviderStrategyItem]))
-> ContainerService
-> f ContainerService
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

-- | Whether or not the execute command functionality is enabled for the
-- service. If @true@, the execute command functionality is enabled for all
-- containers in tasks as part of the service.
containerService_enableExecuteCommand :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Bool)
containerService_enableExecuteCommand :: (Maybe Bool -> f (Maybe Bool))
-> ContainerService -> f ContainerService
containerService_enableExecuteCommand = (ContainerService -> Maybe Bool)
-> (ContainerService -> Maybe Bool -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Bool
enableExecuteCommand :: Maybe Bool
$sel:enableExecuteCommand:ContainerService' :: ContainerService -> Maybe Bool
enableExecuteCommand} -> Maybe Bool
enableExecuteCommand) (\s :: ContainerService
s@ContainerService' {} Maybe Bool
a -> ContainerService
s {$sel:enableExecuteCommand:ContainerService' :: Maybe Bool
enableExecuteCommand = Maybe Bool
a} :: ContainerService)

-- | The metadata that you apply to the service to help you categorize and
-- organize them. Each tag consists of a key and an optional value, both of
-- which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
containerService_tags :: Lens.Lens' ContainerService (Prelude.Maybe [Tag])
containerService_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> ContainerService -> f ContainerService
containerService_tags = (ContainerService -> Maybe [Tag])
-> (ContainerService -> Maybe [Tag] -> ContainerService)
-> Lens
     ContainerService ContainerService (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ContainerService' :: ContainerService -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ContainerService
s@ContainerService' {} Maybe [Tag]
a -> ContainerService
s {$sel:tags:ContainerService' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ContainerService) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ARN of the IAM role associated with the service that allows the
-- Amazon ECS container agent to register container instances with an
-- Elastic Load Balancing load balancer.
containerService_roleArn :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_roleArn :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_roleArn = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:ContainerService' :: ContainerService -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:roleArn:ContainerService' :: Maybe Text
roleArn = Maybe Text
a} :: ContainerService)

-- | Optional deployment parameters that control how many tasks run during
-- the deployment and the ordering of stopping and starting tasks.
containerService_deploymentConfiguration :: Lens.Lens' ContainerService (Prelude.Maybe DeploymentConfiguration)
containerService_deploymentConfiguration :: (Maybe DeploymentConfiguration
 -> f (Maybe DeploymentConfiguration))
-> ContainerService -> f ContainerService
containerService_deploymentConfiguration = (ContainerService -> Maybe DeploymentConfiguration)
-> (ContainerService
    -> Maybe DeploymentConfiguration -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe DeploymentConfiguration)
     (Maybe DeploymentConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe DeploymentConfiguration
deploymentConfiguration :: Maybe DeploymentConfiguration
$sel:deploymentConfiguration:ContainerService' :: ContainerService -> Maybe DeploymentConfiguration
deploymentConfiguration} -> Maybe DeploymentConfiguration
deploymentConfiguration) (\s :: ContainerService
s@ContainerService' {} Maybe DeploymentConfiguration
a -> ContainerService
s {$sel:deploymentConfiguration:ContainerService' :: Maybe DeploymentConfiguration
deploymentConfiguration = Maybe DeploymentConfiguration
a} :: ContainerService)

instance Core.FromJSON ContainerService where
  parseJSON :: Value -> Parser ContainerService
parseJSON =
    String
-> (Object -> Parser ContainerService)
-> Value
-> Parser ContainerService
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ContainerService"
      ( \Object
x ->
          Maybe [TaskSet]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe PropagateTags
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe [LoadBalancer]
-> Maybe Int
-> Maybe [PlacementConstraint]
-> Maybe [ServiceEvent]
-> Maybe [PlacementStrategy]
-> Maybe [Deployment]
-> Maybe Text
-> Maybe DeploymentController
-> Maybe LaunchType
-> Maybe Text
-> Maybe Text
-> Maybe SchedulingStrategy
-> Maybe Int
-> Maybe NetworkConfiguration
-> Maybe [ServiceRegistry]
-> Maybe [CapacityProviderStrategyItem]
-> Maybe Bool
-> Maybe [Tag]
-> Maybe Text
-> Maybe DeploymentConfiguration
-> ContainerService
ContainerService'
            (Maybe [TaskSet]
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe PropagateTags
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe [LoadBalancer]
 -> Maybe Int
 -> Maybe [PlacementConstraint]
 -> Maybe [ServiceEvent]
 -> Maybe [PlacementStrategy]
 -> Maybe [Deployment]
 -> Maybe Text
 -> Maybe DeploymentController
 -> Maybe LaunchType
 -> Maybe Text
 -> Maybe Text
 -> Maybe SchedulingStrategy
 -> Maybe Int
 -> Maybe NetworkConfiguration
 -> Maybe [ServiceRegistry]
 -> Maybe [CapacityProviderStrategyItem]
 -> Maybe Bool
 -> Maybe [Tag]
 -> Maybe Text
 -> Maybe DeploymentConfiguration
 -> ContainerService)
-> Parser (Maybe [TaskSet])
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PropagateTags
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [TaskSet]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskSets" Parser (Maybe (Maybe [TaskSet]))
-> Maybe [TaskSet] -> Parser (Maybe [TaskSet])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [TaskSet]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PropagateTags
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PropagateTags
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"runningCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PropagateTags
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PropagateTags
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe PropagateTags
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe PropagateTags
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"clusterArn")
            Parser
  (Maybe PropagateTags
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe PropagateTags)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PropagateTags)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"propagateTags")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platformVersion")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"enableECSManagedTags")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdBy")
            Parser
  (Maybe Int
   -> Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Int)
-> Parser
     (Maybe [LoadBalancer]
      -> Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"desiredCount")
            Parser
  (Maybe [LoadBalancer]
   -> Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe [LoadBalancer])
-> Parser
     (Maybe Int
      -> Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [LoadBalancer]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"loadBalancers" Parser (Maybe (Maybe [LoadBalancer]))
-> Maybe [LoadBalancer] -> Parser (Maybe [LoadBalancer])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LoadBalancer]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Int
   -> Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Int)
-> Parser
     (Maybe [PlacementConstraint]
      -> Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pendingCount")
            Parser
  (Maybe [PlacementConstraint]
   -> Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe [PlacementConstraint])
-> Parser
     (Maybe [ServiceEvent]
      -> Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PlacementConstraint]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"placementConstraints"
                            Parser (Maybe (Maybe [PlacementConstraint]))
-> Maybe [PlacementConstraint]
-> Parser (Maybe [PlacementConstraint])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PlacementConstraint]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [ServiceEvent]
   -> Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe [ServiceEvent])
-> Parser
     (Maybe [PlacementStrategy]
      -> Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ServiceEvent]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"events" Parser (Maybe (Maybe [ServiceEvent]))
-> Maybe [ServiceEvent] -> Parser (Maybe [ServiceEvent])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ServiceEvent]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [PlacementStrategy]
   -> Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe [PlacementStrategy])
-> Parser
     (Maybe [Deployment]
      -> Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PlacementStrategy]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"placementStrategy"
                            Parser (Maybe (Maybe [PlacementStrategy]))
-> Maybe [PlacementStrategy] -> Parser (Maybe [PlacementStrategy])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PlacementStrategy]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [Deployment]
   -> Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe [Deployment])
-> Parser
     (Maybe Text
      -> Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Deployment]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deployments" Parser (Maybe (Maybe [Deployment]))
-> Maybe [Deployment] -> Parser (Maybe [Deployment])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Deployment]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe DeploymentController
      -> Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serviceName")
            Parser
  (Maybe DeploymentController
   -> Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe DeploymentController)
-> Parser
     (Maybe LaunchType
      -> Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentController)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentController")
            Parser
  (Maybe LaunchType
   -> Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe LaunchType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LaunchType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"launchType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serviceArn")
            Parser
  (Maybe Text
   -> Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe SchedulingStrategy
      -> Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskDefinition")
            Parser
  (Maybe SchedulingStrategy
   -> Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe SchedulingStrategy)
-> Parser
     (Maybe Int
      -> Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SchedulingStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"schedulingStrategy")
            Parser
  (Maybe Int
   -> Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Int)
-> Parser
     (Maybe NetworkConfiguration
      -> Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"healthCheckGracePeriodSeconds")
            Parser
  (Maybe NetworkConfiguration
   -> Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe NetworkConfiguration)
-> Parser
     (Maybe [ServiceRegistry]
      -> Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"networkConfiguration")
            Parser
  (Maybe [ServiceRegistry]
   -> Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe [ServiceRegistry])
-> Parser
     (Maybe [CapacityProviderStrategyItem]
      -> Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ServiceRegistry]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serviceRegistries"
                            Parser (Maybe (Maybe [ServiceRegistry]))
-> Maybe [ServiceRegistry] -> Parser (Maybe [ServiceRegistry])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ServiceRegistry]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [CapacityProviderStrategyItem]
   -> Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe [CapacityProviderStrategyItem])
-> Parser
     (Maybe Bool
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe DeploymentConfiguration
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [CapacityProviderStrategyItem]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"capacityProviderStrategy"
                            Parser (Maybe (Maybe [CapacityProviderStrategyItem]))
-> Maybe [CapacityProviderStrategyItem]
-> Parser (Maybe [CapacityProviderStrategyItem])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [CapacityProviderStrategyItem]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Bool
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe DeploymentConfiguration
   -> ContainerService)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Tag]
      -> Maybe Text -> Maybe DeploymentConfiguration -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"enableExecuteCommand")
            Parser
  (Maybe [Tag]
   -> Maybe Text -> Maybe DeploymentConfiguration -> ContainerService)
-> Parser (Maybe [Tag])
-> Parser
     (Maybe Text -> Maybe DeploymentConfiguration -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text -> Maybe DeploymentConfiguration -> ContainerService)
-> Parser (Maybe Text)
-> Parser (Maybe DeploymentConfiguration -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"roleArn")
            Parser (Maybe DeploymentConfiguration -> ContainerService)
-> Parser (Maybe DeploymentConfiguration)
-> Parser ContainerService
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentConfiguration")
      )

instance Prelude.Hashable ContainerService

instance Prelude.NFData ContainerService