packages feed

amazonka-marketplace-analytics 1.4.3 → 1.4.4

raw patch · 10 files changed

+272/−9 lines, 10 filesdep ~amazonka-coredep ~amazonka-marketplace-analyticsdep ~amazonka-testPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: amazonka-core, amazonka-marketplace-analytics, amazonka-test

API changes (from Hackage documentation)

- Network.AWS.MarketplaceAnalytics.GenerateDataSet: instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.MarketplaceAnalytics.GenerateDataSet.GenerateDataSet
+ Network.AWS.MarketplaceAnalytics: CustomerSupportContactsData :: SupportDataSetType
+ Network.AWS.MarketplaceAnalytics: TestCustomerSupportContactsData :: SupportDataSetType
+ Network.AWS.MarketplaceAnalytics: data SupportDataSetType
+ Network.AWS.MarketplaceAnalytics.GenerateDataSet: instance Data.Aeson.Types.Class.ToJSON Network.AWS.MarketplaceAnalytics.GenerateDataSet.GenerateDataSet
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: data StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: data StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Control.DeepSeq.NFData Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Control.DeepSeq.NFData Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Data.Aeson.Types.Class.ToJSON Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Data.Data.Data Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Data.Data.Data Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Data.Hashable.Class.Hashable Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Classes.Eq Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Classes.Eq Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Generics.Generic Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Generics.Generic Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Read.Read Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Read.Read Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Show.Show Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance GHC.Show.Show Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Network.AWS.Data.Headers.ToHeaders Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Network.AWS.Data.Path.ToPath Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Network.AWS.Data.Query.ToQuery Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: instance Network.AWS.Types.AWSRequest Network.AWS.MarketplaceAnalytics.StartSupportDataExport.StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdeCustomerDefinedValues :: Lens' StartSupportDataExport (HashMap Text Text)
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdeDataSetType :: Lens' StartSupportDataExport SupportDataSetType
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdeDestinationS3BucketName :: Lens' StartSupportDataExport Text
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdeDestinationS3Prefix :: Lens' StartSupportDataExport (Maybe Text)
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdeFromDate :: Lens' StartSupportDataExport UTCTime
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdeRoleNameARN :: Lens' StartSupportDataExport Text
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdeSnsTopicARN :: Lens' StartSupportDataExport Text
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdersDataSetRequestId :: Lens' StartSupportDataExportResponse (Maybe Text)
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: ssdersResponseStatus :: Lens' StartSupportDataExportResponse Int
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: startSupportDataExport :: SupportDataSetType -> UTCTime -> Text -> Text -> Text -> StartSupportDataExport
+ Network.AWS.MarketplaceAnalytics.StartSupportDataExport: startSupportDataExportResponse :: Int -> StartSupportDataExportResponse
+ Network.AWS.MarketplaceAnalytics.Types: CustomerSupportContactsData :: SupportDataSetType
+ Network.AWS.MarketplaceAnalytics.Types: TestCustomerSupportContactsData :: SupportDataSetType
+ Network.AWS.MarketplaceAnalytics.Types: data SupportDataSetType

Files

