diff --git a/amazonka-cloudfront/gen/Network/AWS/CloudFront/Waiters.hs b/amazonka-cloudfront/gen/Network/AWS/CloudFront/Waiters.hs index 1dd3282117e..473ab7f3c56 100644 --- a/amazonka-cloudfront/gen/Network/AWS/CloudFront/Waiters.hs +++ b/amazonka-cloudfront/gen/Network/AWS/CloudFront/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.CloudFront.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -21,21 +22,24 @@ import Network.AWS.Types distributionDeployed :: Wait GetDistribution distributionDeployed = Wait - { _waitDelay = 60 - , _waitAttempts = 25 - , _waitAccept = const True + { _waitName = "DistributionDeployed" + , _waitDelay = 60 + , _waitAttempts = 25 + , _waitAccept = const True } invalidationCompleted :: Wait GetInvalidation invalidationCompleted = Wait - { _waitDelay = 20 - , _waitAttempts = 30 - , _waitAccept = const True + { _waitName = "InvalidationCompleted" + , _waitDelay = 20 + , _waitAttempts = 30 + , _waitAccept = const True } streamingDistributionDeployed :: Wait GetStreamingDistribution streamingDistributionDeployed = Wait - { _waitDelay = 60 - , _waitAttempts = 25 - , _waitAccept = const True + { _waitName = "StreamingDistributionDeployed" + , _waitDelay = 60 + , _waitAttempts = 25 + , _waitAccept = const True } diff --git a/amazonka-dynamodb/gen/Network/AWS/DynamoDB/Waiters.hs b/amazonka-dynamodb/gen/Network/AWS/DynamoDB/Waiters.hs index ec9f1a0c355..5307ed671a7 100644 --- a/amazonka-dynamodb/gen/Network/AWS/DynamoDB/Waiters.hs +++ b/amazonka-dynamodb/gen/Network/AWS/DynamoDB/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.DynamoDB.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -19,14 +20,16 @@ import Network.AWS.Types tableExists :: Wait DescribeTable tableExists = Wait - { _waitDelay = 20 - , _waitAttempts = 25 - , _waitAccept = const True + { _waitName = "TableExists" + , _waitDelay = 20 + , _waitAttempts = 25 + , _waitAccept = const True } tableNotExists :: Wait DescribeTable tableNotExists = Wait - { _waitDelay = 20 - , _waitAttempts = 25 - , _waitAccept = const True + { _waitName = "TableNotExists" + , _waitDelay = 20 + , _waitAttempts = 25 + , _waitAccept = const True } diff --git a/amazonka-ec2/gen/Network/AWS/EC2/Waiters.hs b/amazonka-ec2/gen/Network/AWS/EC2/Waiters.hs index 5b2d14b761c..0477e5f97e5 100644 --- a/amazonka-ec2/gen/Network/AWS/EC2/Waiters.hs +++ b/amazonka-ec2/gen/Network/AWS/EC2/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.EC2.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -28,126 +29,144 @@ import Network.AWS.Types bundleTaskComplete :: Wait DescribeBundleTasks bundleTaskComplete = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "BundleTaskComplete" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } conversionTaskCancelled :: Wait DescribeConversionTasks conversionTaskCancelled = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "ConversionTaskCancelled" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } conversionTaskCompleted :: Wait DescribeConversionTasks conversionTaskCompleted = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "ConversionTaskCompleted" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } conversionTaskDeleted :: Wait DescribeConversionTasks conversionTaskDeleted = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "ConversionTaskDeleted" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } customerGatewayAvailable :: Wait DescribeCustomerGateways customerGatewayAvailable = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "CustomerGatewayAvailable" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } exportTaskCancelled :: Wait DescribeExportTasks exportTaskCancelled = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "ExportTaskCancelled" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } exportTaskCompleted :: Wait DescribeExportTasks exportTaskCompleted = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "ExportTaskCompleted" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } instanceRunning :: Wait DescribeInstances instanceRunning = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "InstanceRunning" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } instanceStopped :: Wait DescribeInstances instanceStopped = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "InstanceStopped" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } instanceTerminated :: Wait DescribeInstances instanceTerminated = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "InstanceTerminated" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } snapshotCompleted :: Wait DescribeSnapshots snapshotCompleted = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "SnapshotCompleted" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } subnetAvailable :: Wait DescribeSubnets subnetAvailable = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "SubnetAvailable" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } volumeAvailable :: Wait DescribeVolumes volumeAvailable = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "VolumeAvailable" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } volumeDeleted :: Wait DescribeVolumes volumeDeleted = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "VolumeDeleted" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } volumeInUse :: Wait DescribeVolumes volumeInUse = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "VolumeInUse" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } vpcAvailable :: Wait DescribeVpcs vpcAvailable = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "VpcAvailable" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } vpnConnectionAvailable :: Wait DescribeVpnConnections vpnConnectionAvailable = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "VpnConnectionAvailable" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } vpnConnectionDeleted :: Wait DescribeVpnConnections vpnConnectionDeleted = Wait - { _waitDelay = 15 - , _waitAttempts = 40 - , _waitAccept = const True + { _waitName = "VpnConnectionDeleted" + , _waitDelay = 15 + , _waitAttempts = 40 + , _waitAccept = const True } diff --git a/amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Waiters.hs b/amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Waiters.hs index d054bead2cd..8b187fca080 100644 --- a/amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Waiters.hs +++ b/amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.ElasticTranscoder.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -19,7 +20,8 @@ import Network.AWS.Types jobComplete :: Wait ReadJob jobComplete = Wait - { _waitDelay = 30 - , _waitAttempts = 120 - , _waitAccept = const True + { _waitName = "JobComplete" + , _waitDelay = 30 + , _waitAttempts = 120 + , _waitAccept = const True } diff --git a/amazonka-emr/gen/Network/AWS/EMR/Waiters.hs b/amazonka-emr/gen/Network/AWS/EMR/Waiters.hs index 8240831ba6f..89c109f4588 100644 --- a/amazonka-emr/gen/Network/AWS/EMR/Waiters.hs +++ b/amazonka-emr/gen/Network/AWS/EMR/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.EMR.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -19,7 +20,8 @@ import Network.AWS.Types clusterRunning :: Wait DescribeCluster clusterRunning = Wait - { _waitDelay = 30 - , _waitAttempts = 60 - , _waitAccept = const True + { _waitName = "ClusterRunning" + , _waitDelay = 30 + , _waitAttempts = 60 + , _waitAccept = const True } diff --git a/amazonka-rds/gen/Network/AWS/RDS/Waiters.hs b/amazonka-rds/gen/Network/AWS/RDS/Waiters.hs index a9941a2338e..10486797e25 100644 --- a/amazonka-rds/gen/Network/AWS/RDS/Waiters.hs +++ b/amazonka-rds/gen/Network/AWS/RDS/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.RDS.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -19,14 +20,16 @@ import Network.AWS.Types dBInstanceAvailable :: Wait DescribeDBInstances dBInstanceAvailable = Wait - { _waitDelay = 30 - , _waitAttempts = 60 - , _waitAccept = const True + { _waitName = "DBInstanceAvailable" + , _waitDelay = 30 + , _waitAttempts = 60 + , _waitAccept = const True } dBInstanceDeleted :: Wait DescribeDBInstances dBInstanceDeleted = Wait - { _waitDelay = 30 - , _waitAttempts = 60 - , _waitAccept = const True + { _waitName = "DBInstanceDeleted" + , _waitDelay = 30 + , _waitAttempts = 60 + , _waitAccept = const True } diff --git a/amazonka-redshift/gen/Network/AWS/Redshift/Waiters.hs b/amazonka-redshift/gen/Network/AWS/Redshift/Waiters.hs index ceeda2dc1c4..275c77d8700 100644 --- a/amazonka-redshift/gen/Network/AWS/Redshift/Waiters.hs +++ b/amazonka-redshift/gen/Network/AWS/Redshift/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.Redshift.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -20,21 +21,24 @@ import Network.AWS.Types clusterAvailable :: Wait DescribeClusters clusterAvailable = Wait - { _waitDelay = 60 - , _waitAttempts = 30 - , _waitAccept = const True + { _waitName = "ClusterAvailable" + , _waitDelay = 60 + , _waitAttempts = 30 + , _waitAccept = const True } clusterDeleted :: Wait DescribeClusters clusterDeleted = Wait - { _waitDelay = 60 - , _waitAttempts = 30 - , _waitAccept = const True + { _waitName = "ClusterDeleted" + , _waitDelay = 60 + , _waitAttempts = 30 + , _waitAccept = const True } snapshotAvailable :: Wait DescribeClusterSnapshots snapshotAvailable = Wait - { _waitDelay = 15 - , _waitAttempts = 20 - , _waitAccept = const True + { _waitName = "SnapshotAvailable" + , _waitDelay = 15 + , _waitAttempts = 20 + , _waitAccept = const True } diff --git a/amazonka-s3/gen/Network/AWS/S3/Waiters.hs b/amazonka-s3/gen/Network/AWS/S3/Waiters.hs index 8260305f52d..ffe7289f5cf 100644 --- a/amazonka-s3/gen/Network/AWS/S3/Waiters.hs +++ b/amazonka-s3/gen/Network/AWS/S3/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.S3.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -20,28 +21,32 @@ import Network.AWS.Types bucketExists :: Wait HeadBucket bucketExists = Wait - { _waitDelay = 5 - , _waitAttempts = 20 - , _waitAccept = const True + { _waitName = "BucketExists" + , _waitDelay = 5 + , _waitAttempts = 20 + , _waitAccept = const True } bucketNotExists :: Wait HeadBucket bucketNotExists = Wait - { _waitDelay = 5 - , _waitAttempts = 20 - , _waitAccept = const True + { _waitName = "BucketNotExists" + , _waitDelay = 5 + , _waitAttempts = 20 + , _waitAccept = const True } objectExists :: Wait HeadObject objectExists = Wait - { _waitDelay = 5 - , _waitAttempts = 20 - , _waitAccept = const True + { _waitName = "ObjectExists" + , _waitDelay = 5 + , _waitAttempts = 20 + , _waitAccept = const True } objectNotExists :: Wait HeadObject objectNotExists = Wait - { _waitDelay = 5 - , _waitAttempts = 20 - , _waitAccept = const True + { _waitName = "ObjectNotExists" + , _waitDelay = 5 + , _waitAttempts = 20 + , _waitAccept = const True } diff --git a/amazonka-ses/gen/Network/AWS/SES/Waiters.hs b/amazonka-ses/gen/Network/AWS/SES/Waiters.hs index e375ab04045..2bb028f0695 100644 --- a/amazonka-ses/gen/Network/AWS/SES/Waiters.hs +++ b/amazonka-ses/gen/Network/AWS/SES/Waiters.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.SES.Waiters -- Copyright : (c) 2013-2014 Brendan Hay @@ -19,7 +20,8 @@ import Network.AWS.Types identityExists :: Wait GetIdentityVerificationAttributes identityExists = Wait - { _waitDelay = 3 - , _waitAttempts = 20 - , _waitAccept = const True + { _waitName = "IdentityExists" + , _waitDelay = 3 + , _waitAttempts = 20 + , _waitAccept = const True } diff --git a/amazonka/src/Network/AWS.hs b/amazonka/src/Network/AWS.hs index b5b6601a8cd..b43b7f4eb6d 100644 --- a/amazonka/src/Network/AWS.hs +++ b/amazonka/src/Network/AWS.hs @@ -157,13 +157,9 @@ await e Wait{..} = retrying policy check . send e check n rs = debug (_envLogger e) msg >> return p where - msg = "[Await " - <> build _waitName - <> "] " - <> s - <> " " - <> build (n + 1) - <> " attempt." + msg = "[Await " <> build _waitName <> "] " + <> s <> " " + <> build (n + 1) <> " attempt." (s, p) = case rs of Left _ -> ("Error", False) diff --git a/core/src/Network/AWS/Types.hs b/core/src/Network/AWS/Types.hs index 218e998faa5..f1b1fcda4bc 100644 --- a/core/src/Network/AWS/Types.hs +++ b/core/src/Network/AWS/Types.hs @@ -371,17 +371,17 @@ exponentialBackon !base !grow = (<> RetryPolicy f) . limitRetries -- | Attributes specific to an AWS service. data Service a = Service { _svcAbbrev :: !Text - , _svcPrefix :: ByteString - , _svcVersion :: ByteString + , _svcPrefix :: !ByteString + , _svcVersion :: !ByteString , _svcTargetPrefix :: Maybe ByteString , _svcJSONVersion :: Maybe ByteString , _svcHandle :: Status -> Maybe (LazyByteString -> ServiceError (Er a)) , _svcRetry :: Retry (Er a) } --- | Timings and acceptance criteria to judge fulfillment of a remote operation. +-- | Timing and acceptance criteria to check fulfillment of a remote operation. data Wait a = Wait - { _waitName :: !Text + { _waitName :: !ByteString , _waitDelay :: !Int , _waitAttempts :: !Int , _waitAccept :: Rs a -> Bool @@ -390,7 +390,7 @@ data Wait a = Wait -- | An unsigned request. data Request a = Request { _rqMethod :: !StdMethod - , _rqPath :: ByteString + , _rqPath :: !ByteString , _rqQuery :: Query , _rqHeaders :: [Header] , _rqBody :: RqBody