{-# 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 #-}
module Network.AWS.S3.GetBucketNotificationConfiguration
(
getBucketNotificationConfiguration
, GetBucketNotificationConfiguration
, gbncBucket
, notificationConfiguration
, NotificationConfiguration
, ncQueueConfigurations
, ncTopicConfigurations
, ncLambdaFunctionConfigurations
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.S3.Types
import Network.AWS.S3.Types.Product
newtype GetBucketNotificationConfiguration = GetBucketNotificationConfiguration'
{ _gbncBucket :: BucketName
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getBucketNotificationConfiguration
:: BucketName
-> GetBucketNotificationConfiguration
getBucketNotificationConfiguration pBucket_ =
GetBucketNotificationConfiguration'
{ _gbncBucket = pBucket_
}
gbncBucket :: Lens' GetBucketNotificationConfiguration BucketName
gbncBucket = lens _gbncBucket (\ s a -> s{_gbncBucket = a});
instance AWSRequest
GetBucketNotificationConfiguration where
type Rs GetBucketNotificationConfiguration =
NotificationConfiguration
request = get s3
response = receiveXML (\ s h x -> parseXML x)
instance Hashable GetBucketNotificationConfiguration
instance NFData GetBucketNotificationConfiguration
instance ToHeaders GetBucketNotificationConfiguration
where
toHeaders = const mempty
instance ToPath GetBucketNotificationConfiguration
where
toPath GetBucketNotificationConfiguration'{..}
= mconcat ["/", toBS _gbncBucket]
instance ToQuery GetBucketNotificationConfiguration
where
toQuery = const (mconcat ["notification"])