amazonka-cognito-sync 0.3.1 → 0.3.2
raw patch · 16 files changed
+527/−34 lines, 16 filesdep ~amazonka-core
Dependency ranges changed: amazonka-core
Files
- amazonka-cognito-sync.cabal +4/−2
- gen/Network/AWS/CognitoSync.hs +5/−1
- gen/Network/AWS/CognitoSync/BulkPublish.hs +121/−0
- gen/Network/AWS/CognitoSync/DeleteDataset.hs +5/−2
- gen/Network/AWS/CognitoSync/DescribeDataset.hs +9/−6
- gen/Network/AWS/CognitoSync/DescribeIdentityPoolUsage.hs +4/−0
- gen/Network/AWS/CognitoSync/DescribeIdentityUsage.hs +3/−0
- gen/Network/AWS/CognitoSync/GetBulkPublishDetails.hs +178/−0
- gen/Network/AWS/CognitoSync/GetIdentityPoolConfiguration.hs +14/−3
- gen/Network/AWS/CognitoSync/ListDatasets.hs +7/−4
- gen/Network/AWS/CognitoSync/ListIdentityPoolUsage.hs +4/−0
- gen/Network/AWS/CognitoSync/ListRecords.hs +7/−4
- gen/Network/AWS/CognitoSync/SetIdentityPoolConfiguration.hs +28/−6
- gen/Network/AWS/CognitoSync/Types.hs +133/−0
- gen/Network/AWS/CognitoSync/UnsubscribeFromDataset.hs +1/−1
- gen/Network/AWS/CognitoSync/UpdateRecords.hs +4/−5
amazonka-cognito-sync.cabal view
@@ -1,5 +1,5 @@ name: amazonka-cognito-sync-version: 0.3.1+version: 0.3.2 synopsis: Amazon Cognito Sync SDK. homepage: https://github.com/brendanhay/amazonka license: OtherLicense@@ -40,10 +40,12 @@ exposed-modules: Network.AWS.CognitoSync+ , Network.AWS.CognitoSync.BulkPublish , Network.AWS.CognitoSync.DeleteDataset , Network.AWS.CognitoSync.DescribeDataset , Network.AWS.CognitoSync.DescribeIdentityPoolUsage , Network.AWS.CognitoSync.DescribeIdentityUsage+ , Network.AWS.CognitoSync.GetBulkPublishDetails , Network.AWS.CognitoSync.GetIdentityPoolConfiguration , Network.AWS.CognitoSync.ListDatasets , Network.AWS.CognitoSync.ListIdentityPoolUsage@@ -58,5 +60,5 @@ other-modules: build-depends:- amazonka-core == 0.3.1.*+ amazonka-core == 0.3.2.* , base >= 4.7 && < 5
gen/Network/AWS/CognitoSync.hs view
@@ -19,10 +19,12 @@ -- credentials. User data is persisted in a dataset that can store up to 1 MB of -- key-value pairs, and you can have up to 20 datasets per user identity. module Network.AWS.CognitoSync- ( module Network.AWS.CognitoSync.DeleteDataset+ ( module Network.AWS.CognitoSync.BulkPublish+ , module Network.AWS.CognitoSync.DeleteDataset , module Network.AWS.CognitoSync.DescribeDataset , module Network.AWS.CognitoSync.DescribeIdentityPoolUsage , module Network.AWS.CognitoSync.DescribeIdentityUsage+ , module Network.AWS.CognitoSync.GetBulkPublishDetails , module Network.AWS.CognitoSync.GetIdentityPoolConfiguration , module Network.AWS.CognitoSync.ListDatasets , module Network.AWS.CognitoSync.ListIdentityPoolUsage@@ -35,10 +37,12 @@ , module Network.AWS.CognitoSync.UpdateRecords ) where +import Network.AWS.CognitoSync.BulkPublish import Network.AWS.CognitoSync.DeleteDataset import Network.AWS.CognitoSync.DescribeDataset import Network.AWS.CognitoSync.DescribeIdentityPoolUsage import Network.AWS.CognitoSync.DescribeIdentityUsage+import Network.AWS.CognitoSync.GetBulkPublishDetails import Network.AWS.CognitoSync.GetIdentityPoolConfiguration import Network.AWS.CognitoSync.ListDatasets import Network.AWS.CognitoSync.ListIdentityPoolUsage
+ gen/Network/AWS/CognitoSync/BulkPublish.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.CognitoSync.BulkPublish+-- 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.++-- | Initiates a bulk publish of all existing datasets for an Identity Pool to the+-- configured stream. Customers are limited to one successful bulk publish per+-- 24 hours. Bulk publish is an asynchronous request, customers can see the+-- status of the request via the GetBulkPublishDetails operation.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_BulkPublish.html>+module Network.AWS.CognitoSync.BulkPublish+ (+ -- * Request+ BulkPublish+ -- ** Request constructor+ , bulkPublish+ -- ** Request lenses+ , bpIdentityPoolId++ -- * Response+ , BulkPublishResponse+ -- ** Response constructor+ , bulkPublishResponse+ -- ** Response lenses+ , bprIdentityPoolId+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++newtype BulkPublish = BulkPublish+ { _bpIdentityPoolId :: Text+ } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'BulkPublish' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'bpIdentityPoolId' @::@ 'Text'+--+bulkPublish :: Text -- ^ 'bpIdentityPoolId'+ -> BulkPublish+bulkPublish p1 = BulkPublish+ { _bpIdentityPoolId = p1+ }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.+-- GUID generation is unique within a region.+bpIdentityPoolId :: Lens' BulkPublish Text+bpIdentityPoolId = lens _bpIdentityPoolId (\s a -> s { _bpIdentityPoolId = a })++newtype BulkPublishResponse = BulkPublishResponse+ { _bprIdentityPoolId :: Maybe Text+ } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'BulkPublishResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'bprIdentityPoolId' @::@ 'Maybe' 'Text'+--+bulkPublishResponse :: BulkPublishResponse+bulkPublishResponse = BulkPublishResponse+ { _bprIdentityPoolId = Nothing+ }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.+-- GUID generation is unique within a region.+bprIdentityPoolId :: Lens' BulkPublishResponse (Maybe Text)+bprIdentityPoolId =+ lens _bprIdentityPoolId (\s a -> s { _bprIdentityPoolId = a })++instance ToPath BulkPublish where+ toPath BulkPublish{..} = mconcat+ [ "/identitypools/"+ , toText _bpIdentityPoolId+ , "/bulkpublish"+ ]++instance ToQuery BulkPublish where+ toQuery = const mempty++instance ToHeaders BulkPublish++instance ToJSON BulkPublish where+ toJSON = const (toJSON Empty)++instance AWSRequest BulkPublish where+ type Sv BulkPublish = CognitoSync+ type Rs BulkPublish = BulkPublishResponse++ request = post+ response = jsonResponse++instance FromJSON BulkPublishResponse where+ parseJSON = withObject "BulkPublishResponse" $ \o -> BulkPublishResponse+ <$> o .:? "IdentityPoolId"
gen/Network/AWS/CognitoSync/DeleteDataset.hs view
@@ -24,8 +24,11 @@ -- | Deletes the specific dataset. The dataset will be deleted permanently, and -- the action can't be undone. Datasets that this dataset was merged with will--- no longer report the merge. Any consequent operation on this dataset will--- result in a ResourceNotFoundException.+-- no longer report the merge. Any subsequent operation on this dataset will+-- result in a 'ResourceNotFoundException'.+--+-- 'DeleteDataset' can be called with temporary user credentials provided by+-- Cognito Identity or with developer credentials. -- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DeleteDataset.html> module Network.AWS.CognitoSync.DeleteDataset
gen/Network/AWS/CognitoSync/DescribeDataset.hs view
@@ -22,12 +22,15 @@ -- -- Derived from AWS service descriptions, licensed under Apache 2.0. --- | Gets metadata about a dataset by identity and dataset name. The credentials--- used to make this API call need to have access to the identity data. With--- Amazon Cognito Sync, each identity has access only to its own data. You--- should use Amazon Cognito Identity service to retrieve the credentials--- necessary to make this API call.+-- | Gets meta data about a dataset by identity and dataset name. With Amazon+-- Cognito Sync, each identity has access only to its own data. Thus, the+-- credentials used to make this API call need to have access to the identity+-- data. --+-- 'DescribeDataset' can be called with temporary user credentials provided by+-- Cognito Identity or with developer credentials. You should use Cognito+-- Identity credentials to make this API call.+-- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeDataset.html> module Network.AWS.CognitoSync.DescribeDataset (@@ -111,7 +114,7 @@ { _ddrDataset = Nothing } --- | Metadata for a collection of data for an identity. An identity can have+-- | Meta data for a collection of data for an identity. An identity can have -- multiple datasets. A dataset can be general or associated with a particular -- entity in an application (like a saved game). Datasets are automatically -- created if they don't exist. Data is synced by dataset, and a dataset can
gen/Network/AWS/CognitoSync/DescribeIdentityPoolUsage.hs view
@@ -25,6 +25,10 @@ -- | Gets usage details (for example, data storage) about a particular identity -- pool. --+-- 'DescribeIdentityPoolUsage' can only be called with developer credentials. You+-- cannot make this API call with the temporary user credentials provided by+-- Cognito Identity.+-- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeIdentityPoolUsage.html> module Network.AWS.CognitoSync.DescribeIdentityPoolUsage (
gen/Network/AWS/CognitoSync/DescribeIdentityUsage.hs view
@@ -25,6 +25,9 @@ -- | Gets usage information for an identity, including number of datasets and data -- usage. --+-- 'DescribeIdentityUsage' can be called with temporary user credentials provided+-- by Cognito Identity or with developer credentials.+-- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeIdentityUsage.html> module Network.AWS.CognitoSync.DescribeIdentityUsage (
+ gen/Network/AWS/CognitoSync/GetBulkPublishDetails.hs view
@@ -0,0 +1,178 @@+{-# 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.CognitoSync.GetBulkPublishDetails+-- 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.++-- | Get the status of the last BulkPublish operation for an identity pool.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_GetBulkPublishDetails.html>+module Network.AWS.CognitoSync.GetBulkPublishDetails+ (+ -- * Request+ GetBulkPublishDetails+ -- ** Request constructor+ , getBulkPublishDetails+ -- ** Request lenses+ , gbpdIdentityPoolId++ -- * Response+ , GetBulkPublishDetailsResponse+ -- ** Response constructor+ , getBulkPublishDetailsResponse+ -- ** Response lenses+ , gbpdrBulkPublishCompleteTime+ , gbpdrBulkPublishStartTime+ , gbpdrBulkPublishStatus+ , gbpdrFailureMessage+ , gbpdrIdentityPoolId+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++newtype GetBulkPublishDetails = GetBulkPublishDetails+ { _gbpdIdentityPoolId :: Text+ } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'GetBulkPublishDetails' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbpdIdentityPoolId' @::@ 'Text'+--+getBulkPublishDetails :: Text -- ^ 'gbpdIdentityPoolId'+ -> GetBulkPublishDetails+getBulkPublishDetails p1 = GetBulkPublishDetails+ { _gbpdIdentityPoolId = p1+ }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.+-- GUID generation is unique within a region.+gbpdIdentityPoolId :: Lens' GetBulkPublishDetails Text+gbpdIdentityPoolId =+ lens _gbpdIdentityPoolId (\s a -> s { _gbpdIdentityPoolId = a })++data GetBulkPublishDetailsResponse = GetBulkPublishDetailsResponse+ { _gbpdrBulkPublishCompleteTime :: Maybe POSIX+ , _gbpdrBulkPublishStartTime :: Maybe POSIX+ , _gbpdrBulkPublishStatus :: Maybe BulkPublishStatus+ , _gbpdrFailureMessage :: Maybe Text+ , _gbpdrIdentityPoolId :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'GetBulkPublishDetailsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbpdrBulkPublishCompleteTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'gbpdrBulkPublishStartTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'gbpdrBulkPublishStatus' @::@ 'Maybe' 'BulkPublishStatus'+--+-- * 'gbpdrFailureMessage' @::@ 'Maybe' 'Text'+--+-- * 'gbpdrIdentityPoolId' @::@ 'Maybe' 'Text'+--+getBulkPublishDetailsResponse :: GetBulkPublishDetailsResponse+getBulkPublishDetailsResponse = GetBulkPublishDetailsResponse+ { _gbpdrIdentityPoolId = Nothing+ , _gbpdrBulkPublishStartTime = Nothing+ , _gbpdrBulkPublishCompleteTime = Nothing+ , _gbpdrBulkPublishStatus = Nothing+ , _gbpdrFailureMessage = Nothing+ }++-- | If 'BulkPublishStatus' is SUCCEEDED, the time the last bulk publish operation+-- completed.+gbpdrBulkPublishCompleteTime :: Lens' GetBulkPublishDetailsResponse (Maybe UTCTime)+gbpdrBulkPublishCompleteTime =+ lens _gbpdrBulkPublishCompleteTime+ (\s a -> s { _gbpdrBulkPublishCompleteTime = a })+ . mapping _Time++-- | The date/time at which the last bulk publish was initiated.+gbpdrBulkPublishStartTime :: Lens' GetBulkPublishDetailsResponse (Maybe UTCTime)+gbpdrBulkPublishStartTime =+ lens _gbpdrBulkPublishStartTime+ (\s a -> s { _gbpdrBulkPublishStartTime = a })+ . mapping _Time++-- | Status of the last bulk publish operation, valid values are: 'NOT_STARTED' - No+-- bulk publish has been requested for this identity pool+--+-- 'IN_PROGRESS' - Data is being published to the configured stream+--+-- 'SUCCEEDED' - All data for the identity pool has been published to the+-- configured stream+--+-- 'FAILED' - Some portion of the data has failed to publish, check 'FailureMessage'+-- for the cause.+gbpdrBulkPublishStatus :: Lens' GetBulkPublishDetailsResponse (Maybe BulkPublishStatus)+gbpdrBulkPublishStatus =+ lens _gbpdrBulkPublishStatus (\s a -> s { _gbpdrBulkPublishStatus = a })++-- | If BulkPublishStatus is FAILED this field will contain the error message that+-- caused the bulk publish to fail.+gbpdrFailureMessage :: Lens' GetBulkPublishDetailsResponse (Maybe Text)+gbpdrFailureMessage =+ lens _gbpdrFailureMessage (\s a -> s { _gbpdrFailureMessage = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.+-- GUID generation is unique within a region.+gbpdrIdentityPoolId :: Lens' GetBulkPublishDetailsResponse (Maybe Text)+gbpdrIdentityPoolId =+ lens _gbpdrIdentityPoolId (\s a -> s { _gbpdrIdentityPoolId = a })++instance ToPath GetBulkPublishDetails where+ toPath GetBulkPublishDetails{..} = mconcat+ [ "/identitypools/"+ , toText _gbpdIdentityPoolId+ , "/getBulkPublishDetails"+ ]++instance ToQuery GetBulkPublishDetails where+ toQuery = const mempty++instance ToHeaders GetBulkPublishDetails++instance ToJSON GetBulkPublishDetails where+ toJSON = const (toJSON Empty)++instance AWSRequest GetBulkPublishDetails where+ type Sv GetBulkPublishDetails = CognitoSync+ type Rs GetBulkPublishDetails = GetBulkPublishDetailsResponse++ request = post+ response = jsonResponse++instance FromJSON GetBulkPublishDetailsResponse where+ parseJSON = withObject "GetBulkPublishDetailsResponse" $ \o -> GetBulkPublishDetailsResponse+ <$> o .:? "BulkPublishCompleteTime"+ <*> o .:? "BulkPublishStartTime"+ <*> o .:? "BulkPublishStatus"+ <*> o .:? "FailureMessage"+ <*> o .:? "IdentityPoolId"
gen/Network/AWS/CognitoSync/GetIdentityPoolConfiguration.hs view
@@ -39,6 +39,7 @@ -- ** Response constructor , getIdentityPoolConfigurationResponse -- ** Response lenses+ , gipcrCognitoStreams , gipcrIdentityPoolId , gipcrPushSync ) where@@ -72,7 +73,8 @@ lens _gipcIdentityPoolId (\s a -> s { _gipcIdentityPoolId = a }) data GetIdentityPoolConfigurationResponse = GetIdentityPoolConfigurationResponse- { _gipcrIdentityPoolId :: Maybe Text+ { _gipcrCognitoStreams :: Maybe CognitoStreams+ , _gipcrIdentityPoolId :: Maybe Text , _gipcrPushSync :: Maybe PushSync } deriving (Eq, Read, Show) @@ -80,6 +82,8 @@ -- -- The fields accessible through corresponding lenses are: --+-- * 'gipcrCognitoStreams' @::@ 'Maybe' 'CognitoStreams'+-- -- * 'gipcrIdentityPoolId' @::@ 'Maybe' 'Text' -- -- * 'gipcrPushSync' @::@ 'Maybe' 'PushSync'@@ -88,15 +92,21 @@ getIdentityPoolConfigurationResponse = GetIdentityPoolConfigurationResponse { _gipcrIdentityPoolId = Nothing , _gipcrPushSync = Nothing+ , _gipcrCognitoStreams = Nothing } +-- | Options to apply to this identity pool for Amazon Cognito streams.+gipcrCognitoStreams :: Lens' GetIdentityPoolConfigurationResponse (Maybe CognitoStreams)+gipcrCognitoStreams =+ lens _gipcrCognitoStreams (\s a -> s { _gipcrCognitoStreams = a })+ -- | A name-spaced GUID (for example, -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. gipcrIdentityPoolId :: Lens' GetIdentityPoolConfigurationResponse (Maybe Text) gipcrIdentityPoolId = lens _gipcrIdentityPoolId (\s a -> s { _gipcrIdentityPoolId = a }) --- | Configuration options applied to the identity pool.+-- | Options to apply to this identity pool for push synchronization. gipcrPushSync :: Lens' GetIdentityPoolConfigurationResponse (Maybe PushSync) gipcrPushSync = lens _gipcrPushSync (\s a -> s { _gipcrPushSync = a }) @@ -124,5 +134,6 @@ instance FromJSON GetIdentityPoolConfigurationResponse where parseJSON = withObject "GetIdentityPoolConfigurationResponse" $ \o -> GetIdentityPoolConfigurationResponse- <$> o .:? "IdentityPoolId"+ <$> o .:? "CognitoStreams"+ <*> o .:? "IdentityPoolId" <*> o .:? "PushSync"
gen/Network/AWS/CognitoSync/ListDatasets.hs view
@@ -22,10 +22,13 @@ -- -- Derived from AWS service descriptions, licensed under Apache 2.0. --- | Lists datasets for an identity. The credentials used to make this API call--- need to have access to the identity data. With Amazon Cognito Sync, each--- identity has access only to its own data. You should use Amazon Cognito--- Identity service to retrieve the credentials necessary to make this API call.+-- | Lists datasets for an identity. With Amazon Cognito Sync, each identity has+-- access only to its own data. Thus, the credentials used to make this API call+-- need to have access to the identity data.+--+-- 'ListDatasets' can be called with temporary user credentials provided by+-- Cognito Identity or with developer credentials. You should use the Cognito+-- Identity credentials to make this API call. -- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListDatasets.html> module Network.AWS.CognitoSync.ListDatasets
gen/Network/AWS/CognitoSync/ListIdentityPoolUsage.hs view
@@ -24,6 +24,10 @@ -- | Gets a list of identity pools registered with Cognito. --+-- 'ListIdentityPoolUsage' can only be called with developer credentials. You+-- cannot make this API call with the temporary user credentials provided by+-- Cognito Identity.+-- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListIdentityPoolUsage.html> module Network.AWS.CognitoSync.ListIdentityPoolUsage (
gen/Network/AWS/CognitoSync/ListRecords.hs view
@@ -23,10 +23,13 @@ -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | Gets paginated records, optionally changed after a particular sync count for--- a dataset and identity. The credentials used to make this API call need to--- have access to the identity data. With Amazon Cognito Sync, each identity has--- access only to its own data. You should use Amazon Cognito Identity service--- to retrieve the credentials necessary to make this API call.+-- a dataset and identity. With Amazon Cognito Sync, each identity has access+-- only to its own data. Thus, the credentials used to make this API call need+-- to have access to the identity data.+--+-- 'ListRecords' can be called with temporary user credentials provided by+-- Cognito Identity or with developer credentials. You should use Cognito+-- Identity credentials to make this API call. -- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListRecords.html> module Network.AWS.CognitoSync.ListRecords
gen/Network/AWS/CognitoSync/SetIdentityPoolConfiguration.hs view
@@ -32,6 +32,7 @@ -- ** Request constructor , setIdentityPoolConfiguration -- ** Request lenses+ , sipcCognitoStreams , sipcIdentityPoolId , sipcPushSync @@ -40,6 +41,7 @@ -- ** Response constructor , setIdentityPoolConfigurationResponse -- ** Response lenses+ , sipcrCognitoStreams , sipcrIdentityPoolId , sipcrPushSync ) where@@ -50,7 +52,8 @@ import qualified GHC.Exts data SetIdentityPoolConfiguration = SetIdentityPoolConfiguration- { _sipcIdentityPoolId :: Text+ { _sipcCognitoStreams :: Maybe CognitoStreams+ , _sipcIdentityPoolId :: Text , _sipcPushSync :: Maybe PushSync } deriving (Eq, Read, Show) @@ -58,6 +61,8 @@ -- -- The fields accessible through corresponding lenses are: --+-- * 'sipcCognitoStreams' @::@ 'Maybe' 'CognitoStreams'+-- -- * 'sipcIdentityPoolId' @::@ 'Text' -- -- * 'sipcPushSync' @::@ 'Maybe' 'PushSync'@@ -67,8 +72,14 @@ setIdentityPoolConfiguration p1 = SetIdentityPoolConfiguration { _sipcIdentityPoolId = p1 , _sipcPushSync = Nothing+ , _sipcCognitoStreams = Nothing } +-- | Options to apply to this identity pool for Amazon Cognito streams.+sipcCognitoStreams :: Lens' SetIdentityPoolConfiguration (Maybe CognitoStreams)+sipcCognitoStreams =+ lens _sipcCognitoStreams (\s a -> s { _sipcCognitoStreams = a })+ -- | A name-spaced GUID (for example, -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. -- This is the ID of the pool to modify.@@ -76,12 +87,13 @@ sipcIdentityPoolId = lens _sipcIdentityPoolId (\s a -> s { _sipcIdentityPoolId = a }) --- | Configuration options to be applied to the identity pool.+-- | Options to apply to this identity pool for push synchronization. sipcPushSync :: Lens' SetIdentityPoolConfiguration (Maybe PushSync) sipcPushSync = lens _sipcPushSync (\s a -> s { _sipcPushSync = a }) data SetIdentityPoolConfigurationResponse = SetIdentityPoolConfigurationResponse- { _sipcrIdentityPoolId :: Maybe Text+ { _sipcrCognitoStreams :: Maybe CognitoStreams+ , _sipcrIdentityPoolId :: Maybe Text , _sipcrPushSync :: Maybe PushSync } deriving (Eq, Read, Show) @@ -89,6 +101,8 @@ -- -- The fields accessible through corresponding lenses are: --+-- * 'sipcrCognitoStreams' @::@ 'Maybe' 'CognitoStreams'+-- -- * 'sipcrIdentityPoolId' @::@ 'Maybe' 'Text' -- -- * 'sipcrPushSync' @::@ 'Maybe' 'PushSync'@@ -97,15 +111,21 @@ setIdentityPoolConfigurationResponse = SetIdentityPoolConfigurationResponse { _sipcrIdentityPoolId = Nothing , _sipcrPushSync = Nothing+ , _sipcrCognitoStreams = Nothing } +-- | Options to apply to this identity pool for Amazon Cognito streams.+sipcrCognitoStreams :: Lens' SetIdentityPoolConfigurationResponse (Maybe CognitoStreams)+sipcrCognitoStreams =+ lens _sipcrCognitoStreams (\s a -> s { _sipcrCognitoStreams = a })+ -- | A name-spaced GUID (for example, -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. sipcrIdentityPoolId :: Lens' SetIdentityPoolConfigurationResponse (Maybe Text) sipcrIdentityPoolId = lens _sipcrIdentityPoolId (\s a -> s { _sipcrIdentityPoolId = a }) --- | Configuration options applied to the identity pool.+-- | Options to apply to this identity pool for push synchronization. sipcrPushSync :: Lens' SetIdentityPoolConfigurationResponse (Maybe PushSync) sipcrPushSync = lens _sipcrPushSync (\s a -> s { _sipcrPushSync = a }) @@ -123,7 +143,8 @@ instance ToJSON SetIdentityPoolConfiguration where toJSON SetIdentityPoolConfiguration{..} = object- [ "PushSync" .= _sipcPushSync+ [ "PushSync" .= _sipcPushSync+ , "CognitoStreams" .= _sipcCognitoStreams ] instance AWSRequest SetIdentityPoolConfiguration where@@ -135,5 +156,6 @@ instance FromJSON SetIdentityPoolConfigurationResponse where parseJSON = withObject "SetIdentityPoolConfigurationResponse" $ \o -> SetIdentityPoolConfigurationResponse- <$> o .:? "IdentityPoolId"+ <$> o .:? "CognitoStreams"+ <*> o .:? "IdentityPoolId" <*> o .:? "PushSync"
gen/Network/AWS/CognitoSync/Types.hs view
@@ -55,6 +55,12 @@ -- * Operation , Operation (..) + -- * StreamingStatus+ , StreamingStatus (..)++ -- * BulkPublishStatus+ , BulkPublishStatus (..)+ -- * Record , Record , record@@ -65,6 +71,13 @@ , rSyncCount , rValue + -- * CognitoStreams+ , CognitoStreams+ , cognitoStreams+ , csRoleArn+ , csStreamName+ , csStreamingStatus+ -- * IdentityUsage , IdentityUsage , identityUsage@@ -356,6 +369,70 @@ instance ToJSON Operation where toJSON = toJSONText +data StreamingStatus+ = Disabled -- ^ DISABLED+ | Enabled -- ^ ENABLED+ deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable StreamingStatus++instance FromText StreamingStatus where+ parser = takeLowerText >>= \case+ "disabled" -> pure Disabled+ "enabled" -> pure Enabled+ e -> fail $+ "Failure parsing StreamingStatus from " ++ show e++instance ToText StreamingStatus where+ toText = \case+ Disabled -> "DISABLED"+ Enabled -> "ENABLED"++instance ToByteString StreamingStatus+instance ToHeader StreamingStatus+instance ToQuery StreamingStatus++instance FromJSON StreamingStatus where+ parseJSON = parseJSONText "StreamingStatus"++instance ToJSON StreamingStatus where+ toJSON = toJSONText++data BulkPublishStatus+ = Failed -- ^ FAILED+ | InProgress -- ^ IN_PROGRESS+ | NotStarted -- ^ NOT_STARTED+ | Succeeded -- ^ SUCCEEDED+ deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable BulkPublishStatus++instance FromText BulkPublishStatus where+ parser = takeLowerText >>= \case+ "failed" -> pure Failed+ "in_progress" -> pure InProgress+ "not_started" -> pure NotStarted+ "succeeded" -> pure Succeeded+ e -> fail $+ "Failure parsing BulkPublishStatus from " ++ show e++instance ToText BulkPublishStatus where+ toText = \case+ Failed -> "FAILED"+ InProgress -> "IN_PROGRESS"+ NotStarted -> "NOT_STARTED"+ Succeeded -> "SUCCEEDED"++instance ToByteString BulkPublishStatus+instance ToHeader BulkPublishStatus+instance ToQuery BulkPublishStatus++instance FromJSON BulkPublishStatus where+ parseJSON = parseJSONText "BulkPublishStatus"++instance ToJSON BulkPublishStatus where+ toJSON = toJSONText+ data Record = Record { _rDeviceLastModifiedDate :: Maybe POSIX , _rKey :: Maybe Text@@ -436,6 +513,62 @@ , "LastModifiedDate" .= _rLastModifiedDate , "LastModifiedBy" .= _rLastModifiedBy , "DeviceLastModifiedDate" .= _rDeviceLastModifiedDate+ ]++data CognitoStreams = CognitoStreams+ { _csRoleArn :: Maybe Text+ , _csStreamName :: Maybe Text+ , _csStreamingStatus :: Maybe StreamingStatus+ } deriving (Eq, Read, Show)++-- | 'CognitoStreams' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'csRoleArn' @::@ 'Maybe' 'Text'+--+-- * 'csStreamName' @::@ 'Maybe' 'Text'+--+-- * 'csStreamingStatus' @::@ 'Maybe' 'StreamingStatus'+--+cognitoStreams :: CognitoStreams+cognitoStreams = CognitoStreams+ { _csStreamName = Nothing+ , _csRoleArn = Nothing+ , _csStreamingStatus = Nothing+ }++-- | The ARN of the role Amazon Cognito can assume in order to publish to the+-- stream. This role must grant access to Amazon Cognito (cognito-sync) to+-- invoke 'PutRecord' on your Cognito stream.+csRoleArn :: Lens' CognitoStreams (Maybe Text)+csRoleArn = lens _csRoleArn (\s a -> s { _csRoleArn = a })++-- | The name of the Cognito stream to receive updates. This stream must be in the+-- developers account and in the same region as the identity pool.+csStreamName :: Lens' CognitoStreams (Maybe Text)+csStreamName = lens _csStreamName (\s a -> s { _csStreamName = a })++-- | Status of the Cognito streams. Valid values are: 'ENABLED' - Streaming of+-- updates to identity pool is enabled.+--+-- 'DISABLED'Streaming of updates to identity pool is disabled. Bulk publish will+-- also fail if 'StreamingStatus' is 'DISABLED'.+csStreamingStatus :: Lens' CognitoStreams (Maybe StreamingStatus)+csStreamingStatus =+ lens _csStreamingStatus (\s a -> s { _csStreamingStatus = a })++instance FromJSON CognitoStreams where+ parseJSON = withObject "CognitoStreams" $ \o -> CognitoStreams+ <$> o .:? "RoleArn"+ <*> o .:? "StreamName"+ <*> o .:? "StreamingStatus"++instance ToJSON CognitoStreams where+ toJSON CognitoStreams{..} = object+ [ "StreamName" .= _csStreamName+ , "RoleArn" .= _csRoleArn+ , "StreamingStatus" .= _csStreamingStatus ] data IdentityUsage = IdentityUsage
gen/Network/AWS/CognitoSync/UnsubscribeFromDataset.hs view
@@ -22,7 +22,7 @@ -- -- Derived from AWS service descriptions, licensed under Apache 2.0. --- | Unsubscribe from receiving notifications when a dataset is modified by+-- | Unsubscribes from receiving notifications when a dataset is modified by -- another device. -- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_UnsubscribeFromDataset.html>
gen/Network/AWS/CognitoSync/UpdateRecords.hs view
@@ -22,11 +22,10 @@ -- -- Derived from AWS service descriptions, licensed under Apache 2.0. --- | Posts updates to records and add and delete records for a dataset and user.--- The credentials used to make this API call need to have access to the--- identity data. With Amazon Cognito Sync, each identity has access only to its--- own data. You should use Amazon Cognito Identity service to retrieve the--- credentials necessary to make this API call.+-- | Posts updates to records and adds and deletes records for a dataset and user.+--+-- 'UpdateRecords' can only be called with temporary user credentials provided by+-- Cognito Identity. You cannot make this API call with developer credentials. -- -- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_UpdateRecords.html> module Network.AWS.CognitoSync.UpdateRecords