packages feed

amazonka-emr 0.0.7 → 0.0.8

raw patch · 5 files changed

+106/−36 lines, 5 filesdep ~amazonka-corePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: amazonka-core

API changes (from Hackage documentation)

+ Network.AWS.EMR.Waiters: clusterRunning :: Wait DescribeCluster
- Network.AWS.EMR.DescribeCluster: dcrCluster :: Lens' DescribeClusterResponse (Maybe Cluster)
+ Network.AWS.EMR.DescribeCluster: dcrCluster :: Lens' DescribeClusterResponse Cluster
- Network.AWS.EMR.DescribeCluster: describeClusterResponse :: DescribeClusterResponse
+ Network.AWS.EMR.DescribeCluster: describeClusterResponse :: Cluster -> DescribeClusterResponse
- Network.AWS.EMR.Types: c1Id :: Lens' Cluster (Maybe Text)
+ Network.AWS.EMR.Types: c1Id :: Lens' Cluster Text
- Network.AWS.EMR.Types: c1Name :: Lens' Cluster (Maybe Text)
+ Network.AWS.EMR.Types: c1Name :: Lens' Cluster Text
- Network.AWS.EMR.Types: c1Status :: Lens' Cluster (Maybe ClusterStatus)
+ Network.AWS.EMR.Types: c1Status :: Lens' Cluster ClusterStatus
- Network.AWS.EMR.Types: cluster :: Cluster
+ Network.AWS.EMR.Types: cluster :: Text -> Text -> ClusterStatus -> Cluster

Files

