packages feed

amazonka-cloudfront 0.0.7 → 0.0.8

raw patch · 23 files changed

+183/−43 lines, 23 filesdep ~amazonka-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: amazonka-core

API changes (from Hackage documentation)

+ Network.AWS.CloudFront.Types: SSLv3 :: MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: TLSv1 :: MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: amCachedMethods :: Lens' AllowedMethods (Maybe CachedMethods)
+ Network.AWS.CloudFront.Types: cachedMethods :: Int -> CachedMethods
+ Network.AWS.CloudFront.Types: cmItems :: Lens' CachedMethods [Method]
+ Network.AWS.CloudFront.Types: cmQuantity :: Lens' CachedMethods Int
+ Network.AWS.CloudFront.Types: data CachedMethods
+ Network.AWS.CloudFront.Types: data MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Constructor C1_0MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Constructor C1_1MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Datatype D1MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Enum MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Eq CachedMethods
+ Network.AWS.CloudFront.Types: instance Eq MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance FromText MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance FromXML CachedMethods
+ Network.AWS.CloudFront.Types: instance FromXML MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Generic MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Hashable MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Ord MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance Show CachedMethods
+ Network.AWS.CloudFront.Types: instance Show MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance ToByteString MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance ToHeader MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance ToQuery MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance ToText MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: instance ToXML CachedMethods
+ Network.AWS.CloudFront.Types: instance ToXML MinimumProtocolVersion
+ Network.AWS.CloudFront.Types: vcMinimumProtocolVersion :: Lens' ViewerCertificate (Maybe MinimumProtocolVersion)

Files

