amazonka-ecs 0.3.3 → 0.3.4
raw patch · 29 files changed
+1422/−21 lines, 29 filesdep ~amazonka-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: amazonka-core
API changes (from Hackage documentation)
+ Network.AWS.ECS.CreateService: createService :: Text -> CreateService
+ Network.AWS.ECS.CreateService: createServiceResponse :: CreateServiceResponse
+ Network.AWS.ECS.CreateService: cs1ClientToken :: Lens' CreateService (Maybe Text)
+ Network.AWS.ECS.CreateService: cs1Cluster :: Lens' CreateService (Maybe Text)
+ Network.AWS.ECS.CreateService: cs1DesiredCount :: Lens' CreateService (Maybe Int)
+ Network.AWS.ECS.CreateService: cs1LoadBalancers :: Lens' CreateService [LoadBalancer]
+ Network.AWS.ECS.CreateService: cs1Role :: Lens' CreateService (Maybe Text)
+ Network.AWS.ECS.CreateService: cs1ServiceName :: Lens' CreateService Text
+ Network.AWS.ECS.CreateService: cs1TaskDefinition :: Lens' CreateService (Maybe Text)
+ Network.AWS.ECS.CreateService: csrService :: Lens' CreateServiceResponse (Maybe ContainerService)
+ Network.AWS.ECS.CreateService: data CreateService
+ Network.AWS.ECS.CreateService: data CreateServiceResponse
+ Network.AWS.ECS.CreateService: instance AWSRequest CreateService
+ Network.AWS.ECS.CreateService: instance Eq CreateService
+ Network.AWS.ECS.CreateService: instance Eq CreateServiceResponse
+ Network.AWS.ECS.CreateService: instance FromJSON CreateServiceResponse
+ Network.AWS.ECS.CreateService: instance Read CreateService
+ Network.AWS.ECS.CreateService: instance Read CreateServiceResponse
+ Network.AWS.ECS.CreateService: instance Show CreateService
+ Network.AWS.ECS.CreateService: instance Show CreateServiceResponse
+ Network.AWS.ECS.CreateService: instance ToHeaders CreateService
+ Network.AWS.ECS.CreateService: instance ToJSON CreateService
+ Network.AWS.ECS.CreateService: instance ToPath CreateService
+ Network.AWS.ECS.CreateService: instance ToQuery CreateService
+ Network.AWS.ECS.DeleteService: data DeleteService
+ Network.AWS.ECS.DeleteService: data DeleteServiceResponse
+ Network.AWS.ECS.DeleteService: deleteService :: Text -> DeleteService
+ Network.AWS.ECS.DeleteService: deleteServiceResponse :: DeleteServiceResponse
+ Network.AWS.ECS.DeleteService: dsCluster :: Lens' DeleteService (Maybe Text)
+ Network.AWS.ECS.DeleteService: dsService :: Lens' DeleteService Text
+ Network.AWS.ECS.DeleteService: dsrService :: Lens' DeleteServiceResponse (Maybe ContainerService)
+ Network.AWS.ECS.DeleteService: instance AWSRequest DeleteService
+ Network.AWS.ECS.DeleteService: instance Eq DeleteService
+ Network.AWS.ECS.DeleteService: instance Eq DeleteServiceResponse
+ Network.AWS.ECS.DeleteService: instance FromJSON DeleteServiceResponse
+ Network.AWS.ECS.DeleteService: instance Ord DeleteService
+ Network.AWS.ECS.DeleteService: instance Read DeleteService
+ Network.AWS.ECS.DeleteService: instance Read DeleteServiceResponse
+ Network.AWS.ECS.DeleteService: instance Show DeleteService
+ Network.AWS.ECS.DeleteService: instance Show DeleteServiceResponse
+ Network.AWS.ECS.DeleteService: instance ToHeaders DeleteService
+ Network.AWS.ECS.DeleteService: instance ToJSON DeleteService
+ Network.AWS.ECS.DeleteService: instance ToPath DeleteService
+ Network.AWS.ECS.DeleteService: instance ToQuery DeleteService
+ Network.AWS.ECS.DescribeServices: data DescribeServices
+ Network.AWS.ECS.DescribeServices: data DescribeServicesResponse
+ Network.AWS.ECS.DescribeServices: describeServices :: DescribeServices
+ Network.AWS.ECS.DescribeServices: describeServicesResponse :: DescribeServicesResponse
+ Network.AWS.ECS.DescribeServices: ds1Cluster :: Lens' DescribeServices (Maybe Text)
+ Network.AWS.ECS.DescribeServices: ds1Services :: Lens' DescribeServices [Text]
+ Network.AWS.ECS.DescribeServices: dsrFailures :: Lens' DescribeServicesResponse [Failure]
+ Network.AWS.ECS.DescribeServices: dsrServices :: Lens' DescribeServicesResponse [ContainerService]
+ Network.AWS.ECS.DescribeServices: instance AWSRequest DescribeServices
+ Network.AWS.ECS.DescribeServices: instance Eq DescribeServices
+ Network.AWS.ECS.DescribeServices: instance Eq DescribeServicesResponse
+ Network.AWS.ECS.DescribeServices: instance FromJSON DescribeServicesResponse
+ Network.AWS.ECS.DescribeServices: instance Ord DescribeServices
+ Network.AWS.ECS.DescribeServices: instance Read DescribeServices
+ Network.AWS.ECS.DescribeServices: instance Read DescribeServicesResponse
+ Network.AWS.ECS.DescribeServices: instance Show DescribeServices
+ Network.AWS.ECS.DescribeServices: instance Show DescribeServicesResponse
+ Network.AWS.ECS.DescribeServices: instance ToHeaders DescribeServices
+ Network.AWS.ECS.DescribeServices: instance ToJSON DescribeServices
+ Network.AWS.ECS.DescribeServices: instance ToPath DescribeServices
+ Network.AWS.ECS.DescribeServices: instance ToQuery DescribeServices
+ Network.AWS.ECS.ListServices: data ListServices
+ Network.AWS.ECS.ListServices: data ListServicesResponse
+ Network.AWS.ECS.ListServices: instance AWSRequest ListServices
+ Network.AWS.ECS.ListServices: instance Eq ListServices
+ Network.AWS.ECS.ListServices: instance Eq ListServicesResponse
+ Network.AWS.ECS.ListServices: instance FromJSON ListServicesResponse
+ Network.AWS.ECS.ListServices: instance Ord ListServices
+ Network.AWS.ECS.ListServices: instance Ord ListServicesResponse
+ Network.AWS.ECS.ListServices: instance Read ListServices
+ Network.AWS.ECS.ListServices: instance Read ListServicesResponse
+ Network.AWS.ECS.ListServices: instance Show ListServices
+ Network.AWS.ECS.ListServices: instance Show ListServicesResponse
+ Network.AWS.ECS.ListServices: instance ToHeaders ListServices
+ Network.AWS.ECS.ListServices: instance ToJSON ListServices
+ Network.AWS.ECS.ListServices: instance ToPath ListServices
+ Network.AWS.ECS.ListServices: instance ToQuery ListServices
+ Network.AWS.ECS.ListServices: listServices :: ListServices
+ Network.AWS.ECS.ListServices: listServicesResponse :: ListServicesResponse
+ Network.AWS.ECS.ListServices: lsCluster :: Lens' ListServices (Maybe Text)
+ Network.AWS.ECS.ListServices: lsMaxResults :: Lens' ListServices (Maybe Int)
+ Network.AWS.ECS.ListServices: lsNextToken :: Lens' ListServices (Maybe Text)
+ Network.AWS.ECS.ListServices: lsrNextToken :: Lens' ListServicesResponse (Maybe Text)
+ Network.AWS.ECS.ListServices: lsrServiceArns :: Lens' ListServicesResponse [Text]
+ Network.AWS.ECS.ListTasks: ltServiceName :: Lens' ListTasks (Maybe Text)
+ Network.AWS.ECS.ListTasks: ltStartedBy :: Lens' ListTasks (Maybe Text)
+ Network.AWS.ECS.RegisterContainerInstance: rciVersionInfo :: Lens' RegisterContainerInstance (Maybe VersionInfo)
+ Network.AWS.ECS.RunTask: rtStartedBy :: Lens' RunTask (Maybe Text)
+ Network.AWS.ECS.StartTask: st1StartedBy :: Lens' StartTask (Maybe Text)
+ Network.AWS.ECS.Types: cPendingTasksCount :: Lens' Cluster (Maybe Int)
+ Network.AWS.ECS.Types: cRegisteredContainerInstancesCount :: Lens' Cluster (Maybe Int)
+ Network.AWS.ECS.Types: cRunningTasksCount :: Lens' Cluster (Maybe Int)
+ Network.AWS.ECS.Types: ciPendingTasksCount :: Lens' ContainerInstance (Maybe Int)
+ Network.AWS.ECS.Types: ciRunningTasksCount :: Lens' ContainerInstance (Maybe Int)
+ Network.AWS.ECS.Types: containerService :: ContainerService
+ Network.AWS.ECS.Types: csClusterArn :: Lens' ContainerService (Maybe Text)
+ Network.AWS.ECS.Types: csDeployments :: Lens' ContainerService [Deployment]
+ Network.AWS.ECS.Types: csDesiredCount :: Lens' ContainerService (Maybe Int)
+ Network.AWS.ECS.Types: csEvents :: Lens' ContainerService [ServiceEvent]
+ Network.AWS.ECS.Types: csLoadBalancers :: Lens' ContainerService [LoadBalancer]
+ Network.AWS.ECS.Types: csPendingCount :: Lens' ContainerService (Maybe Int)
+ Network.AWS.ECS.Types: csRoleArn :: Lens' ContainerService (Maybe Text)
+ Network.AWS.ECS.Types: csRunningCount :: Lens' ContainerService (Maybe Int)
+ Network.AWS.ECS.Types: csServiceArn :: Lens' ContainerService (Maybe Text)
+ Network.AWS.ECS.Types: csServiceName :: Lens' ContainerService (Maybe Text)
+ Network.AWS.ECS.Types: csStatus :: Lens' ContainerService (Maybe Text)
+ Network.AWS.ECS.Types: csTaskDefinition :: Lens' ContainerService (Maybe Text)
+ Network.AWS.ECS.Types: dCreatedAt :: Lens' Deployment (Maybe UTCTime)
+ Network.AWS.ECS.Types: dDesiredCount :: Lens' Deployment (Maybe Int)
+ Network.AWS.ECS.Types: dId :: Lens' Deployment (Maybe Text)
+ Network.AWS.ECS.Types: dPendingCount :: Lens' Deployment (Maybe Int)
+ Network.AWS.ECS.Types: dRunningCount :: Lens' Deployment (Maybe Int)
+ Network.AWS.ECS.Types: dStatus :: Lens' Deployment (Maybe Text)
+ Network.AWS.ECS.Types: dTaskDefinition :: Lens' Deployment (Maybe Text)
+ Network.AWS.ECS.Types: dUpdatedAt :: Lens' Deployment (Maybe UTCTime)
+ Network.AWS.ECS.Types: data ContainerService
+ Network.AWS.ECS.Types: data Deployment
+ Network.AWS.ECS.Types: data LoadBalancer
+ Network.AWS.ECS.Types: data ServiceEvent
+ Network.AWS.ECS.Types: data VersionInfo
+ Network.AWS.ECS.Types: deployment :: Deployment
+ Network.AWS.ECS.Types: instance Eq ContainerService
+ Network.AWS.ECS.Types: instance Eq Deployment
+ Network.AWS.ECS.Types: instance Eq LoadBalancer
+ Network.AWS.ECS.Types: instance Eq ServiceEvent
+ Network.AWS.ECS.Types: instance Eq VersionInfo
+ Network.AWS.ECS.Types: instance FromJSON ContainerService
+ Network.AWS.ECS.Types: instance FromJSON Deployment
+ Network.AWS.ECS.Types: instance FromJSON LoadBalancer
+ Network.AWS.ECS.Types: instance FromJSON ServiceEvent
+ Network.AWS.ECS.Types: instance FromJSON VersionInfo
+ Network.AWS.ECS.Types: instance Ord Deployment
+ Network.AWS.ECS.Types: instance Ord LoadBalancer
+ Network.AWS.ECS.Types: instance Ord ServiceEvent
+ Network.AWS.ECS.Types: instance Ord VersionInfo
+ Network.AWS.ECS.Types: instance Read ContainerService
+ Network.AWS.ECS.Types: instance Read Deployment
+ Network.AWS.ECS.Types: instance Read LoadBalancer
+ Network.AWS.ECS.Types: instance Read ServiceEvent
+ Network.AWS.ECS.Types: instance Read VersionInfo
+ Network.AWS.ECS.Types: instance Show ContainerService
+ Network.AWS.ECS.Types: instance Show Deployment
+ Network.AWS.ECS.Types: instance Show LoadBalancer
+ Network.AWS.ECS.Types: instance Show ServiceEvent
+ Network.AWS.ECS.Types: instance Show VersionInfo
+ Network.AWS.ECS.Types: instance ToJSON ContainerService
+ Network.AWS.ECS.Types: instance ToJSON Deployment
+ Network.AWS.ECS.Types: instance ToJSON LoadBalancer
+ Network.AWS.ECS.Types: instance ToJSON ServiceEvent
+ Network.AWS.ECS.Types: instance ToJSON VersionInfo
+ Network.AWS.ECS.Types: lbContainerName :: Lens' LoadBalancer (Maybe Text)
+ Network.AWS.ECS.Types: lbContainerPort :: Lens' LoadBalancer (Maybe Int)
+ Network.AWS.ECS.Types: lbLoadBalancerName :: Lens' LoadBalancer (Maybe Text)
+ Network.AWS.ECS.Types: loadBalancer :: LoadBalancer
+ Network.AWS.ECS.Types: seCreatedAt :: Lens' ServiceEvent (Maybe UTCTime)
+ Network.AWS.ECS.Types: seId :: Lens' ServiceEvent (Maybe Text)
+ Network.AWS.ECS.Types: seMessage :: Lens' ServiceEvent (Maybe Text)
+ Network.AWS.ECS.Types: serviceEvent :: ServiceEvent
+ Network.AWS.ECS.Types: tStartedBy :: Lens' Task (Maybe Text)
+ Network.AWS.ECS.Types: versionInfo :: VersionInfo
+ Network.AWS.ECS.Types: viAgentHash :: Lens' VersionInfo (Maybe Text)
+ Network.AWS.ECS.Types: viAgentVersion :: Lens' VersionInfo (Maybe Text)
+ Network.AWS.ECS.Types: viDockerVersion :: Lens' VersionInfo (Maybe Text)
+ Network.AWS.ECS.UpdateService: data UpdateService
+ Network.AWS.ECS.UpdateService: data UpdateServiceResponse
+ Network.AWS.ECS.UpdateService: instance AWSRequest UpdateService
+ Network.AWS.ECS.UpdateService: instance Eq UpdateService
+ Network.AWS.ECS.UpdateService: instance Eq UpdateServiceResponse
+ Network.AWS.ECS.UpdateService: instance FromJSON UpdateServiceResponse
+ Network.AWS.ECS.UpdateService: instance Ord UpdateService
+ Network.AWS.ECS.UpdateService: instance Read UpdateService
+ Network.AWS.ECS.UpdateService: instance Read UpdateServiceResponse
+ Network.AWS.ECS.UpdateService: instance Show UpdateService
+ Network.AWS.ECS.UpdateService: instance Show UpdateServiceResponse
+ Network.AWS.ECS.UpdateService: instance ToHeaders UpdateService
+ Network.AWS.ECS.UpdateService: instance ToJSON UpdateService
+ Network.AWS.ECS.UpdateService: instance ToPath UpdateService
+ Network.AWS.ECS.UpdateService: instance ToQuery UpdateService
+ Network.AWS.ECS.UpdateService: updateService :: Text -> UpdateService
+ Network.AWS.ECS.UpdateService: updateServiceResponse :: UpdateServiceResponse
+ Network.AWS.ECS.UpdateService: usCluster :: Lens' UpdateService (Maybe Text)
+ Network.AWS.ECS.UpdateService: usDesiredCount :: Lens' UpdateService (Maybe Int)
+ Network.AWS.ECS.UpdateService: usService :: Lens' UpdateService Text
+ Network.AWS.ECS.UpdateService: usTaskDefinition :: Lens' UpdateService (Maybe Text)
+ Network.AWS.ECS.UpdateService: usrService :: Lens' UpdateServiceResponse (Maybe ContainerService)
Files
- amazonka-ecs.cabal +7/−2
- gen/Network/AWS/ECS.hs +10/−0
- gen/Network/AWS/ECS/CreateCluster.hs +3/−5
- gen/Network/AWS/ECS/CreateService.hs +186/−0
- gen/Network/AWS/ECS/DeleteCluster.hs +1/−0
- gen/Network/AWS/ECS/DeleteService.hs +121/−0
- gen/Network/AWS/ECS/DeregisterContainerInstance.hs +1/−0
- gen/Network/AWS/ECS/DeregisterTaskDefinition.hs +1/−0
- gen/Network/AWS/ECS/DescribeClusters.hs +1/−0
- gen/Network/AWS/ECS/DescribeContainerInstances.hs +1/−0
- gen/Network/AWS/ECS/DescribeServices.hs +131/−0
- gen/Network/AWS/ECS/DescribeTaskDefinition.hs +1/−0
- gen/Network/AWS/ECS/DescribeTasks.hs +1/−0
- gen/Network/AWS/ECS/DiscoverPollEndpoint.hs +1/−0
- gen/Network/AWS/ECS/ListClusters.hs +1/−0
- gen/Network/AWS/ECS/ListContainerInstances.hs +1/−0
- gen/Network/AWS/ECS/ListServices.hs +155/−0
- gen/Network/AWS/ECS/ListTaskDefinitionFamilies.hs +1/−0
- gen/Network/AWS/ECS/ListTaskDefinitions.hs +1/−0
- gen/Network/AWS/ECS/ListTasks.hs +25/−0
- gen/Network/AWS/ECS/RegisterContainerInstance.hs +10/−0
- gen/Network/AWS/ECS/RegisterTaskDefinition.hs +3/−1
- gen/Network/AWS/ECS/RunTask.hs +32/−2
- gen/Network/AWS/ECS/StartTask.hs +30/−0
- gen/Network/AWS/ECS/StopTask.hs +1/−0
- gen/Network/AWS/ECS/SubmitContainerStateChange.hs +1/−0
- gen/Network/AWS/ECS/SubmitTaskStateChange.hs +1/−0
- gen/Network/AWS/ECS/Types.hs +530/−11
- gen/Network/AWS/ECS/UpdateService.hs +164/−0
amazonka-ecs.cabal view
@@ -1,5 +1,5 @@ name: amazonka-ecs-version: 0.3.3+version: 0.3.4 synopsis: Amazon EC2 Container Service SDK. homepage: https://github.com/brendanhay/amazonka license: OtherLicense@@ -45,16 +45,20 @@ exposed-modules: Network.AWS.ECS , Network.AWS.ECS.CreateCluster+ , Network.AWS.ECS.CreateService , Network.AWS.ECS.DeleteCluster+ , Network.AWS.ECS.DeleteService , Network.AWS.ECS.DeregisterContainerInstance , Network.AWS.ECS.DeregisterTaskDefinition , Network.AWS.ECS.DescribeClusters , Network.AWS.ECS.DescribeContainerInstances+ , Network.AWS.ECS.DescribeServices , Network.AWS.ECS.DescribeTaskDefinition , Network.AWS.ECS.DescribeTasks , Network.AWS.ECS.DiscoverPollEndpoint , Network.AWS.ECS.ListClusters , Network.AWS.ECS.ListContainerInstances+ , Network.AWS.ECS.ListServices , Network.AWS.ECS.ListTaskDefinitionFamilies , Network.AWS.ECS.ListTaskDefinitions , Network.AWS.ECS.ListTasks@@ -66,9 +70,10 @@ , Network.AWS.ECS.SubmitContainerStateChange , Network.AWS.ECS.SubmitTaskStateChange , Network.AWS.ECS.Types+ , Network.AWS.ECS.UpdateService other-modules: build-depends:- amazonka-core == 0.3.3.*+ amazonka-core == 0.3.4.* , base >= 4.7 && < 5
gen/Network/AWS/ECS.hs view
@@ -24,16 +24,20 @@ -- worry about scaling your management infrastructure. module Network.AWS.ECS ( module Network.AWS.ECS.CreateCluster+ , module Network.AWS.ECS.CreateService , module Network.AWS.ECS.DeleteCluster+ , module Network.AWS.ECS.DeleteService , module Network.AWS.ECS.DeregisterContainerInstance , module Network.AWS.ECS.DeregisterTaskDefinition , module Network.AWS.ECS.DescribeClusters , module Network.AWS.ECS.DescribeContainerInstances+ , module Network.AWS.ECS.DescribeServices , module Network.AWS.ECS.DescribeTaskDefinition , module Network.AWS.ECS.DescribeTasks , module Network.AWS.ECS.DiscoverPollEndpoint , module Network.AWS.ECS.ListClusters , module Network.AWS.ECS.ListContainerInstances+ , module Network.AWS.ECS.ListServices , module Network.AWS.ECS.ListTaskDefinitionFamilies , module Network.AWS.ECS.ListTaskDefinitions , module Network.AWS.ECS.ListTasks@@ -45,19 +49,24 @@ , module Network.AWS.ECS.SubmitContainerStateChange , module Network.AWS.ECS.SubmitTaskStateChange , module Network.AWS.ECS.Types+ , module Network.AWS.ECS.UpdateService ) where import Network.AWS.ECS.CreateCluster+import Network.AWS.ECS.CreateService import Network.AWS.ECS.DeleteCluster+import Network.AWS.ECS.DeleteService import Network.AWS.ECS.DeregisterContainerInstance import Network.AWS.ECS.DeregisterTaskDefinition import Network.AWS.ECS.DescribeClusters import Network.AWS.ECS.DescribeContainerInstances+import Network.AWS.ECS.DescribeServices import Network.AWS.ECS.DescribeTaskDefinition import Network.AWS.ECS.DescribeTasks import Network.AWS.ECS.DiscoverPollEndpoint import Network.AWS.ECS.ListClusters import Network.AWS.ECS.ListContainerInstances+import Network.AWS.ECS.ListServices import Network.AWS.ECS.ListTaskDefinitionFamilies import Network.AWS.ECS.ListTaskDefinitions import Network.AWS.ECS.ListTasks@@ -69,3 +78,4 @@ import Network.AWS.ECS.SubmitContainerStateChange import Network.AWS.ECS.SubmitTaskStateChange import Network.AWS.ECS.Types+import Network.AWS.ECS.UpdateService
gen/Network/AWS/ECS/CreateCluster.hs view
@@ -25,10 +25,6 @@ -- | Creates a new Amazon ECS cluster. By default, your account will receive a 'default' cluster when you launch your first container instance. However, you can -- create your own cluster with a unique name with the 'CreateCluster' action. ----- During the preview, each account is limited to two clusters.--------- -- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateCluster.html> module Network.AWS.ECS.CreateCluster (@@ -47,6 +43,7 @@ , ccrCluster ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types@@ -68,7 +65,8 @@ } -- | The name of your cluster. If you do not specify a name for your cluster, you--- will create a cluster named 'default'.+-- will create a cluster named 'default'. Up to 255 letters (uppercase and+-- lowercase), numbers, hyphens, and underscores are allowed. ccClusterName :: Lens' CreateCluster (Maybe Text) ccClusterName = lens _ccClusterName (\s a -> s { _ccClusterName = a })
+ gen/Network/AWS/ECS/CreateService.hs view
@@ -0,0 +1,186 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.ECS.CreateService+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Runs and maintains a desired number of tasks from a specified task+-- definition. If the number of tasks running in a service drops below 'desiredCount', Amazon ECS will spawn another instantiation of the task in the specified+-- cluster.+--+-- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html>+module Network.AWS.ECS.CreateService+ (+ -- * Request+ CreateService+ -- ** Request constructor+ , createService+ -- ** Request lenses+ , cs1ClientToken+ , cs1Cluster+ , cs1DesiredCount+ , cs1LoadBalancers+ , cs1Role+ , cs1ServiceName+ , cs1TaskDefinition++ -- * Response+ , CreateServiceResponse+ -- ** Response constructor+ , createServiceResponse+ -- ** Response lenses+ , csrService+ ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.ECS.Types+import qualified GHC.Exts++data CreateService = CreateService+ { _cs1ClientToken :: Maybe Text+ , _cs1Cluster :: Maybe Text+ , _cs1DesiredCount :: Maybe Int+ , _cs1LoadBalancers :: List "loadBalancers" LoadBalancer+ , _cs1Role :: Maybe Text+ , _cs1ServiceName :: Text+ , _cs1TaskDefinition :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'CreateService' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cs1ClientToken' @::@ 'Maybe' 'Text'+--+-- * 'cs1Cluster' @::@ 'Maybe' 'Text'+--+-- * 'cs1DesiredCount' @::@ 'Maybe' 'Int'+--+-- * 'cs1LoadBalancers' @::@ ['LoadBalancer']+--+-- * 'cs1Role' @::@ 'Maybe' 'Text'+--+-- * 'cs1ServiceName' @::@ 'Text'+--+-- * 'cs1TaskDefinition' @::@ 'Maybe' 'Text'+--+createService :: Text -- ^ 'cs1ServiceName'+ -> CreateService+createService p1 = CreateService+ { _cs1ServiceName = p1+ , _cs1Cluster = Nothing+ , _cs1TaskDefinition = Nothing+ , _cs1LoadBalancers = mempty+ , _cs1DesiredCount = Nothing+ , _cs1ClientToken = Nothing+ , _cs1Role = Nothing+ }++-- | Unique, case-sensitive identifier you provide to ensure the idempotency of+-- the request. Up to 32 ASCII characters are allowed.+cs1ClientToken :: Lens' CreateService (Maybe Text)+cs1ClientToken = lens _cs1ClientToken (\s a -> s { _cs1ClientToken = a })++-- | The short name or full Amazon Resource Name (ARN) of the cluster that you+-- want to run your service on. If you do not specify a cluster, the default+-- cluster is assumed.+cs1Cluster :: Lens' CreateService (Maybe Text)+cs1Cluster = lens _cs1Cluster (\s a -> s { _cs1Cluster = a })++-- | The number of instantiations of the specified task definition that you would+-- like to place and keep running on your cluster.+cs1DesiredCount :: Lens' CreateService (Maybe Int)+cs1DesiredCount = lens _cs1DesiredCount (\s a -> s { _cs1DesiredCount = a })++-- | A list of 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.+cs1LoadBalancers :: Lens' CreateService [LoadBalancer]+cs1LoadBalancers = lens _cs1LoadBalancers (\s a -> s { _cs1LoadBalancers = a }) . _List++-- | The name or full Amazon Resource Name (ARN) of the IAM role that allows your+-- Amazon ECS container agent to make calls to your load balancer on your+-- behalf. This parameter is only required if you are using a load balancer with+-- your service.+cs1Role :: Lens' CreateService (Maybe Text)+cs1Role = lens _cs1Role (\s a -> s { _cs1Role = a })++-- | The name of your service. Up to 255 letters (uppercase and lowercase),+-- numbers, hyphens, and underscores are allowed.+cs1ServiceName :: Lens' CreateService Text+cs1ServiceName = lens _cs1ServiceName (\s a -> s { _cs1ServiceName = a })++-- | The 'family' and 'revision' ('family:revision') or full Amazon Resource Name (ARN)+-- of the task definition that you want to run in your service.+cs1TaskDefinition :: Lens' CreateService (Maybe Text)+cs1TaskDefinition =+ lens _cs1TaskDefinition (\s a -> s { _cs1TaskDefinition = a })++newtype CreateServiceResponse = CreateServiceResponse+ { _csrService :: Maybe ContainerService+ } deriving (Eq, Read, Show)++-- | 'CreateServiceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'csrService' @::@ 'Maybe' 'ContainerService'+--+createServiceResponse :: CreateServiceResponse+createServiceResponse = CreateServiceResponse+ { _csrService = Nothing+ }++-- | The full description of your service following the create call.+csrService :: Lens' CreateServiceResponse (Maybe ContainerService)+csrService = lens _csrService (\s a -> s { _csrService = a })++instance ToPath CreateService where+ toPath = const "/"++instance ToQuery CreateService where+ toQuery = const mempty++instance ToHeaders CreateService++instance ToJSON CreateService where+ toJSON CreateService{..} = object+ [ "cluster" .= _cs1Cluster+ , "serviceName" .= _cs1ServiceName+ , "taskDefinition" .= _cs1TaskDefinition+ , "loadBalancers" .= _cs1LoadBalancers+ , "desiredCount" .= _cs1DesiredCount+ , "clientToken" .= _cs1ClientToken+ , "role" .= _cs1Role+ ]++instance AWSRequest CreateService where+ type Sv CreateService = ECS+ type Rs CreateService = CreateServiceResponse++ request = post "CreateService"+ response = jsonResponse++instance FromJSON CreateServiceResponse where+ parseJSON = withObject "CreateServiceResponse" $ \o -> CreateServiceResponse+ <$> o .:? "service"
gen/Network/AWS/ECS/DeleteCluster.hs view
@@ -44,6 +44,7 @@ , dcrCluster ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
+ gen/Network/AWS/ECS/DeleteService.hs view
@@ -0,0 +1,121 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.ECS.DeleteService+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Deletes a specified service within a cluster.+--+-- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteService.html>+module Network.AWS.ECS.DeleteService+ (+ -- * Request+ DeleteService+ -- ** Request constructor+ , deleteService+ -- ** Request lenses+ , dsCluster+ , dsService++ -- * Response+ , DeleteServiceResponse+ -- ** Response constructor+ , deleteServiceResponse+ -- ** Response lenses+ , dsrService+ ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.ECS.Types+import qualified GHC.Exts++data DeleteService = DeleteService+ { _dsCluster :: Maybe Text+ , _dsService :: Text+ } deriving (Eq, Ord, Read, Show)++-- | 'DeleteService' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dsCluster' @::@ 'Maybe' 'Text'+--+-- * 'dsService' @::@ 'Text'+--+deleteService :: Text -- ^ 'dsService'+ -> DeleteService+deleteService p1 = DeleteService+ { _dsService = p1+ , _dsCluster = Nothing+ }++-- | The name of the cluster that hosts the service you want to delete.+dsCluster :: Lens' DeleteService (Maybe Text)+dsCluster = lens _dsCluster (\s a -> s { _dsCluster = a })++-- | The name of the service you want to delete.+dsService :: Lens' DeleteService Text+dsService = lens _dsService (\s a -> s { _dsService = a })++newtype DeleteServiceResponse = DeleteServiceResponse+ { _dsrService :: Maybe ContainerService+ } deriving (Eq, Read, Show)++-- | 'DeleteServiceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dsrService' @::@ 'Maybe' 'ContainerService'+--+deleteServiceResponse :: DeleteServiceResponse+deleteServiceResponse = DeleteServiceResponse+ { _dsrService = Nothing+ }++dsrService :: Lens' DeleteServiceResponse (Maybe ContainerService)+dsrService = lens _dsrService (\s a -> s { _dsrService = a })++instance ToPath DeleteService where+ toPath = const "/"++instance ToQuery DeleteService where+ toQuery = const mempty++instance ToHeaders DeleteService++instance ToJSON DeleteService where+ toJSON DeleteService{..} = object+ [ "cluster" .= _dsCluster+ , "service" .= _dsService+ ]++instance AWSRequest DeleteService where+ type Sv DeleteService = ECS+ type Rs DeleteService = DeleteServiceResponse++ request = post "DeleteService"+ response = jsonResponse++instance FromJSON DeleteServiceResponse where+ parseJSON = withObject "DeleteServiceResponse" $ \o -> DeleteServiceResponse+ <$> o .:? "service"
gen/Network/AWS/ECS/DeregisterContainerInstance.hs view
@@ -45,6 +45,7 @@ , dcirContainerInstance ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/DeregisterTaskDefinition.hs view
@@ -45,6 +45,7 @@ , dtdrTaskDefinition ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/DescribeClusters.hs view
@@ -43,6 +43,7 @@ , dcrFailures ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/DescribeContainerInstances.hs view
@@ -45,6 +45,7 @@ , dcirFailures ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
+ gen/Network/AWS/ECS/DescribeServices.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.ECS.DescribeServices+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Describes the specified services running in your cluster.+--+-- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServices.html>+module Network.AWS.ECS.DescribeServices+ (+ -- * Request+ DescribeServices+ -- ** Request constructor+ , describeServices+ -- ** Request lenses+ , ds1Cluster+ , ds1Services++ -- * Response+ , DescribeServicesResponse+ -- ** Response constructor+ , describeServicesResponse+ -- ** Response lenses+ , dsrFailures+ , dsrServices+ ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.ECS.Types+import qualified GHC.Exts++data DescribeServices = DescribeServices+ { _ds1Cluster :: Maybe Text+ , _ds1Services :: List "services" Text+ } deriving (Eq, Ord, Read, Show)++-- | 'DescribeServices' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ds1Cluster' @::@ 'Maybe' 'Text'+--+-- * 'ds1Services' @::@ ['Text']+--+describeServices :: DescribeServices+describeServices = DescribeServices+ { _ds1Cluster = Nothing+ , _ds1Services = mempty+ }++-- | The name of the cluster that hosts the service you want to describe.+ds1Cluster :: Lens' DescribeServices (Maybe Text)+ds1Cluster = lens _ds1Cluster (\s a -> s { _ds1Cluster = a })++-- | A list of services you want to describe.+ds1Services :: Lens' DescribeServices [Text]+ds1Services = lens _ds1Services (\s a -> s { _ds1Services = a }) . _List++data DescribeServicesResponse = DescribeServicesResponse+ { _dsrFailures :: List "failures" Failure+ , _dsrServices :: List "services" ContainerService+ } deriving (Eq, Read, Show)++-- | 'DescribeServicesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dsrFailures' @::@ ['Failure']+--+-- * 'dsrServices' @::@ ['ContainerService']+--+describeServicesResponse :: DescribeServicesResponse+describeServicesResponse = DescribeServicesResponse+ { _dsrServices = mempty+ , _dsrFailures = mempty+ }++-- | Any failures associated with the call.+dsrFailures :: Lens' DescribeServicesResponse [Failure]+dsrFailures = lens _dsrFailures (\s a -> s { _dsrFailures = a }) . _List++-- | The list of services described.+dsrServices :: Lens' DescribeServicesResponse [ContainerService]+dsrServices = lens _dsrServices (\s a -> s { _dsrServices = a }) . _List++instance ToPath DescribeServices where+ toPath = const "/"++instance ToQuery DescribeServices where+ toQuery = const mempty++instance ToHeaders DescribeServices++instance ToJSON DescribeServices where+ toJSON DescribeServices{..} = object+ [ "cluster" .= _ds1Cluster+ , "services" .= _ds1Services+ ]++instance AWSRequest DescribeServices where+ type Sv DescribeServices = ECS+ type Rs DescribeServices = DescribeServicesResponse++ request = post "DescribeServices"+ response = jsonResponse++instance FromJSON DescribeServicesResponse where+ parseJSON = withObject "DescribeServicesResponse" $ \o -> DescribeServicesResponse+ <$> o .:? "failures" .!= mempty+ <*> o .:? "services" .!= mempty
gen/Network/AWS/ECS/DescribeTaskDefinition.hs view
@@ -44,6 +44,7 @@ , dtdr1TaskDefinition ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/DescribeTasks.hs view
@@ -44,6 +44,7 @@ , dtrTasks ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/DiscoverPollEndpoint.hs view
@@ -47,6 +47,7 @@ , dperEndpoint ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/ListClusters.hs view
@@ -44,6 +44,7 @@ , lcrNextToken ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/ListContainerInstances.hs view
@@ -45,6 +45,7 @@ , lcirNextToken ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
+ gen/Network/AWS/ECS/ListServices.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.ECS.ListServices+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Lists the services that are running in a specified cluster.+--+-- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html>+module Network.AWS.ECS.ListServices+ (+ -- * Request+ ListServices+ -- ** Request constructor+ , listServices+ -- ** Request lenses+ , lsCluster+ , lsMaxResults+ , lsNextToken++ -- * Response+ , ListServicesResponse+ -- ** Response constructor+ , listServicesResponse+ -- ** Response lenses+ , lsrNextToken+ , lsrServiceArns+ ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.ECS.Types+import qualified GHC.Exts++data ListServices = ListServices+ { _lsCluster :: Maybe Text+ , _lsMaxResults :: Maybe Int+ , _lsNextToken :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'ListServices' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lsCluster' @::@ 'Maybe' 'Text'+--+-- * 'lsMaxResults' @::@ 'Maybe' 'Int'+--+-- * 'lsNextToken' @::@ 'Maybe' 'Text'+--+listServices :: ListServices+listServices = ListServices+ { _lsCluster = Nothing+ , _lsNextToken = Nothing+ , _lsMaxResults = Nothing+ }++-- | The short name or full Amazon Resource Name (ARN) of the cluster that hosts+-- the services you want to list. If you do not specify a cluster, the default+-- cluster is assumed..+lsCluster :: Lens' ListServices (Maybe Text)+lsCluster = lens _lsCluster (\s a -> s { _lsCluster = a })++-- | The maximum number of container instance results returned by 'ListServices' in+-- paginated output. When this parameter is used, 'ListServices' only returns 'maxResults' results in a single page along with a 'nextToken' response element. The+-- remaining results of the initial request can be seen by sending another 'ListServices' request with the returned 'nextToken' value. This value can be between 1 and+-- 100. If this parameter is not used, then 'ListServices' returns up to 100+-- results and a 'nextToken' value if applicable.+lsMaxResults :: Lens' ListServices (Maybe Int)+lsMaxResults = lens _lsMaxResults (\s a -> s { _lsMaxResults = a })++-- | The 'nextToken' value returned from a previous paginated 'ListServices' request+-- where 'maxResults' was used and the results exceeded the value of that+-- parameter. Pagination continues from the end of the previous results that+-- returned the 'nextToken' value. This value is 'null' when there are no more+-- results to return.+lsNextToken :: Lens' ListServices (Maybe Text)+lsNextToken = lens _lsNextToken (\s a -> s { _lsNextToken = a })++data ListServicesResponse = ListServicesResponse+ { _lsrNextToken :: Maybe Text+ , _lsrServiceArns :: List "serviceArns" Text+ } deriving (Eq, Ord, Read, Show)++-- | 'ListServicesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lsrNextToken' @::@ 'Maybe' 'Text'+--+-- * 'lsrServiceArns' @::@ ['Text']+--+listServicesResponse :: ListServicesResponse+listServicesResponse = ListServicesResponse+ { _lsrServiceArns = mempty+ , _lsrNextToken = Nothing+ }++-- | The 'nextToken' value to include in a future 'ListServices' request. When the+-- results of a 'ListServices' request exceed 'maxResults', this value can be used+-- to retrieve the next page of results. This value is 'null' when there are no+-- more results to return.+lsrNextToken :: Lens' ListServicesResponse (Maybe Text)+lsrNextToken = lens _lsrNextToken (\s a -> s { _lsrNextToken = a })++-- | The list of full Amazon Resource Name (ARN) entries for each service+-- associated with the specified cluster.+lsrServiceArns :: Lens' ListServicesResponse [Text]+lsrServiceArns = lens _lsrServiceArns (\s a -> s { _lsrServiceArns = a }) . _List++instance ToPath ListServices where+ toPath = const "/"++instance ToQuery ListServices where+ toQuery = const mempty++instance ToHeaders ListServices++instance ToJSON ListServices where+ toJSON ListServices{..} = object+ [ "cluster" .= _lsCluster+ , "nextToken" .= _lsNextToken+ , "maxResults" .= _lsMaxResults+ ]++instance AWSRequest ListServices where+ type Sv ListServices = ECS+ type Rs ListServices = ListServicesResponse++ request = post "ListServices"+ response = jsonResponse++instance FromJSON ListServicesResponse where+ parseJSON = withObject "ListServicesResponse" $ \o -> ListServicesResponse+ <$> o .:? "nextToken"+ <*> o .:? "serviceArns" .!= mempty
gen/Network/AWS/ECS/ListTaskDefinitionFamilies.hs view
@@ -46,6 +46,7 @@ , ltdfrNextToken ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/ListTaskDefinitions.hs view
@@ -46,6 +46,7 @@ , ltdrTaskDefinitionArns ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/ListTasks.hs view
@@ -38,6 +38,8 @@ , ltFamily , ltMaxResults , ltNextToken+ , ltServiceName+ , ltStartedBy -- * Response , ListTasksResponse@@ -48,6 +50,7 @@ , ltrTaskArns ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types@@ -59,6 +62,8 @@ , _ltFamily :: Maybe Text , _ltMaxResults :: Maybe Int , _ltNextToken :: Maybe Text+ , _ltServiceName :: Maybe Text+ , _ltStartedBy :: Maybe Text } deriving (Eq, Ord, Read, Show) -- | 'ListTasks' constructor.@@ -75,6 +80,10 @@ -- -- * 'ltNextToken' @::@ 'Maybe' 'Text' --+-- * 'ltServiceName' @::@ 'Maybe' 'Text'+--+-- * 'ltStartedBy' @::@ 'Maybe' 'Text'+-- listTasks :: ListTasks listTasks = ListTasks { _ltCluster = Nothing@@ -82,6 +91,8 @@ , _ltFamily = Nothing , _ltNextToken = Nothing , _ltMaxResults = Nothing+ , _ltStartedBy = Nothing+ , _ltServiceName = Nothing } -- | The short name or full Amazon Resource Name (ARN) of the cluster that hosts@@ -121,6 +132,18 @@ ltNextToken :: Lens' ListTasks (Maybe Text) ltNextToken = lens _ltNextToken (\s a -> s { _ltNextToken = a }) +-- | The name of the service that you want to filter the 'ListTasks' results with.+-- Specifying a 'serviceName' will limit the results to tasks that belong to that+-- service.+ltServiceName :: Lens' ListTasks (Maybe Text)+ltServiceName = lens _ltServiceName (\s a -> s { _ltServiceName = a })++-- | The 'startedBy' value that you want to filter the task results with. Specifying+-- a 'startedBy' value will limit the results to tasks that were started with that+-- value.+ltStartedBy :: Lens' ListTasks (Maybe Text)+ltStartedBy = lens _ltStartedBy (\s a -> s { _ltStartedBy = a })+ data ListTasksResponse = ListTasksResponse { _ltrNextToken :: Maybe Text , _ltrTaskArns :: List "taskArns" Text@@ -166,6 +189,8 @@ , "family" .= _ltFamily , "nextToken" .= _ltNextToken , "maxResults" .= _ltMaxResults+ , "startedBy" .= _ltStartedBy+ , "serviceName" .= _ltServiceName ] instance AWSRequest ListTasks where
gen/Network/AWS/ECS/RegisterContainerInstance.hs view
@@ -40,6 +40,7 @@ , rciInstanceIdentityDocument , rciInstanceIdentityDocumentSignature , rciTotalResources+ , rciVersionInfo -- * Response , RegisterContainerInstanceResponse@@ -49,6 +50,7 @@ , rcirContainerInstance ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types@@ -59,6 +61,7 @@ , _rciInstanceIdentityDocument :: Maybe Text , _rciInstanceIdentityDocumentSignature :: Maybe Text , _rciTotalResources :: List "totalResources" Resource+ , _rciVersionInfo :: Maybe VersionInfo } deriving (Eq, Read, Show) -- | 'RegisterContainerInstance' constructor.@@ -73,12 +76,15 @@ -- -- * 'rciTotalResources' @::@ ['Resource'] --+-- * 'rciVersionInfo' @::@ 'Maybe' 'VersionInfo'+-- registerContainerInstance :: RegisterContainerInstance registerContainerInstance = RegisterContainerInstance { _rciCluster = Nothing , _rciInstanceIdentityDocument = Nothing , _rciInstanceIdentityDocumentSignature = Nothing , _rciTotalResources = mempty+ , _rciVersionInfo = Nothing } -- | The short name or full Amazon Resource Name (ARN) of the cluster that you@@ -102,6 +108,9 @@ lens _rciTotalResources (\s a -> s { _rciTotalResources = a }) . _List +rciVersionInfo :: Lens' RegisterContainerInstance (Maybe VersionInfo)+rciVersionInfo = lens _rciVersionInfo (\s a -> s { _rciVersionInfo = a })+ newtype RegisterContainerInstanceResponse = RegisterContainerInstanceResponse { _rcirContainerInstance :: Maybe ContainerInstance } deriving (Eq, Read, Show)@@ -135,6 +144,7 @@ , "instanceIdentityDocument" .= _rciInstanceIdentityDocument , "instanceIdentityDocumentSignature" .= _rciInstanceIdentityDocumentSignature , "totalResources" .= _rciTotalResources+ , "versionInfo" .= _rciVersionInfo ] instance AWSRequest RegisterContainerInstance where
gen/Network/AWS/ECS/RegisterTaskDefinition.hs view
@@ -46,6 +46,7 @@ , rtdrTaskDefinition ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types@@ -84,7 +85,8 @@ -- | You must specify a 'family' for a task definition, which allows you to track -- multiple versions of the same task definition. You can think of the 'family' as--- a name for your task definition.+-- a name for your task definition. Up to 255 letters (uppercase and lowercase),+-- numbers, hyphens, and underscores are allowed. rtdFamily :: Lens' RegisterTaskDefinition Text rtdFamily = lens _rtdFamily (\s a -> s { _rtdFamily = a })
gen/Network/AWS/ECS/RunTask.hs view
@@ -26,6 +26,10 @@ -- you want to use your own scheduler or place a task on a specific container -- instance, use 'StartTask' instead. --+-- The 'count' parameter is limited to 10 tasks per call.+--+--+-- -- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html> module Network.AWS.ECS.RunTask (@@ -37,6 +41,7 @@ , rtCluster , rtCount , rtOverrides+ , rtStartedBy , rtTaskDefinition -- * Response@@ -48,6 +53,7 @@ , rtrTasks ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types@@ -57,6 +63,7 @@ { _rtCluster :: Maybe Text , _rtCount :: Maybe Int , _rtOverrides :: Maybe TaskOverride+ , _rtStartedBy :: Maybe Text , _rtTaskDefinition :: Text } deriving (Eq, Read, Show) @@ -70,6 +77,8 @@ -- -- * 'rtOverrides' @::@ 'Maybe' 'TaskOverride' --+-- * 'rtStartedBy' @::@ 'Maybe' 'Text'+-- -- * 'rtTaskDefinition' @::@ 'Text' -- runTask :: Text -- ^ 'rtTaskDefinition'@@ -79,6 +88,7 @@ , _rtCluster = Nothing , _rtOverrides = Nothing , _rtCount = Nothing+ , _rtStartedBy = Nothing } -- | The short name or full Amazon Resource Name (ARN) of the cluster that you@@ -87,14 +97,33 @@ rtCluster :: Lens' RunTask (Maybe Text) rtCluster = lens _rtCluster (\s a -> s { _rtCluster = a }) --- | The number of instances of the specified task that you would like to place on--- your cluster.+-- | The number of instantiations of the specified task that you would like to+-- place on your cluster.+--+-- The 'count' parameter is limited to 10 tasks per call.+--+-- rtCount :: Lens' RunTask (Maybe Int) rtCount = lens _rtCount (\s a -> s { _rtCount = a }) +-- | A list of container overrides in JSON format that specify the name of a+-- container in the specified task definition and the command it should run+-- instead of its default. A total of 8192 characters are allowed for overrides.+-- This limit includes the JSON formatting characters of the override structure. rtOverrides :: Lens' RunTask (Maybe TaskOverride) rtOverrides = lens _rtOverrides (\s a -> s { _rtOverrides = a }) +-- | An optional tag specified when a task is started. For example if you+-- automatically trigger a task to run a batch process job, you could apply a+-- unique identifier for that job to your task with the 'startedBy' parameter. You+-- can then identify which tasks belong to that job by filtering the results of+-- a 'ListTasks' call with the 'startedBy' value.+--+-- If a task is started by an Amazon ECS service, then the 'startedBy' parameter+-- contains the deployment ID of the service that starts it.+rtStartedBy :: Lens' RunTask (Maybe Text)+rtStartedBy = lens _rtStartedBy (\s a -> s { _rtStartedBy = a })+ -- | The 'family' and 'revision' ('family:revision') or full Amazon Resource Name (ARN) -- of the task definition that you want to run. rtTaskDefinition :: Lens' RunTask Text@@ -142,6 +171,7 @@ , "taskDefinition" .= _rtTaskDefinition , "overrides" .= _rtOverrides , "count" .= _rtCount+ , "startedBy" .= _rtStartedBy ] instance AWSRequest RunTask where
gen/Network/AWS/ECS/StartTask.hs view
@@ -26,6 +26,10 @@ -- container instance or instances. If you want to use the default Amazon ECS -- scheduler to place your task, use 'RunTask' instead. --+-- The list of container instances to start tasks on is limited to 10.+--+--+-- -- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_StartTask.html> module Network.AWS.ECS.StartTask (@@ -37,6 +41,7 @@ , st1Cluster , st1ContainerInstances , st1Overrides+ , st1StartedBy , st1TaskDefinition -- * Response@@ -48,6 +53,7 @@ , strTasks ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types@@ -57,6 +63,7 @@ { _st1Cluster :: Maybe Text , _st1ContainerInstances :: List "containerInstances" Text , _st1Overrides :: Maybe TaskOverride+ , _st1StartedBy :: Maybe Text , _st1TaskDefinition :: Text } deriving (Eq, Read, Show) @@ -70,6 +77,8 @@ -- -- * 'st1Overrides' @::@ 'Maybe' 'TaskOverride' --+-- * 'st1StartedBy' @::@ 'Maybe' 'Text'+-- -- * 'st1TaskDefinition' @::@ 'Text' -- startTask :: Text -- ^ 'st1TaskDefinition'@@ -79,6 +88,7 @@ , _st1Cluster = Nothing , _st1Overrides = Nothing , _st1ContainerInstances = mempty+ , _st1StartedBy = Nothing } -- | The short name or full Amazon Resource Name (ARN) of the cluster that you@@ -89,14 +99,33 @@ -- | The container instance UUIDs or full Amazon Resource Name (ARN) entries for -- the container instances on which you would like to place your task.+--+-- The list of container instances to start tasks on is limited to 10.+--+-- st1ContainerInstances :: Lens' StartTask [Text] st1ContainerInstances = lens _st1ContainerInstances (\s a -> s { _st1ContainerInstances = a }) . _List +-- | A list of container overrides in JSON format that specify the name of a+-- container in the specified task definition and the command it should run+-- instead of its default. A total of 8192 characters are allowed for overrides.+-- This limit includes the JSON formatting characters of the override structure. st1Overrides :: Lens' StartTask (Maybe TaskOverride) st1Overrides = lens _st1Overrides (\s a -> s { _st1Overrides = a }) +-- | An optional tag specified when a task is started. For example if you+-- automatically trigger a task to run a batch process job, you could apply a+-- unique identifier for that job to your task with the 'startedBy' parameter. You+-- can then identify which tasks belong to that job by filtering the results of+-- a 'ListTasks' call with the 'startedBy' value.+--+-- If a task is started by an Amazon ECS service, then the 'startedBy' parameter+-- contains the deployment ID of the service that starts it.+st1StartedBy :: Lens' StartTask (Maybe Text)+st1StartedBy = lens _st1StartedBy (\s a -> s { _st1StartedBy = a })+ -- | The 'family' and 'revision' ('family:revision') or full Amazon Resource Name (ARN) -- of the task definition that you want to start. st1TaskDefinition :: Lens' StartTask Text@@ -145,6 +174,7 @@ , "taskDefinition" .= _st1TaskDefinition , "overrides" .= _st1Overrides , "containerInstances" .= _st1ContainerInstances+ , "startedBy" .= _st1StartedBy ] instance AWSRequest StartTask where
gen/Network/AWS/ECS/StopTask.hs view
@@ -43,6 +43,7 @@ , strTask ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/SubmitContainerStateChange.hs view
@@ -51,6 +51,7 @@ , scscrAcknowledgment ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/SubmitTaskStateChange.hs view
@@ -48,6 +48,7 @@ , stscrAcknowledgment ) where +import Network.AWS.Data (Object) import Network.AWS.Prelude import Network.AWS.Request.JSON import Network.AWS.ECS.Types
gen/Network/AWS/ECS/Types.hs view
@@ -37,11 +37,30 @@ , nbContainerPort , nbHostPort + -- * ContainerService+ , ContainerService+ , containerService+ , csClusterArn+ , csDeployments+ , csDesiredCount+ , csEvents+ , csLoadBalancers+ , csPendingCount+ , csRoleArn+ , csRunningCount+ , csServiceArn+ , csServiceName+ , csStatus+ , csTaskDefinition+ -- * Cluster , Cluster , cluster , cClusterArn , cClusterName+ , cPendingTasksCount+ , cRegisteredContainerInstancesCount+ , cRunningTasksCount , cStatus -- * Volume@@ -78,6 +97,13 @@ , hostVolumeProperties , hvpSourcePath + -- * VersionInfo+ , VersionInfo+ , versionInfo+ , viAgentHash+ , viAgentVersion+ , viDockerVersion+ -- * Container , Container , container@@ -89,6 +115,13 @@ , cReason , cTaskArn + -- * LoadBalancer+ , LoadBalancer+ , loadBalancer+ , lbContainerName+ , lbContainerPort+ , lbLoadBalancerName+ -- * ContainerDefinition , ContainerDefinition , containerDefinition@@ -124,6 +157,7 @@ , tDesiredStatus , tLastStatus , tOverrides+ , tStartedBy , tTaskArn , tTaskDefinitionArn @@ -154,10 +188,31 @@ , ciAgentConnected , ciContainerInstanceArn , ciEc2InstanceId+ , ciPendingTasksCount , ciRegisteredResources , ciRemainingResources+ , ciRunningTasksCount , ciStatus + -- * ServiceEvent+ , ServiceEvent+ , serviceEvent+ , seCreatedAt+ , seId+ , seMessage++ -- * Deployment+ , Deployment+ , deployment+ , dCreatedAt+ , dDesiredCount+ , dId+ , dPendingCount+ , dRunningCount+ , dStatus+ , dTaskDefinition+ , dUpdatedAt+ -- * MountPoint , MountPoint , mountPoint@@ -259,10 +314,161 @@ , "hostPort" .= _nbHostPort ] +data ContainerService = ContainerService+ { _csClusterArn :: Maybe Text+ , _csDeployments :: List "deployments" Deployment+ , _csDesiredCount :: Maybe Int+ , _csEvents :: List "events" ServiceEvent+ , _csLoadBalancers :: List "loadBalancers" LoadBalancer+ , _csPendingCount :: Maybe Int+ , _csRoleArn :: Maybe Text+ , _csRunningCount :: Maybe Int+ , _csServiceArn :: Maybe Text+ , _csServiceName :: Maybe Text+ , _csStatus :: Maybe Text+ , _csTaskDefinition :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'ContainerService' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'csClusterArn' @::@ 'Maybe' 'Text'+--+-- * 'csDeployments' @::@ ['Deployment']+--+-- * 'csDesiredCount' @::@ 'Maybe' 'Int'+--+-- * 'csEvents' @::@ ['ServiceEvent']+--+-- * 'csLoadBalancers' @::@ ['LoadBalancer']+--+-- * 'csPendingCount' @::@ 'Maybe' 'Int'+--+-- * 'csRoleArn' @::@ 'Maybe' 'Text'+--+-- * 'csRunningCount' @::@ 'Maybe' 'Int'+--+-- * 'csServiceArn' @::@ 'Maybe' 'Text'+--+-- * 'csServiceName' @::@ 'Maybe' 'Text'+--+-- * 'csStatus' @::@ 'Maybe' 'Text'+--+-- * 'csTaskDefinition' @::@ 'Maybe' 'Text'+--+containerService :: ContainerService+containerService = ContainerService+ { _csServiceArn = Nothing+ , _csServiceName = Nothing+ , _csClusterArn = Nothing+ , _csLoadBalancers = mempty+ , _csStatus = Nothing+ , _csDesiredCount = Nothing+ , _csRunningCount = Nothing+ , _csPendingCount = Nothing+ , _csTaskDefinition = Nothing+ , _csDeployments = mempty+ , _csRoleArn = Nothing+ , _csEvents = mempty+ }++-- | The Amazon Resource Name (ARN) of the of the cluster that hosts the service.+csClusterArn :: Lens' ContainerService (Maybe Text)+csClusterArn = lens _csClusterArn (\s a -> s { _csClusterArn = a })++-- | The current state of deployments for the service.+csDeployments :: Lens' ContainerService [Deployment]+csDeployments = lens _csDeployments (\s a -> s { _csDeployments = a }) . _List++-- | 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'.+csDesiredCount :: Lens' ContainerService (Maybe Int)+csDesiredCount = lens _csDesiredCount (\s a -> s { _csDesiredCount = a })++-- | The event stream for your service. A maximum of 100 of the latest events are+-- displayed.+csEvents :: Lens' ContainerService [ServiceEvent]+csEvents = lens _csEvents (\s a -> s { _csEvents = a }) . _List++-- | A list of 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.+csLoadBalancers :: Lens' ContainerService [LoadBalancer]+csLoadBalancers = lens _csLoadBalancers (\s a -> s { _csLoadBalancers = a }) . _List++-- | The number of tasks in the cluster that are in the 'PENDING' state.+csPendingCount :: Lens' ContainerService (Maybe Int)+csPendingCount = lens _csPendingCount (\s a -> s { _csPendingCount = a })++-- | The Amazon Resource Name (ARN) of the IAM role associated with the service+-- that allows the Amazon ECS container agent to register container instances+-- with a load balancer.+csRoleArn :: Lens' ContainerService (Maybe Text)+csRoleArn = lens _csRoleArn (\s a -> s { _csRoleArn = a })++-- | The number of tasks in the cluster that are in the 'RUNNING' state.+csRunningCount :: Lens' ContainerService (Maybe Int)+csRunningCount = lens _csRunningCount (\s a -> s { _csRunningCount = a })++-- | The Amazon Resource Name (ARN) that identifies the service. The ARN contains+-- the 'arn:aws:ecs' namespace, followed by the region of the service, the AWS+-- account ID of the service owner, the 'service' namespace, and then the service+-- name. For example, arn:aws:ecs:/region/:/012345678910/:service//my-service/.+csServiceArn :: Lens' ContainerService (Maybe Text)+csServiceArn = lens _csServiceArn (\s a -> s { _csServiceArn = a })++-- | A user-generated string that you can use to identify your service.+csServiceName :: Lens' ContainerService (Maybe Text)+csServiceName = lens _csServiceName (\s a -> s { _csServiceName = a })++-- | The status of the service. The valid values are 'ACTIVE', 'DRAINING', or 'INACTIVE'.+csStatus :: Lens' ContainerService (Maybe Text)+csStatus = lens _csStatus (\s a -> s { _csStatus = a })++-- | 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'.+csTaskDefinition :: Lens' ContainerService (Maybe Text)+csTaskDefinition = lens _csTaskDefinition (\s a -> s { _csTaskDefinition = a })++instance FromJSON ContainerService where+ parseJSON = withObject "ContainerService" $ \o -> ContainerService+ <$> o .:? "clusterArn"+ <*> o .:? "deployments" .!= mempty+ <*> o .:? "desiredCount"+ <*> o .:? "events" .!= mempty+ <*> o .:? "loadBalancers" .!= mempty+ <*> o .:? "pendingCount"+ <*> o .:? "roleArn"+ <*> o .:? "runningCount"+ <*> o .:? "serviceArn"+ <*> o .:? "serviceName"+ <*> o .:? "status"+ <*> o .:? "taskDefinition"++instance ToJSON ContainerService where+ toJSON ContainerService{..} = object+ [ "serviceArn" .= _csServiceArn+ , "serviceName" .= _csServiceName+ , "clusterArn" .= _csClusterArn+ , "loadBalancers" .= _csLoadBalancers+ , "status" .= _csStatus+ , "desiredCount" .= _csDesiredCount+ , "runningCount" .= _csRunningCount+ , "pendingCount" .= _csPendingCount+ , "taskDefinition" .= _csTaskDefinition+ , "deployments" .= _csDeployments+ , "roleArn" .= _csRoleArn+ , "events" .= _csEvents+ ]+ data Cluster = Cluster- { _cClusterArn :: Maybe Text- , _cClusterName :: Maybe Text- , _cStatus :: Maybe Text+ { _cClusterArn :: Maybe Text+ , _cClusterName :: Maybe Text+ , _cPendingTasksCount :: Maybe Int+ , _cRegisteredContainerInstancesCount :: Maybe Int+ , _cRunningTasksCount :: Maybe Int+ , _cStatus :: Maybe Text } deriving (Eq, Ord, Read, Show) -- | 'Cluster' constructor.@@ -273,13 +479,22 @@ -- -- * 'cClusterName' @::@ 'Maybe' 'Text' --+-- * 'cPendingTasksCount' @::@ 'Maybe' 'Int'+--+-- * 'cRegisteredContainerInstancesCount' @::@ 'Maybe' 'Int'+--+-- * 'cRunningTasksCount' @::@ 'Maybe' 'Int'+-- -- * 'cStatus' @::@ 'Maybe' 'Text' -- cluster :: Cluster cluster = Cluster- { _cClusterArn = Nothing- , _cClusterName = Nothing- , _cStatus = Nothing+ { _cClusterArn = Nothing+ , _cClusterName = Nothing+ , _cStatus = Nothing+ , _cRegisteredContainerInstancesCount = Nothing+ , _cRunningTasksCount = Nothing+ , _cPendingTasksCount = Nothing } -- | The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains@@ -293,6 +508,22 @@ cClusterName :: Lens' Cluster (Maybe Text) cClusterName = lens _cClusterName (\s a -> s { _cClusterName = a }) +-- | The number of tasks in the cluster that are in the 'PENDING' state.+cPendingTasksCount :: Lens' Cluster (Maybe Int)+cPendingTasksCount =+ lens _cPendingTasksCount (\s a -> s { _cPendingTasksCount = a })++-- | The number of container instances registered into the cluster.+cRegisteredContainerInstancesCount :: Lens' Cluster (Maybe Int)+cRegisteredContainerInstancesCount =+ lens _cRegisteredContainerInstancesCount+ (\s a -> s { _cRegisteredContainerInstancesCount = a })++-- | The number of tasks in the cluster that are in the 'RUNNING' state.+cRunningTasksCount :: Lens' Cluster (Maybe Int)+cRunningTasksCount =+ lens _cRunningTasksCount (\s a -> s { _cRunningTasksCount = a })+ -- | The status of the cluster. The valid values are 'ACTIVE' or 'INACTIVE'. 'ACTIVE' -- indicates that you can register container instances with the cluster and the -- associated instances can accept tasks.@@ -303,13 +534,19 @@ parseJSON = withObject "Cluster" $ \o -> Cluster <$> o .:? "clusterArn" <*> o .:? "clusterName"+ <*> o .:? "pendingTasksCount"+ <*> o .:? "registeredContainerInstancesCount"+ <*> o .:? "runningTasksCount" <*> o .:? "status" instance ToJSON Cluster where toJSON Cluster{..} = object- [ "clusterArn" .= _cClusterArn- , "clusterName" .= _cClusterName- , "status" .= _cStatus+ [ "clusterArn" .= _cClusterArn+ , "clusterName" .= _cClusterName+ , "status" .= _cStatus+ , "registeredContainerInstancesCount" .= _cRegisteredContainerInstancesCount+ , "runningTasksCount" .= _cRunningTasksCount+ , "pendingTasksCount" .= _cPendingTasksCount ] data Volume = Volume@@ -372,7 +609,8 @@ , _coCommand = mempty } --- | The command to send to the container that receives the override.+-- | The command to send to the container that overrides the default command from+-- the Docker image or the task definition. coCommand :: Lens' ContainerOverride [Text] coCommand = lens _coCommand (\s a -> s { _coCommand = a }) . _List @@ -491,7 +729,7 @@ { _toContainerOverrides = mempty } --- | One or more container overrides to send when running a task.+-- | One or more container overrides sent to a task. toContainerOverrides :: Lens' TaskOverride [ContainerOverride] toContainerOverrides = lens _toContainerOverrides (\s a -> s { _toContainerOverrides = a })@@ -536,6 +774,54 @@ [ "sourcePath" .= _hvpSourcePath ] +data VersionInfo = VersionInfo+ { _viAgentHash :: Maybe Text+ , _viAgentVersion :: Maybe Text+ , _viDockerVersion :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'VersionInfo' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'viAgentHash' @::@ 'Maybe' 'Text'+--+-- * 'viAgentVersion' @::@ 'Maybe' 'Text'+--+-- * 'viDockerVersion' @::@ 'Maybe' 'Text'+--+versionInfo :: VersionInfo+versionInfo = VersionInfo+ { _viAgentVersion = Nothing+ , _viAgentHash = Nothing+ , _viDockerVersion = Nothing+ }++-- | The Git commit hash for the Amazon ECS container agent build on the <https://github.com/aws/amazon-ecs-agent/commits/master amazon-ecs-agent > GitHub repository.+viAgentHash :: Lens' VersionInfo (Maybe Text)+viAgentHash = lens _viAgentHash (\s a -> s { _viAgentHash = a })++-- | The version number of the Amazon ECS container agent.+viAgentVersion :: Lens' VersionInfo (Maybe Text)+viAgentVersion = lens _viAgentVersion (\s a -> s { _viAgentVersion = a })++-- | The Docker version running on the container instance.+viDockerVersion :: Lens' VersionInfo (Maybe Text)+viDockerVersion = lens _viDockerVersion (\s a -> s { _viDockerVersion = a })++instance FromJSON VersionInfo where+ parseJSON = withObject "VersionInfo" $ \o -> VersionInfo+ <$> o .:? "agentHash"+ <*> o .:? "agentVersion"+ <*> o .:? "dockerVersion"++instance ToJSON VersionInfo where+ toJSON VersionInfo{..} = object+ [ "agentVersion" .= _viAgentVersion+ , "agentHash" .= _viAgentHash+ , "dockerVersion" .= _viDockerVersion+ ]+ data Container = Container { _cContainerArn :: Maybe Text , _cExitCode :: Maybe Int@@ -624,6 +910,55 @@ , "networkBindings" .= _cNetworkBindings ] +data LoadBalancer = LoadBalancer+ { _lbContainerName :: Maybe Text+ , _lbContainerPort :: Maybe Int+ , _lbLoadBalancerName :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'LoadBalancer' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lbContainerName' @::@ 'Maybe' 'Text'+--+-- * 'lbContainerPort' @::@ 'Maybe' 'Int'+--+-- * 'lbLoadBalancerName' @::@ 'Maybe' 'Text'+--+loadBalancer :: LoadBalancer+loadBalancer = LoadBalancer+ { _lbLoadBalancerName = Nothing+ , _lbContainerName = Nothing+ , _lbContainerPort = Nothing+ }++-- | The name of the container to associate with the load balancer.+lbContainerName :: Lens' LoadBalancer (Maybe Text)+lbContainerName = lens _lbContainerName (\s a -> s { _lbContainerName = a })++-- | The port on the container to associate with the load balancer.+lbContainerPort :: Lens' LoadBalancer (Maybe Int)+lbContainerPort = lens _lbContainerPort (\s a -> s { _lbContainerPort = a })++-- | The name of the load balancer.+lbLoadBalancerName :: Lens' LoadBalancer (Maybe Text)+lbLoadBalancerName =+ lens _lbLoadBalancerName (\s a -> s { _lbLoadBalancerName = a })++instance FromJSON LoadBalancer where+ parseJSON = withObject "LoadBalancer" $ \o -> LoadBalancer+ <$> o .:? "containerName"+ <*> o .:? "containerPort"+ <*> o .:? "loadBalancerName"++instance ToJSON LoadBalancer where+ toJSON LoadBalancer{..} = object+ [ "loadBalancerName" .= _lbLoadBalancerName+ , "containerName" .= _lbContainerName+ , "containerPort" .= _lbContainerPort+ ]+ data ContainerDefinition = ContainerDefinition { _cdCommand :: List "command" Text , _cdCpu :: Maybe Int@@ -867,6 +1202,7 @@ , _tDesiredStatus :: Maybe Text , _tLastStatus :: Maybe Text , _tOverrides :: Maybe TaskOverride+ , _tStartedBy :: Maybe Text , _tTaskArn :: Maybe Text , _tTaskDefinitionArn :: Maybe Text } deriving (Eq, Read, Show)@@ -887,6 +1223,8 @@ -- -- * 'tOverrides' @::@ 'Maybe' 'TaskOverride' --+-- * 'tStartedBy' @::@ 'Maybe' 'Text'+-- -- * 'tTaskArn' @::@ 'Maybe' 'Text' -- -- * 'tTaskDefinitionArn' @::@ 'Maybe' 'Text'@@ -901,6 +1239,7 @@ , _tLastStatus = Nothing , _tDesiredStatus = Nothing , _tContainers = mempty+ , _tStartedBy = Nothing } -- | The Amazon Resource Name (ARN) of the of the cluster that hosts the task.@@ -928,6 +1267,12 @@ tOverrides :: Lens' Task (Maybe TaskOverride) tOverrides = lens _tOverrides (\s a -> s { _tOverrides = a }) +-- | The tag specified when a task is started. If the task is started by an Amazon+-- ECS service, then the 'startedBy' parameter contains the deployment ID of the+-- service that starts it.+tStartedBy :: Lens' Task (Maybe Text)+tStartedBy = lens _tStartedBy (\s a -> s { _tStartedBy = a })+ -- | The Amazon Resource Name (ARN) of the task. tTaskArn :: Lens' Task (Maybe Text) tTaskArn = lens _tTaskArn (\s a -> s { _tTaskArn = a })@@ -946,6 +1291,7 @@ <*> o .:? "desiredStatus" <*> o .:? "lastStatus" <*> o .:? "overrides"+ <*> o .:? "startedBy" <*> o .:? "taskArn" <*> o .:? "taskDefinitionArn" @@ -959,6 +1305,7 @@ , "lastStatus" .= _tLastStatus , "desiredStatus" .= _tDesiredStatus , "containers" .= _tContainers+ , "startedBy" .= _tStartedBy ] data PortMapping = PortMapping@@ -1137,8 +1484,10 @@ { _ciAgentConnected :: Maybe Bool , _ciContainerInstanceArn :: Maybe Text , _ciEc2InstanceId :: Maybe Text+ , _ciPendingTasksCount :: Maybe Int , _ciRegisteredResources :: List "registeredResources" Resource , _ciRemainingResources :: List "remainingResources" Resource+ , _ciRunningTasksCount :: Maybe Int , _ciStatus :: Maybe Text } deriving (Eq, Read, Show) @@ -1152,10 +1501,14 @@ -- -- * 'ciEc2InstanceId' @::@ 'Maybe' 'Text' --+-- * 'ciPendingTasksCount' @::@ 'Maybe' 'Int'+-- -- * 'ciRegisteredResources' @::@ ['Resource'] -- -- * 'ciRemainingResources' @::@ ['Resource'] --+-- * 'ciRunningTasksCount' @::@ 'Maybe' 'Int'+-- -- * 'ciStatus' @::@ 'Maybe' 'Text' -- containerInstance :: ContainerInstance@@ -1166,6 +1519,8 @@ , _ciRegisteredResources = mempty , _ciStatus = Nothing , _ciAgentConnected = Nothing+ , _ciRunningTasksCount = Nothing+ , _ciPendingTasksCount = Nothing } -- | This parameter returns 'true' if the agent is actually connected to Amazon ECS.@@ -1187,6 +1542,11 @@ ciEc2InstanceId :: Lens' ContainerInstance (Maybe Text) ciEc2InstanceId = lens _ciEc2InstanceId (\s a -> s { _ciEc2InstanceId = a }) +-- | The number of tasks on the container instance that are in the 'PENDING' status.+ciPendingTasksCount :: Lens' ContainerInstance (Maybe Int)+ciPendingTasksCount =+ lens _ciPendingTasksCount (\s a -> s { _ciPendingTasksCount = a })+ -- | The registered resources on the container instance that are in use by current -- tasks. ciRegisteredResources :: Lens' ContainerInstance [Resource]@@ -1201,6 +1561,11 @@ lens _ciRemainingResources (\s a -> s { _ciRemainingResources = a }) . _List +-- | The number of tasks on the container instance that are in the 'RUNNING' status.+ciRunningTasksCount :: Lens' ContainerInstance (Maybe Int)+ciRunningTasksCount =+ lens _ciRunningTasksCount (\s a -> s { _ciRunningTasksCount = a })+ -- | The status of the container instance. The valid values are 'ACTIVE' or 'INACTIVE'. -- 'ACTIVE' indicates that the container instance can accept tasks. ciStatus :: Lens' ContainerInstance (Maybe Text)@@ -1211,8 +1576,10 @@ <$> o .:? "agentConnected" <*> o .:? "containerInstanceArn" <*> o .:? "ec2InstanceId"+ <*> o .:? "pendingTasksCount" <*> o .:? "registeredResources" .!= mempty <*> o .:? "remainingResources" .!= mempty+ <*> o .:? "runningTasksCount" <*> o .:? "status" instance ToJSON ContainerInstance where@@ -1223,6 +1590,158 @@ , "registeredResources" .= _ciRegisteredResources , "status" .= _ciStatus , "agentConnected" .= _ciAgentConnected+ , "runningTasksCount" .= _ciRunningTasksCount+ , "pendingTasksCount" .= _ciPendingTasksCount+ ]++data ServiceEvent = ServiceEvent+ { _seCreatedAt :: Maybe POSIX+ , _seId :: Maybe Text+ , _seMessage :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'ServiceEvent' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'seCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'seId' @::@ 'Maybe' 'Text'+--+-- * 'seMessage' @::@ 'Maybe' 'Text'+--+serviceEvent :: ServiceEvent+serviceEvent = ServiceEvent+ { _seId = Nothing+ , _seCreatedAt = Nothing+ , _seMessage = Nothing+ }++-- | The Unix time in seconds and milliseconds when the event was triggered.+seCreatedAt :: Lens' ServiceEvent (Maybe UTCTime)+seCreatedAt = lens _seCreatedAt (\s a -> s { _seCreatedAt = a }) . mapping _Time++-- | The ID string of the event.+seId :: Lens' ServiceEvent (Maybe Text)+seId = lens _seId (\s a -> s { _seId = a })++-- | The event message.+seMessage :: Lens' ServiceEvent (Maybe Text)+seMessage = lens _seMessage (\s a -> s { _seMessage = a })++instance FromJSON ServiceEvent where+ parseJSON = withObject "ServiceEvent" $ \o -> ServiceEvent+ <$> o .:? "createdAt"+ <*> o .:? "id"+ <*> o .:? "message"++instance ToJSON ServiceEvent where+ toJSON ServiceEvent{..} = object+ [ "id" .= _seId+ , "createdAt" .= _seCreatedAt+ , "message" .= _seMessage+ ]++data Deployment = Deployment+ { _dCreatedAt :: Maybe POSIX+ , _dDesiredCount :: Maybe Int+ , _dId :: Maybe Text+ , _dPendingCount :: Maybe Int+ , _dRunningCount :: Maybe Int+ , _dStatus :: Maybe Text+ , _dTaskDefinition :: Maybe Text+ , _dUpdatedAt :: Maybe POSIX+ } deriving (Eq, Ord, Read, Show)++-- | 'Deployment' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'dDesiredCount' @::@ 'Maybe' 'Int'+--+-- * 'dId' @::@ 'Maybe' 'Text'+--+-- * 'dPendingCount' @::@ 'Maybe' 'Int'+--+-- * 'dRunningCount' @::@ 'Maybe' 'Int'+--+-- * 'dStatus' @::@ 'Maybe' 'Text'+--+-- * 'dTaskDefinition' @::@ 'Maybe' 'Text'+--+-- * 'dUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+deployment :: Deployment+deployment = Deployment+ { _dId = Nothing+ , _dStatus = Nothing+ , _dTaskDefinition = Nothing+ , _dDesiredCount = Nothing+ , _dPendingCount = Nothing+ , _dRunningCount = Nothing+ , _dCreatedAt = Nothing+ , _dUpdatedAt = Nothing+ }++-- | The Unix time in seconds and milliseconds when the service was created.+dCreatedAt :: Lens' Deployment (Maybe UTCTime)+dCreatedAt = lens _dCreatedAt (\s a -> s { _dCreatedAt = a }) . mapping _Time++-- | The most recent desired count of tasks that was specified for the service to+-- deploy and/or maintain.+dDesiredCount :: Lens' Deployment (Maybe Int)+dDesiredCount = lens _dDesiredCount (\s a -> s { _dDesiredCount = a })++-- | The ID of the deployment.+dId :: Lens' Deployment (Maybe Text)+dId = lens _dId (\s a -> s { _dId = a })++-- | The number of tasks in the deployment that are in the 'PENDING' status.+dPendingCount :: Lens' Deployment (Maybe Int)+dPendingCount = lens _dPendingCount (\s a -> s { _dPendingCount = a })++-- | The number of tasks in the deployment that are in the 'RUNNING' status.+dRunningCount :: Lens' Deployment (Maybe Int)+dRunningCount = lens _dRunningCount (\s a -> s { _dRunningCount = a })++-- | The status of the deployment. Valid values are 'PRIMARY' (for the most recent+-- deployment), 'ACTIVE' (for previous deployments that still have tasks running,+-- but are being replaced with the 'PRIMARY' deployment), and 'INACTIVE' (for+-- deployments that have been completely replaced).+dStatus :: Lens' Deployment (Maybe Text)+dStatus = lens _dStatus (\s a -> s { _dStatus = a })++-- | The most recent task definition that was specified for the service to use.+dTaskDefinition :: Lens' Deployment (Maybe Text)+dTaskDefinition = lens _dTaskDefinition (\s a -> s { _dTaskDefinition = a })++-- | The Unix time in seconds and milliseconds when the service was last updated.+dUpdatedAt :: Lens' Deployment (Maybe UTCTime)+dUpdatedAt = lens _dUpdatedAt (\s a -> s { _dUpdatedAt = a }) . mapping _Time++instance FromJSON Deployment where+ parseJSON = withObject "Deployment" $ \o -> Deployment+ <$> o .:? "createdAt"+ <*> o .:? "desiredCount"+ <*> o .:? "id"+ <*> o .:? "pendingCount"+ <*> o .:? "runningCount"+ <*> o .:? "status"+ <*> o .:? "taskDefinition"+ <*> o .:? "updatedAt"++instance ToJSON Deployment where+ toJSON Deployment{..} = object+ [ "id" .= _dId+ , "status" .= _dStatus+ , "taskDefinition" .= _dTaskDefinition+ , "desiredCount" .= _dDesiredCount+ , "pendingCount" .= _dPendingCount+ , "runningCount" .= _dRunningCount+ , "createdAt" .= _dCreatedAt+ , "updatedAt" .= _dUpdatedAt ] data MountPoint = MountPoint
+ gen/Network/AWS/ECS/UpdateService.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.ECS.UpdateService+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Modify the desired count or task definition used in a service.+--+-- You can add to or subtract from the number of instantiations of a task+-- definition in a service by specifying the cluster that the service is running+-- in and a new 'desiredCount' parameter.+--+-- You can use 'UpdateService' to modify your task definition and deploy a new+-- version of your service, one task at a time. If you modify the task+-- definition with 'UpdateService', Amazon ECS spawns a task with the new version+-- of the task definition and then stops an old task after the new version is+-- running. Because 'UpdateService' starts a new version of the task before+-- stopping an old version, your cluster must have capacity to support one more+-- instantiation of the task when 'UpdateService' is run. If your cluster cannot+-- support another instantiation of the task used in your service, you can+-- reduce the desired count of your service by one before modifying the task+-- definition.+--+-- <http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html>+module Network.AWS.ECS.UpdateService+ (+ -- * Request+ UpdateService+ -- ** Request constructor+ , updateService+ -- ** Request lenses+ , usCluster+ , usDesiredCount+ , usService+ , usTaskDefinition++ -- * Response+ , UpdateServiceResponse+ -- ** Response constructor+ , updateServiceResponse+ -- ** Response lenses+ , usrService+ ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.ECS.Types+import qualified GHC.Exts++data UpdateService = UpdateService+ { _usCluster :: Maybe Text+ , _usDesiredCount :: Maybe Int+ , _usService :: Text+ , _usTaskDefinition :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'UpdateService' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'usCluster' @::@ 'Maybe' 'Text'+--+-- * 'usDesiredCount' @::@ 'Maybe' 'Int'+--+-- * 'usService' @::@ 'Text'+--+-- * 'usTaskDefinition' @::@ 'Maybe' 'Text'+--+updateService :: Text -- ^ 'usService'+ -> UpdateService+updateService p1 = UpdateService+ { _usService = p1+ , _usCluster = Nothing+ , _usDesiredCount = Nothing+ , _usTaskDefinition = Nothing+ }++-- | The short name or full Amazon Resource Name (ARN) of the cluster that your+-- service is running on. If you do not specify a cluster, the default cluster+-- is assumed.+usCluster :: Lens' UpdateService (Maybe Text)+usCluster = lens _usCluster (\s a -> s { _usCluster = a })++-- | The number of instantiations of the task that you would like to place and+-- keep running in your service.+usDesiredCount :: Lens' UpdateService (Maybe Int)+usDesiredCount = lens _usDesiredCount (\s a -> s { _usDesiredCount = a })++-- | The name of the service that you want to update.+usService :: Lens' UpdateService Text+usService = lens _usService (\s a -> s { _usService = a })++-- | The 'family' and 'revision' ('family:revision') or full Amazon Resource Name (ARN)+-- of the task definition that you want to run in your service. If you modify+-- the task definition with 'UpdateService', Amazon ECS spawns a task with the new+-- version of the task definition and then stops an old task after the new+-- version is running.+usTaskDefinition :: Lens' UpdateService (Maybe Text)+usTaskDefinition = lens _usTaskDefinition (\s a -> s { _usTaskDefinition = a })++newtype UpdateServiceResponse = UpdateServiceResponse+ { _usrService :: Maybe ContainerService+ } deriving (Eq, Read, Show)++-- | 'UpdateServiceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'usrService' @::@ 'Maybe' 'ContainerService'+--+updateServiceResponse :: UpdateServiceResponse+updateServiceResponse = UpdateServiceResponse+ { _usrService = Nothing+ }++-- | The full description of your service following the update call.+usrService :: Lens' UpdateServiceResponse (Maybe ContainerService)+usrService = lens _usrService (\s a -> s { _usrService = a })++instance ToPath UpdateService where+ toPath = const "/"++instance ToQuery UpdateService where+ toQuery = const mempty++instance ToHeaders UpdateService++instance ToJSON UpdateService where+ toJSON UpdateService{..} = object+ [ "cluster" .= _usCluster+ , "service" .= _usService+ , "desiredCount" .= _usDesiredCount+ , "taskDefinition" .= _usTaskDefinition+ ]++instance AWSRequest UpdateService where+ type Sv UpdateService = ECS+ type Rs UpdateService = UpdateServiceResponse++ request = post "UpdateService"+ response = jsonResponse++instance FromJSON UpdateServiceResponse where+ parseJSON = withObject "UpdateServiceResponse" $ \o -> UpdateServiceResponse+ <$> o .:? "service"