README.md view
@@ -8,7 +8,7 @@  ## Version -`1.4.3`+`1.4.4`   ## Description
amazonka-marketplace-analytics.cabal view
@@ -1,5 +1,5 @@ name:                  amazonka-marketplace-analytics-version:               1.4.3+version:               1.4.4 synopsis:              Amazon Marketplace Commerce Analytics SDK. homepage:              https://github.com/brendanhay/amazonka bug-reports:           https://github.com/brendanhay/amazonka/issues@@ -11,7 +11,7 @@ category:              Network, AWS, Cloud, Distributed Computing build-type:            Simple cabal-version:         >= 1.10-extra-source-files:    README.md fixture/*.yaml fixture/*.proto+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep description:     Provides AWS Marketplace business intelligence data on-demand.     .@@ -42,6 +42,7 @@     exposed-modules:           Network.AWS.MarketplaceAnalytics         , Network.AWS.MarketplaceAnalytics.GenerateDataSet+        , Network.AWS.MarketplaceAnalytics.StartSupportDataExport         , Network.AWS.MarketplaceAnalytics.Types         , Network.AWS.MarketplaceAnalytics.Waiters @@ -50,7 +51,7 @@         , Network.AWS.MarketplaceAnalytics.Types.Sum      build-depends:-          amazonka-core == 1.4.3.*+          amazonka-core == 1.4.4.*         , base          >= 4.7     && < 5  test-suite amazonka-marketplace-analytics-test@@ -70,9 +71,9 @@         , Test.AWS.MarketplaceAnalytics.Internal      build-depends:-          amazonka-core == 1.4.3.*-        , amazonka-test == 1.4.3.*-        , amazonka-marketplace-analytics == 1.4.3.*+          amazonka-core == 1.4.4.*+        , amazonka-test == 1.4.4.*+        , amazonka-marketplace-analytics == 1.4.4.*         , base         , bytestring         , tasty
+ fixture/StartSupportDataExport.yaml view
+ fixture/StartSupportDataExportResponse.proto view
gen/Network/AWS/MarketplaceAnalytics.hs view
@@ -29,6 +29,9 @@     -- * Operations     -- $operations +    -- ** StartSupportDataExport+    , module Network.AWS.MarketplaceAnalytics.StartSupportDataExport+     -- ** GenerateDataSet     , module Network.AWS.MarketplaceAnalytics.GenerateDataSet @@ -36,9 +39,13 @@      -- ** DataSetType     , DataSetType (..)++    -- ** SupportDataSetType+    , SupportDataSetType (..)     ) where  import           Network.AWS.MarketplaceAnalytics.GenerateDataSet+import           Network.AWS.MarketplaceAnalytics.StartSupportDataExport import           Network.AWS.MarketplaceAnalytics.Types import           Network.AWS.MarketplaceAnalytics.Waiters 
+ gen/Network/AWS/MarketplaceAnalytics/StartSupportDataExport.hs view
@@ -0,0 +1,208 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.MarketplaceAnalytics.StartSupportDataExport+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Given a data set type and a from date, asynchronously publishes the requested customer support data to the specified S3 bucket and notifies the specified SNS topic once the data is available. Returns a unique request identifier that can be used to correlate requests with notifications from the SNS topic. Data sets will be published in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD\'T\'HH-mm-ss\'Z\'.csv. If a file with the same name already exists (e.g. if the same data set is requested twice), the original file will be overwritten by the new file. Requires a Role with an attached permissions policy providing Allow permissions for the following actions: s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy.+module Network.AWS.MarketplaceAnalytics.StartSupportDataExport+    (+    -- * Creating a Request+      startSupportDataExport+    , StartSupportDataExport+    -- * Request Lenses+    , ssdeCustomerDefinedValues+    , ssdeDestinationS3Prefix+    , ssdeDataSetType+    , ssdeFromDate+    , ssdeRoleNameARN+    , ssdeDestinationS3BucketName+    , ssdeSnsTopicARN++    -- * Destructuring the Response+    , startSupportDataExportResponse+    , StartSupportDataExportResponse+    -- * Response Lenses+    , ssdersDataSetRequestId+    , ssdersResponseStatus+    ) where++import           Network.AWS.Lens+import           Network.AWS.MarketplaceAnalytics.Types+import           Network.AWS.MarketplaceAnalytics.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Container for the parameters to the StartSupportDataExport operation.+--+-- /See:/ 'startSupportDataExport' smart constructor.+data StartSupportDataExport = StartSupportDataExport'+    { _ssdeCustomerDefinedValues   :: !(Maybe (Map Text Text))+    , _ssdeDestinationS3Prefix     :: !(Maybe Text)+    , _ssdeDataSetType             :: !SupportDataSetType+    , _ssdeFromDate                :: !POSIX+    , _ssdeRoleNameARN             :: !Text+    , _ssdeDestinationS3BucketName :: !Text+    , _ssdeSnsTopicARN             :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'StartSupportDataExport' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ssdeCustomerDefinedValues'+--+-- * 'ssdeDestinationS3Prefix'+--+-- * 'ssdeDataSetType'+--+-- * 'ssdeFromDate'+--+-- * 'ssdeRoleNameARN'+--+-- * 'ssdeDestinationS3BucketName'+--+-- * 'ssdeSnsTopicARN'+startSupportDataExport+    :: SupportDataSetType -- ^ 'ssdeDataSetType'+    -> UTCTime -- ^ 'ssdeFromDate'+    -> Text -- ^ 'ssdeRoleNameARN'+    -> Text -- ^ 'ssdeDestinationS3BucketName'+    -> Text -- ^ 'ssdeSnsTopicARN'+    -> StartSupportDataExport+startSupportDataExport pDataSetType_ pFromDate_ pRoleNameARN_ pDestinationS3BucketName_ pSnsTopicARN_ =+    StartSupportDataExport'+    { _ssdeCustomerDefinedValues = Nothing+    , _ssdeDestinationS3Prefix = Nothing+    , _ssdeDataSetType = pDataSetType_+    , _ssdeFromDate = _Time # pFromDate_+    , _ssdeRoleNameARN = pRoleNameARN_+    , _ssdeDestinationS3BucketName = pDestinationS3BucketName_+    , _ssdeSnsTopicARN = pSnsTopicARN_+    }++-- | (Optional) Key-value pairs which will be returned, unmodified, in the Amazon SNS notification message and the data set metadata file.+ssdeCustomerDefinedValues :: Lens' StartSupportDataExport (HashMap Text Text)+ssdeCustomerDefinedValues = lens _ssdeCustomerDefinedValues (\ s a -> s{_ssdeCustomerDefinedValues = a}) . _Default . _Map;++-- | (Optional) The desired S3 prefix for the published data set, similar to a directory path in standard file systems. For example, if given the bucket name \"mybucket\" and the prefix \"myprefix\/mydatasets\", the output file \"outputfile\" would be published to \"s3:\/\/mybucket\/myprefix\/mydatasets\/outputfile\". If the prefix directory structure does not exist, it will be created. If no prefix is provided, the data set will be published to the S3 bucket root.+ssdeDestinationS3Prefix :: Lens' StartSupportDataExport (Maybe Text)+ssdeDestinationS3Prefix = lens _ssdeDestinationS3Prefix (\ s a -> s{_ssdeDestinationS3Prefix = a});++-- | Specifies the data set type to be written to the output csv file. The data set types customer_support_contacts_data and test_customer_support_contacts_data both result in a csv file containing the following fields: Product Id, Customer Guid, Subscription Guid, Subscription Start Date, Organization, AWS Account Id, Given Name, Surname, Telephone Number, Email, Title, Country Code, ZIP Code, Operation Type, and Operation Time. Currently, only the test_customer_support_contacts_data value is supported+--+-- -   /customer_support_contacts_data/ Customer support contact data. The data set will contain all changes (Creates, Updates, and Deletes) to customer support contact data from the date specified in the from_date parameter.+-- -   /test_customer_support_contacts_data/ An example data set containing static test data in the same format as customer_support_contacts_data+ssdeDataSetType :: Lens' StartSupportDataExport SupportDataSetType+ssdeDataSetType = lens _ssdeDataSetType (\ s a -> s{_ssdeDataSetType = a});++-- | The start date from which to retrieve the data set. This parameter only affects the customer_support_contacts_data data set type.+ssdeFromDate :: Lens' StartSupportDataExport UTCTime+ssdeFromDate = lens _ssdeFromDate (\ s a -> s{_ssdeFromDate = a}) . _Time;++-- | The Amazon Resource Name (ARN) of the Role with an attached permissions policy to interact with the provided AWS services.+ssdeRoleNameARN :: Lens' StartSupportDataExport Text+ssdeRoleNameARN = lens _ssdeRoleNameARN (\ s a -> s{_ssdeRoleNameARN = a});++-- | The name (friendly name, not ARN) of the destination S3 bucket.+ssdeDestinationS3BucketName :: Lens' StartSupportDataExport Text+ssdeDestinationS3BucketName = lens _ssdeDestinationS3BucketName (\ s a -> s{_ssdeDestinationS3BucketName = a});++-- | Amazon Resource Name (ARN) for the SNS Topic that will be notified when the data set has been published or if an error has occurred.+ssdeSnsTopicARN :: Lens' StartSupportDataExport Text+ssdeSnsTopicARN = lens _ssdeSnsTopicARN (\ s a -> s{_ssdeSnsTopicARN = a});++instance AWSRequest StartSupportDataExport where+        type Rs StartSupportDataExport =+             StartSupportDataExportResponse+        request = postJSON marketplaceAnalytics+        response+          = receiveJSON+              (\ s h x ->+                 StartSupportDataExportResponse' <$>+                   (x .?> "dataSetRequestId") <*> (pure (fromEnum s)))++instance Hashable StartSupportDataExport++instance NFData StartSupportDataExport++instance ToHeaders StartSupportDataExport where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("MarketplaceCommerceAnalytics20150701.StartSupportDataExport"+                       :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON StartSupportDataExport where+        toJSON StartSupportDataExport'{..}+          = object+              (catMaybes+                 [("customerDefinedValues" .=) <$>+                    _ssdeCustomerDefinedValues,+                  ("destinationS3Prefix" .=) <$>+                    _ssdeDestinationS3Prefix,+                  Just ("dataSetType" .= _ssdeDataSetType),+                  Just ("fromDate" .= _ssdeFromDate),+                  Just ("roleNameArn" .= _ssdeRoleNameARN),+                  Just+                    ("destinationS3BucketName" .=+                       _ssdeDestinationS3BucketName),+                  Just ("snsTopicArn" .= _ssdeSnsTopicARN)])++instance ToPath StartSupportDataExport where+        toPath = const "/"++instance ToQuery StartSupportDataExport where+        toQuery = const mempty++-- | Container for the result of the StartSupportDataExport operation.+--+-- /See:/ 'startSupportDataExportResponse' smart constructor.+data StartSupportDataExportResponse = StartSupportDataExportResponse'+    { _ssdersDataSetRequestId :: !(Maybe Text)+    , _ssdersResponseStatus   :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'StartSupportDataExportResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ssdersDataSetRequestId'+--+-- * 'ssdersResponseStatus'+startSupportDataExportResponse+    :: Int -- ^ 'ssdersResponseStatus'+    -> StartSupportDataExportResponse+startSupportDataExportResponse pResponseStatus_ =+    StartSupportDataExportResponse'+    { _ssdersDataSetRequestId = Nothing+    , _ssdersResponseStatus = pResponseStatus_+    }++-- | A unique identifier representing a specific request to the StartSupportDataExport operation. This identifier can be used to correlate a request with notifications from the SNS topic.+ssdersDataSetRequestId :: Lens' StartSupportDataExportResponse (Maybe Text)+ssdersDataSetRequestId = lens _ssdersDataSetRequestId (\ s a -> s{_ssdersDataSetRequestId = a});++-- | The response status code.+ssdersResponseStatus :: Lens' StartSupportDataExportResponse Int+ssdersResponseStatus = lens _ssdersResponseStatus (\ s a -> s{_ssdersResponseStatus = a});++instance NFData StartSupportDataExportResponse
gen/Network/AWS/MarketplaceAnalytics/Types.hs view
@@ -20,6 +20,9 @@      -- * DataSetType     , DataSetType (..)++    -- * SupportDataSetType+    , SupportDataSetType (..)     ) where  import           Network.AWS.Lens
gen/Network/AWS/MarketplaceAnalytics/Types/Sum.hs view
@@ -92,3 +92,29 @@  instance ToJSON DataSetType where     toJSON = toJSONText++data SupportDataSetType+    = CustomerSupportContactsData+    | TestCustomerSupportContactsData+    deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText SupportDataSetType where+    parser = takeLowerText >>= \case+        "customer_support_contacts_data" -> pure CustomerSupportContactsData+        "test_customer_support_contacts_data" -> pure TestCustomerSupportContactsData+        e -> fromTextError $ "Failure parsing SupportDataSetType from value: '" <> e+           <> "'. Accepted values: customer_support_contacts_data, test_customer_support_contacts_data"++instance ToText SupportDataSetType where+    toText = \case+        CustomerSupportContactsData -> "customer_support_contacts_data"+        TestCustomerSupportContactsData -> "test_customer_support_contacts_data"++instance Hashable     SupportDataSetType+instance NFData       SupportDataSetType+instance ToByteString SupportDataSetType+instance ToQuery      SupportDataSetType+instance ToHeader     SupportDataSetType++instance ToJSON SupportDataSetType where+    toJSON = toJSONText
+ src/.gitkeep view
test/Test/AWS/Gen/MarketplaceAnalytics.hs view
@@ -28,13 +28,19 @@ -- fixtures :: TestTree -- fixtures = --     [ testGroup "request"---         [ requestGenerateDataSet $+--         [ requestStartSupportDataExport $+--             startSupportDataExport+--+--         , requestGenerateDataSet $ --             generateDataSet -- --           ]  --     , testGroup "response"---         [ responseGenerateDataSet $+--         [ responseStartSupportDataExport $+--             startSupportDataExportResponse+--+--         , responseGenerateDataSet $ --             generateDataSetResponse -- --           ]@@ -42,12 +48,24 @@  -- Requests +requestStartSupportDataExport :: StartSupportDataExport -> TestTree+requestStartSupportDataExport = req+    "StartSupportDataExport"+    "fixture/StartSupportDataExport.yaml"+ requestGenerateDataSet :: GenerateDataSet -> TestTree requestGenerateDataSet = req     "GenerateDataSet"     "fixture/GenerateDataSet.yaml"  -- Responses++responseStartSupportDataExport :: StartSupportDataExportResponse -> TestTree+responseStartSupportDataExport = res+    "StartSupportDataExportResponse"+    "fixture/StartSupportDataExportResponse.proto"+    marketplaceAnalytics+    (Proxy :: Proxy StartSupportDataExport)  responseGenerateDataSet :: GenerateDataSetResponse -> TestTree responseGenerateDataSet = res