{-# 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.DeleteBucketPolicy
(
deleteBucketPolicy
, DeleteBucketPolicy
, dbpBucket
, deleteBucketPolicyResponse
, DeleteBucketPolicyResponse
) 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 DeleteBucketPolicy = DeleteBucketPolicy'
{ _dbpBucket :: BucketName
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteBucketPolicy
:: BucketName
-> DeleteBucketPolicy
deleteBucketPolicy pBucket_ = DeleteBucketPolicy' {_dbpBucket = pBucket_}
dbpBucket :: Lens' DeleteBucketPolicy BucketName
dbpBucket = lens _dbpBucket (\ s a -> s{_dbpBucket = a})
instance AWSRequest DeleteBucketPolicy where
type Rs DeleteBucketPolicy =
DeleteBucketPolicyResponse
request = delete s3
response = receiveNull DeleteBucketPolicyResponse'
instance Hashable DeleteBucketPolicy where
instance NFData DeleteBucketPolicy where
instance ToHeaders DeleteBucketPolicy where
toHeaders = const mempty
instance ToPath DeleteBucketPolicy where
toPath DeleteBucketPolicy'{..}
= mconcat ["/", toBS _dbpBucket]
instance ToQuery DeleteBucketPolicy where
toQuery = const (mconcat ["policy"])
data DeleteBucketPolicyResponse =
DeleteBucketPolicyResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteBucketPolicyResponse
:: DeleteBucketPolicyResponse
deleteBucketPolicyResponse = DeleteBucketPolicyResponse'
instance NFData DeleteBucketPolicyResponse where