amazonka-cloudfront.cabal view
@@ -1,5 +1,5 @@ name:                  amazonka-cloudfront-version:               0.0.7+version:               0.0.8 synopsis:              Amazon CloudFront SDK. homepage:              https://github.com/brendanhay/amazonka license:               OtherLicense@@ -69,5 +69,5 @@     other-modules:      build-depends:-          amazonka-core == 0.0.7.*+          amazonka-core == 0.0.8.*         , base          >= 4.7     && < 5
gen/Network/AWS/CloudFront/CreateCloudFrontOriginAccessIdentity.hs view
@@ -111,7 +111,7 @@ ccfoairLocation = lens _ccfoairLocation (\s a -> s { _ccfoairLocation = a })  instance ToPath CreateCloudFrontOriginAccessIdentity where-    toPath = const "/2014-05-31/origin-access-identity/cloudfront"+    toPath = const "/2014-10-21/origin-access-identity/cloudfront"  instance ToQuery CreateCloudFrontOriginAccessIdentity where     toQuery = const mempty
gen/Network/AWS/CloudFront/CreateDistribution.hs view
@@ -108,7 +108,7 @@ cdrLocation = lens _cdrLocation (\s a -> s { _cdrLocation = a })  instance ToPath CreateDistribution where-    toPath = const "/2014-05-31/distribution"+    toPath = const "/2014-10-21/distribution"  instance ToQuery CreateDistribution where     toQuery = const mempty
gen/Network/AWS/CloudFront/CreateInvalidation.hs view
@@ -109,7 +109,7 @@  instance ToPath CreateInvalidation where     toPath CreateInvalidation{..} = mconcat-        [ "/2014-05-31/distribution/"+        [ "/2014-10-21/distribution/"         , toText _ciDistributionId         , "/invalidation"         ]
gen/Network/AWS/CloudFront/CreateStreamingDistribution.hs view
@@ -111,7 +111,7 @@         (\s a -> s { _csdrStreamingDistribution = a })  instance ToPath CreateStreamingDistribution where-    toPath = const "/2014-05-31/streaming-distribution"+    toPath = const "/2014-10-21/streaming-distribution"  instance ToQuery CreateStreamingDistribution where     toQuery = const mempty
gen/Network/AWS/CloudFront/DeleteCloudFrontOriginAccessIdentity.hs view
@@ -84,7 +84,7 @@  instance ToPath DeleteCloudFrontOriginAccessIdentity where     toPath DeleteCloudFrontOriginAccessIdentity{..} = mconcat-        [ "/2014-05-31/origin-access-identity/cloudfront/"+        [ "/2014-10-21/origin-access-identity/cloudfront/"         , toText _dcfoaiId         ] 
gen/Network/AWS/CloudFront/DeleteDistribution.hs view
@@ -84,7 +84,7 @@  instance ToPath DeleteDistribution where     toPath DeleteDistribution{..} = mconcat-        [ "/2014-05-31/distribution/"+        [ "/2014-10-21/distribution/"         , toText _ddId         ] 
gen/Network/AWS/CloudFront/DeleteStreamingDistribution.hs view
@@ -84,7 +84,7 @@  instance ToPath DeleteStreamingDistribution where     toPath DeleteStreamingDistribution{..} = mconcat-        [ "/2014-05-31/streaming-distribution/"+        [ "/2014-10-21/streaming-distribution/"         , toText _dsdId         ] 
gen/Network/AWS/CloudFront/GetCloudFrontOriginAccessIdentity.hs view
@@ -100,7 +100,7 @@  instance ToPath GetCloudFrontOriginAccessIdentity where     toPath GetCloudFrontOriginAccessIdentity{..} = mconcat-        [ "/2014-05-31/origin-access-identity/cloudfront/"+        [ "/2014-10-21/origin-access-identity/cloudfront/"         , toText _gcfoaiId         ] 
gen/Network/AWS/CloudFront/GetCloudFrontOriginAccessIdentityConfig.hs view
@@ -99,7 +99,7 @@  instance ToPath GetCloudFrontOriginAccessIdentityConfig where     toPath GetCloudFrontOriginAccessIdentityConfig{..} = mconcat-        [ "/2014-05-31/origin-access-identity/cloudfront/"+        [ "/2014-10-21/origin-access-identity/cloudfront/"         , toText _gcfoaicId         , "/config"         ]
gen/Network/AWS/CloudFront/GetDistribution.hs view
@@ -98,7 +98,7 @@  instance ToPath GetDistribution where     toPath GetDistribution{..} = mconcat-        [ "/2014-05-31/distribution/"+        [ "/2014-10-21/distribution/"         , toText _gdId         ] 
gen/Network/AWS/CloudFront/GetDistributionConfig.hs view
@@ -98,7 +98,7 @@  instance ToPath GetDistributionConfig where     toPath GetDistributionConfig{..} = mconcat-        [ "/2014-05-31/distribution/"+        [ "/2014-10-21/distribution/"         , toText _gdcId         , "/config"         ]
gen/Network/AWS/CloudFront/GetInvalidation.hs view
@@ -98,7 +98,7 @@  instance ToPath GetInvalidation where     toPath GetInvalidation{..} = mconcat-        [ "/2014-05-31/distribution/"+        [ "/2014-10-21/distribution/"         , toText _giDistributionId         , "/invalidation/"         , toText _giId
gen/Network/AWS/CloudFront/GetStreamingDistribution.hs view
@@ -100,7 +100,7 @@  instance ToPath GetStreamingDistribution where     toPath GetStreamingDistribution{..} = mconcat-        [ "/2014-05-31/streaming-distribution/"+        [ "/2014-10-21/streaming-distribution/"         , toText _gsdId         ] 
gen/Network/AWS/CloudFront/GetStreamingDistributionConfig.hs view
@@ -99,7 +99,7 @@  instance ToPath GetStreamingDistributionConfig where     toPath GetStreamingDistributionConfig{..} = mconcat-        [ "/2014-05-31/streaming-distribution/"+        [ "/2014-10-21/streaming-distribution/"         , toText _gsdcId         , "/config"         ]
gen/Network/AWS/CloudFront/ListCloudFrontOriginAccessIdentities.hs view
@@ -102,7 +102,7 @@         (\s a -> s { _lcfoairCloudFrontOriginAccessIdentityList = a })  instance ToPath ListCloudFrontOriginAccessIdentities where-    toPath = const "/2014-05-31/origin-access-identity/cloudfront"+    toPath = const "/2014-10-21/origin-access-identity/cloudfront"  instance ToQuery ListCloudFrontOriginAccessIdentities where     toQuery ListCloudFrontOriginAccessIdentities{..} = mconcat
gen/Network/AWS/CloudFront/ListDistributions.hs view
@@ -101,7 +101,7 @@     lens _ldrDistributionList (\s a -> s { _ldrDistributionList = a })  instance ToPath ListDistributions where-    toPath = const "/2014-05-31/distribution"+    toPath = const "/2014-10-21/distribution"  instance ToQuery ListDistributions where     toQuery ListDistributions{..} = mconcat
gen/Network/AWS/CloudFront/ListInvalidations.hs view
@@ -114,7 +114,7 @@  instance ToPath ListInvalidations where     toPath ListInvalidations{..} = mconcat-        [ "/2014-05-31/distribution/"+        [ "/2014-10-21/distribution/"         , toText _liDistributionId         , "/invalidation"         ]
gen/Network/AWS/CloudFront/ListStreamingDistributions.hs view
@@ -102,7 +102,7 @@         (\s a -> s { _lsdrStreamingDistributionList = a })  instance ToPath ListStreamingDistributions where-    toPath = const "/2014-05-31/streaming-distribution"+    toPath = const "/2014-10-21/streaming-distribution"  instance ToQuery ListStreamingDistributions where     toQuery ListStreamingDistributions{..} = mconcat
gen/Network/AWS/CloudFront/Types.hs view
@@ -7,6 +7,7 @@ {-# LANGUAGE OverloadedStrings           #-} {-# LANGUAGE RecordWildCards             #-} {-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE ViewPatterns                #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-} @@ -55,6 +56,7 @@     -- * AllowedMethods     , AllowedMethods     , allowedMethods+    , amCachedMethods     , amItems     , amQuantity @@ -248,11 +250,18 @@     , hItems     , hQuantity +    -- * CachedMethods+    , CachedMethods+    , cachedMethods+    , cmItems+    , cmQuantity+     -- * ViewerCertificate     , ViewerCertificate     , viewerCertificate     , vcCloudFrontDefaultCertificate     , vcIAMCertificateId+    , vcMinimumProtocolVersion     , vcSSLSupportMethod      -- * Restrictions@@ -269,6 +278,9 @@     -- * Method     , Method (..) +    -- * MinimumProtocolVersion+    , MinimumProtocolVersion (..)+     -- * ForwardedValues     , ForwardedValues     , forwardedValues@@ -394,30 +406,54 @@     , lcPrefix     ) where -import Network.AWS.Error import Network.AWS.Prelude import Network.AWS.Signing import qualified GHC.Exts --- | Version @2014-05-31@ of the Amazon CloudFront service.+-- | Version @2014-10-21@ of the Amazon CloudFront service. data CloudFront  instance AWSService CloudFront where     type Sg CloudFront = V4     type Er CloudFront = RESTError -    service = Service-        { _svcAbbrev       = "CloudFront"-        , _svcPrefix       = "cloudfront"-        , _svcVersion      = "2014-05-31"-        , _svcTargetPrefix = Nothing-        , _svcJSONVersion  = Nothing-        }+    service = service'+      where+        service' :: Service CloudFront+        service' = Service+            { _svcAbbrev       = "CloudFront"+            , _svcPrefix       = "cloudfront"+            , _svcVersion      = "2014-10-21"+            , _svcTargetPrefix = Nothing+            , _svcJSONVersion  = Nothing+            , _svcHandle       = handle+            , _svcRetry        = retry+            } -    handle = restError statusSuccess+        handle :: Status+               -> Maybe (LazyByteString -> ServiceError RESTError)+        handle = restError statusSuccess service' +        retry :: Retry CloudFront+        retry = Exponential+            { _retryBase     = 0.05+            , _retryGrowth   = 2+            , _retryAttempts = 5+            , _retryCheck    = check+            }++        check :: Status+              -> RESTError+              -> Bool+        check (statusCode -> s) (awsErrorCode -> e)+            | s == 500  = True -- General Server Error+            | s == 509  = True -- Limit Exceeded+            | s == 503  = True -- Service Unavailable+            | otherwise = False+ ns :: Text-ns = "http://cloudfront.amazonaws.com/doc/2014-05-31/"+ns = "http://cloudfront.amazonaws.com/doc/2014-10-21/"+{-# INLINE ns #-}  data CloudFrontOriginAccessIdentityList = CloudFrontOriginAccessIdentityList     { _cfoailIsTruncated :: Bool@@ -605,14 +641,17 @@     toXML = toXMLText  data AllowedMethods = AllowedMethods-    { _amItems    :: List "Method" Method-    , _amQuantity :: Int+    { _amCachedMethods :: Maybe CachedMethods+    , _amItems         :: List "Method" Method+    , _amQuantity      :: Int     } deriving (Eq, Show)  -- | 'AllowedMethods' constructor. -- -- The fields accessible through corresponding lenses are: --+-- * 'amCachedMethods' @::@ 'Maybe' 'CachedMethods'+-- -- * 'amItems' @::@ ['Method'] -- -- * 'amQuantity' @::@ 'Int'@@ -620,30 +659,37 @@ allowedMethods :: Int -- ^ 'amQuantity'                -> AllowedMethods allowedMethods p1 = AllowedMethods-    { _amQuantity = p1-    , _amItems    = mempty+    { _amQuantity      = p1+    , _amItems         = mempty+    , _amCachedMethods = Nothing     } +amCachedMethods :: Lens' AllowedMethods (Maybe CachedMethods)+amCachedMethods = lens _amCachedMethods (\s a -> s { _amCachedMethods = a })+ -- | A complex type that contains the HTTP methods that you want CloudFront to -- process and forward to your origin. amItems :: Lens' AllowedMethods [Method] amItems = lens _amItems (\s a -> s { _amItems = a }) . _List  -- | The number of HTTP methods that you want CloudFront to forward to your--- origin. Valid values are 2 (for GET and HEAD requests) and 7 (for DELETE,--- GET, HEAD, OPTIONS, PATCH, POST, and PUT requests).+-- origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD and+-- OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE+-- requests). amQuantity :: Lens' AllowedMethods Int amQuantity = lens _amQuantity (\s a -> s { _amQuantity = a })  instance FromXML AllowedMethods where     parseXML x = AllowedMethods-        <$> x .@? "Items" .!@ mempty+        <$> x .@? "CachedMethods"+        <*> x .@? "Items" .!@ mempty         <*> x .@  "Quantity"  instance ToXML AllowedMethods where     toXML AllowedMethods{..} = nodes "AllowedMethods"-        [ "Quantity" =@ _amQuantity-        , "Items"    =@ _amItems+        [ "Quantity"      =@ _amQuantity+        , "Items"         =@ _amItems+        , "CachedMethods" =@ _amCachedMethods         ]  data CloudFrontOriginAccessIdentityConfig = CloudFrontOriginAccessIdentityConfig@@ -2371,9 +2417,52 @@         , "Items"    =@ _hItems         ] +data CachedMethods = CachedMethods+    { _cmItems    :: List "Method" Method+    , _cmQuantity :: Int+    } deriving (Eq, Show)++-- | 'CachedMethods' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmItems' @::@ ['Method']+--+-- * 'cmQuantity' @::@ 'Int'+--+cachedMethods :: Int -- ^ 'cmQuantity'+              -> CachedMethods+cachedMethods p1 = CachedMethods+    { _cmQuantity = p1+    , _cmItems    = mempty+    }++-- | A complex type that contains the HTTP methods that you want CloudFront to+-- cache responses to.+cmItems :: Lens' CachedMethods [Method]+cmItems = lens _cmItems (\s a -> s { _cmItems = a }) . _List++-- | The number of HTTP methods for which you want CloudFront to cache responses.+-- Valid values are 2 (for caching responses to GET and HEAD requests) and 3+-- (for caching responses to GET, HEAD, and OPTIONS requests).+cmQuantity :: Lens' CachedMethods Int+cmQuantity = lens _cmQuantity (\s a -> s { _cmQuantity = a })++instance FromXML CachedMethods where+    parseXML x = CachedMethods+        <$> x .@? "Items" .!@ mempty+        <*> x .@  "Quantity"++instance ToXML CachedMethods where+    toXML CachedMethods{..} = nodes "CachedMethods"+        [ "Quantity" =@ _cmQuantity+        , "Items"    =@ _cmItems+        ]+ data ViewerCertificate = ViewerCertificate     { _vcCloudFrontDefaultCertificate :: Maybe Bool     , _vcIAMCertificateId             :: Maybe Text+    , _vcMinimumProtocolVersion       :: Maybe MinimumProtocolVersion     , _vcSSLSupportMethod             :: Maybe SSLSupportMethod     } deriving (Eq, Show) @@ -2385,6 +2474,8 @@ -- -- * 'vcIAMCertificateId' @::@ 'Maybe' 'Text' --+-- * 'vcMinimumProtocolVersion' @::@ 'Maybe' 'MinimumProtocolVersion'+-- -- * 'vcSSLSupportMethod' @::@ 'Maybe' 'SSLSupportMethod' -- viewerCertificate :: ViewerCertificate@@ -2392,6 +2483,7 @@     { _vcIAMCertificateId             = Nothing     , _vcCloudFrontDefaultCertificate = Nothing     , _vcSSLSupportMethod             = Nothing+    , _vcMinimumProtocolVersion       = Nothing     }  -- | If you want viewers to use HTTPS to request your objects and you're using the@@ -2412,6 +2504,23 @@ vcIAMCertificateId =     lens _vcIAMCertificateId (\s a -> s { _vcIAMCertificateId = a }) +-- | Specify the minimum version of the SSL protocol that you want CloudFront to+-- use, SSLv3 or TLSv1, for HTTPS connections. CloudFront will serve your+-- objects only to browsers or devices that support at least the SSL version+-- that you specify. The TLSv1 protocol is more secure, so we recommend that you+-- specify SSLv3 only if your users are using browsers or devices that don't+-- support TLSv1. If you're using a custom certificate (if you specify a value+-- for IAMCertificateId) and if you're using dedicated IP (if you specify vip+-- for SSLSupportMethod), you can choose SSLv3 or TLSv1 as the+-- MinimumProtocolVersion. If you're using a custom certificate (if you specify+-- a value for IAMCertificateId) and if you're using SNI (if you specify+-- sni-only for SSLSupportMethod), you must specify TLSv1 for+-- MinimumProtocolVersion.+vcMinimumProtocolVersion :: Lens' ViewerCertificate (Maybe MinimumProtocolVersion)+vcMinimumProtocolVersion =+    lens _vcMinimumProtocolVersion+        (\s a -> s { _vcMinimumProtocolVersion = a })+ -- | If you specify a value for IAMCertificateId, you must also specify how you -- want CloudFront to serve HTTPS requests. Valid values are vip and sni-only. -- If you specify vip, CloudFront uses dedicated IP addresses for your content@@ -2430,6 +2539,7 @@     parseXML x = ViewerCertificate         <$> x .@? "CloudFrontDefaultCertificate"         <*> x .@? "IAMCertificateId"+        <*> x .@? "MinimumProtocolVersion"         <*> x .@? "SSLSupportMethod"  instance ToXML ViewerCertificate where@@ -2437,6 +2547,7 @@         [ "IAMCertificateId"             =@ _vcIAMCertificateId         , "CloudFrontDefaultCertificate" =@ _vcCloudFrontDefaultCertificate         , "SSLSupportMethod"             =@ _vcSSLSupportMethod+        , "MinimumProtocolVersion"       =@ _vcMinimumProtocolVersion         ]  newtype Restrictions = Restrictions@@ -2549,6 +2660,35 @@     parseXML = parseXMLText "Method"  instance ToXML Method where+    toXML = toXMLText++data MinimumProtocolVersion+    = SSLv3 -- ^ SSLv3+    | TLSv1 -- ^ TLSv1+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable MinimumProtocolVersion++instance FromText MinimumProtocolVersion where+    parser = takeText >>= \case+        "SSLv3" -> pure SSLv3+        "TLSv1" -> pure TLSv1+        e       -> fail $+            "Failure parsing MinimumProtocolVersion from " ++ show e++instance ToText MinimumProtocolVersion where+    toText = \case+        SSLv3 -> "SSLv3"+        TLSv1 -> "TLSv1"++instance ToByteString MinimumProtocolVersion+instance ToHeader     MinimumProtocolVersion+instance ToQuery      MinimumProtocolVersion++instance FromXML MinimumProtocolVersion where+    parseXML = parseXMLText "MinimumProtocolVersion"++instance ToXML MinimumProtocolVersion where     toXML = toXMLText  data ForwardedValues = ForwardedValues
gen/Network/AWS/CloudFront/UpdateCloudFrontOriginAccessIdentity.hs view
@@ -121,7 +121,7 @@  instance ToPath UpdateCloudFrontOriginAccessIdentity where     toPath UpdateCloudFrontOriginAccessIdentity{..} = mconcat-        [ "/2014-05-31/origin-access-identity/cloudfront/"+        [ "/2014-10-21/origin-access-identity/cloudfront/"         , toText _ucfoaiId         , "/config"         ]
gen/Network/AWS/CloudFront/UpdateDistribution.hs view
@@ -118,7 +118,7 @@  instance ToPath UpdateDistribution where     toPath UpdateDistribution{..} = mconcat-        [ "/2014-05-31/distribution/"+        [ "/2014-10-21/distribution/"         , toText _udId         , "/config"         ]
gen/Network/AWS/CloudFront/UpdateStreamingDistribution.hs view
@@ -121,7 +121,7 @@  instance ToPath UpdateStreamingDistribution where     toPath UpdateStreamingDistribution{..} = mconcat-        [ "/2014-05-31/streaming-distribution/"+        [ "/2014-10-21/streaming-distribution/"         , toText _usdId         , "/config"         ]