amazonka-emr.cabal view
@@ -1,5 +1,5 @@ name:                  amazonka-emr-version:               0.0.7+version:               0.0.8 synopsis:              Amazon Elastic MapReduce SDK. homepage:              https://github.com/brendanhay/amazonka license:               OtherLicense@@ -55,9 +55,10 @@         , Network.AWS.EMR.SetVisibleToAllUsers         , Network.AWS.EMR.TerminateJobFlows         , Network.AWS.EMR.Types+        , Network.AWS.EMR.Waiters      other-modules:      build-depends:-          amazonka-core == 0.0.7.*+          amazonka-core == 0.0.8.*         , base          >= 4.7     && < 5
gen/Network/AWS/EMR.hs view
@@ -34,6 +34,7 @@     , module Network.AWS.EMR.SetVisibleToAllUsers     , module Network.AWS.EMR.TerminateJobFlows     , module Network.AWS.EMR.Types+    , module Network.AWS.EMR.Waiters     ) where  import Network.AWS.EMR.AddInstanceGroups@@ -54,3 +55,4 @@ import Network.AWS.EMR.SetVisibleToAllUsers import Network.AWS.EMR.TerminateJobFlows import Network.AWS.EMR.Types+import Network.AWS.EMR.Waiters
gen/Network/AWS/EMR/DescribeCluster.hs view
@@ -70,22 +70,23 @@ dcClusterId = lens _dcClusterId (\s a -> s { _dcClusterId = a })  newtype DescribeClusterResponse = DescribeClusterResponse-    { _dcrCluster :: Maybe Cluster+    { _dcrCluster :: Cluster     } deriving (Eq, Show)  -- | 'DescribeClusterResponse' constructor. -- -- The fields accessible through corresponding lenses are: ----- * 'dcrCluster' @::@ 'Maybe' 'Cluster'+-- * 'dcrCluster' @::@ 'Cluster' ---describeClusterResponse :: DescribeClusterResponse-describeClusterResponse = DescribeClusterResponse-    { _dcrCluster = Nothing+describeClusterResponse :: Cluster -- ^ 'dcrCluster'+                        -> DescribeClusterResponse+describeClusterResponse p1 = DescribeClusterResponse+    { _dcrCluster = p1     }  -- | This output contains the details for the requested cluster.-dcrCluster :: Lens' DescribeClusterResponse (Maybe Cluster)+dcrCluster :: Lens' DescribeClusterResponse Cluster dcrCluster = lens _dcrCluster (\s a -> s { _dcrCluster = a })  instance ToPath DescribeCluster where@@ -110,4 +111,4 @@  instance FromJSON DescribeClusterResponse where     parseJSON = withObject "DescribeClusterResponse" $ \o -> DescribeClusterResponse-        <$> o .:? "Cluster"+        <$> o .:  "Cluster"
gen/Network/AWS/EMR/Types.hs view
@@ -7,6 +7,7 @@ {-# LANGUAGE OverloadedStrings           #-} {-# LANGUAGE RecordWildCards             #-} {-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE ViewPatterns                #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-} @@ -409,8 +410,6 @@     , sbacPath     ) where -import Data.Char (isUpper)-import Network.AWS.Error import Network.AWS.Prelude import Network.AWS.Signing import qualified GHC.Exts@@ -422,16 +421,41 @@     type Sg EMR = V4     type Er EMR = JSONError -    service = Service-        { _svcAbbrev       = "EMR"-        , _svcPrefix       = "elasticmapreduce"-        , _svcVersion      = "2009-03-31"-        , _svcTargetPrefix = Just "ElasticMapReduce"-        , _svcJSONVersion  = Just "1.1"-        }+    service = service'+      where+        service' :: Service EMR+        service' = Service+            { _svcAbbrev       = "EMR"+            , _svcPrefix       = "elasticmapreduce"+            , _svcVersion      = "2009-03-31"+            , _svcTargetPrefix = Just "ElasticMapReduce"+            , _svcJSONVersion  = Just "1.1"+            , _svcHandle       = handle+            , _svcRetry        = retry+            } -    handle = jsonError statusSuccess+        handle :: Status+               -> Maybe (LazyByteString -> ServiceError JSONError)+        handle = jsonError statusSuccess service' +        retry :: Retry EMR+        retry = Exponential+            { _retryBase     = 0.05+            , _retryGrowth   = 2+            , _retryAttempts = 5+            , _retryCheck    = check+            }++        check :: Status+              -> JSONError+              -> Bool+        check (statusCode -> s) (awsErrorCode -> e)+            | s == 400 && "ThrottlingException" == e = True -- Throttling+            | s == 500  = True -- General Server Error+            | s == 509  = True -- Limit Exceeded+            | s == 503  = True -- Service Unavailable+            | otherwise = False+ data MarketType     = OnDemand -- ^ ON_DEMAND     | Spot     -- ^ SPOT@@ -1222,13 +1246,13 @@     { _c1Applications          :: List "Applications" Application     , _c1AutoTerminate         :: Maybe Bool     , _c1Ec2InstanceAttributes :: Maybe Ec2InstanceAttributes-    , _c1Id                    :: Maybe Text+    , _c1Id                    :: Text     , _c1LogUri                :: Maybe Text-    , _c1Name                  :: Maybe Text+    , _c1Name                  :: Text     , _c1RequestedAmiVersion   :: Maybe Text     , _c1RunningAmiVersion     :: Maybe Text     , _c1ServiceRole           :: Maybe Text-    , _c1Status                :: Maybe ClusterStatus+    , _c1Status                :: ClusterStatus     , _c1Tags                  :: List "Tags" Tag     , _c1TerminationProtected  :: Maybe Bool     , _c1VisibleToAllUsers     :: Maybe Bool@@ -1244,11 +1268,11 @@ -- -- * 'c1Ec2InstanceAttributes' @::@ 'Maybe' 'Ec2InstanceAttributes' ----- * 'c1Id' @::@ 'Maybe' 'Text'+-- * 'c1Id' @::@ 'Text' -- -- * 'c1LogUri' @::@ 'Maybe' 'Text' ----- * 'c1Name' @::@ 'Maybe' 'Text'+-- * 'c1Name' @::@ 'Text' -- -- * 'c1RequestedAmiVersion' @::@ 'Maybe' 'Text' --@@ -1256,7 +1280,7 @@ -- -- * 'c1ServiceRole' @::@ 'Maybe' 'Text' ----- * 'c1Status' @::@ 'Maybe' 'ClusterStatus'+-- * 'c1Status' @::@ 'ClusterStatus' -- -- * 'c1Tags' @::@ ['Tag'] --@@ -1264,11 +1288,14 @@ -- -- * 'c1VisibleToAllUsers' @::@ 'Maybe' 'Bool' ---cluster :: Cluster-cluster = Cluster-    { _c1Id                    = Nothing-    , _c1Name                  = Nothing-    , _c1Status                = Nothing+cluster :: Text -- ^ 'c1Id'+        -> Text -- ^ 'c1Name'+        -> ClusterStatus -- ^ 'c1Status'+        -> Cluster+cluster p1 p2 p3 = Cluster+    { _c1Id                    = p1+    , _c1Name                  = p2+    , _c1Status                = p3     , _c1Ec2InstanceAttributes = Nothing     , _c1LogUri                = Nothing     , _c1RequestedAmiVersion   = Nothing@@ -1294,7 +1321,7 @@     lens _c1Ec2InstanceAttributes (\s a -> s { _c1Ec2InstanceAttributes = a })  -- | The unique identifier for the cluster.-c1Id :: Lens' Cluster (Maybe Text)+c1Id :: Lens' Cluster Text c1Id = lens _c1Id (\s a -> s { _c1Id = a })  -- | The path to the Amazon S3 location where logs for this cluster are stored.@@ -1302,7 +1329,7 @@ c1LogUri = lens _c1LogUri (\s a -> s { _c1LogUri = a })  -- | The name of the cluster.-c1Name :: Lens' Cluster (Maybe Text)+c1Name :: Lens' Cluster Text c1Name = lens _c1Name (\s a -> s { _c1Name = a })  -- | The AMI version requested for this cluster.@@ -1322,7 +1349,7 @@ c1ServiceRole = lens _c1ServiceRole (\s a -> s { _c1ServiceRole = a })  -- | The current status details about the cluster.-c1Status :: Lens' Cluster (Maybe ClusterStatus)+c1Status :: Lens' Cluster ClusterStatus c1Status = lens _c1Status (\s a -> s { _c1Status = a })  -- | A list of tags associated with a cluster.@@ -1351,13 +1378,13 @@         <$> o .:? "Applications" .!= mempty         <*> o .:? "AutoTerminate"         <*> o .:? "Ec2InstanceAttributes"-        <*> o .:? "Id"+        <*> o .:  "Id"         <*> o .:? "LogUri"-        <*> o .:? "Name"+        <*> o .:  "Name"         <*> o .:? "RequestedAmiVersion"         <*> o .:? "RunningAmiVersion"         <*> o .:? "ServiceRole"-        <*> o .:? "Status"+        <*> o .:  "Status"         <*> o .:? "Tags" .!= mempty         <*> o .:? "TerminationProtected"         <*> o .:? "VisibleToAllUsers"
+ gen/Network/AWS/EMR/Waiters.hs view
@@ -0,0 +1,39 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies      #-}++-- Module      : Network.AWS.EMR.Waiters+-- 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.++module Network.AWS.EMR.Waiters where++import Network.AWS.EMR.DescribeCluster+import Network.AWS.EMR.Types+import Network.AWS.Waiters++clusterRunning :: Wait DescribeCluster+clusterRunning = Wait+    { _waitName      = "ClusterRunning"+    , _waitAttempts  = 60+    , _waitDelay     = 30+    , _waitAcceptors =+        [ matchAll CSRunning AcceptSuccess+            (dcrCluster . c1Status . csState . _Just)+        , matchAll CSWaiting AcceptSuccess+            (dcrCluster . c1Status . csState . _Just)+        , matchAll CSTerminating AcceptFailure+            (dcrCluster . c1Status . csState . _Just)+        , matchAll CSTerminated AcceptFailure+            (dcrCluster . c1Status . csState . _Just)+        , matchAll CSTerminatedWithErrors AcceptFailure+            (dcrCluster . c1Status . csState . _Just)+        ]+    }