{-# 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.PutBucketLifecycleConfiguration
(
putBucketLifecycleConfiguration
, PutBucketLifecycleConfiguration
, pblcLifecycleConfiguration
, pblcBucket
, putBucketLifecycleConfigurationResponse
, PutBucketLifecycleConfigurationResponse
) 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
data PutBucketLifecycleConfiguration = PutBucketLifecycleConfiguration'
{ _pblcLifecycleConfiguration :: !(Maybe BucketLifecycleConfiguration)
, _pblcBucket :: !BucketName
} deriving (Eq, Read, Show, Data, Typeable, Generic)
putBucketLifecycleConfiguration
:: BucketName
-> PutBucketLifecycleConfiguration
putBucketLifecycleConfiguration pBucket_ =
PutBucketLifecycleConfiguration'
{_pblcLifecycleConfiguration = Nothing, _pblcBucket = pBucket_}
pblcLifecycleConfiguration :: Lens' PutBucketLifecycleConfiguration (Maybe BucketLifecycleConfiguration)
pblcLifecycleConfiguration = lens _pblcLifecycleConfiguration (\ s a -> s{_pblcLifecycleConfiguration = a})
pblcBucket :: Lens' PutBucketLifecycleConfiguration BucketName
pblcBucket = lens _pblcBucket (\ s a -> s{_pblcBucket = a})
instance AWSRequest PutBucketLifecycleConfiguration
where
type Rs PutBucketLifecycleConfiguration =
PutBucketLifecycleConfigurationResponse
request = putXML s3
response
= receiveNull
PutBucketLifecycleConfigurationResponse'
instance Hashable PutBucketLifecycleConfiguration
where
instance NFData PutBucketLifecycleConfiguration where
instance ToElement PutBucketLifecycleConfiguration
where
toElement
= mkElement
"{http://s3.amazonaws.com/doc/2006-03-01/}LifecycleConfiguration"
.
_pblcLifecycleConfiguration
instance ToHeaders PutBucketLifecycleConfiguration
where
toHeaders = const mempty
instance ToPath PutBucketLifecycleConfiguration where
toPath PutBucketLifecycleConfiguration'{..}
= mconcat ["/", toBS _pblcBucket]
instance ToQuery PutBucketLifecycleConfiguration
where
toQuery = const (mconcat ["lifecycle"])
data PutBucketLifecycleConfigurationResponse =
PutBucketLifecycleConfigurationResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
putBucketLifecycleConfigurationResponse
:: PutBucketLifecycleConfigurationResponse
putBucketLifecycleConfigurationResponse =
PutBucketLifecycleConfigurationResponse'
instance NFData
PutBucketLifecycleConfigurationResponse
where