{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.S3.PutBucketPolicy
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are
-- using an identity other than the root user of the Amazon Web Services
-- account that owns the bucket, the calling identity must have the
-- @PutBucketPolicy@ permissions on the specified bucket and belong to the
-- bucket owner\'s account in order to use this operation.
--
-- If you don\'t have @PutBucketPolicy@ permissions, Amazon S3 returns a
-- @403 Access Denied@ error. If you have the correct permissions, but
-- you\'re not using an identity that belongs to the bucket owner\'s
-- account, Amazon S3 returns a @405 Method Not Allowed@ error.
--
-- As a security precaution, the root user of the Amazon Web Services
-- account that owns a bucket can always use this operation, even if the
-- policy explicitly denies the root user the ability to perform this
-- action.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html Bucket policy examples>.
--
-- The following operations are related to @PutBucketPolicy@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html CreateBucket>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html DeleteBucket>
module Amazonka.S3.PutBucketPolicy
  ( -- * Creating a Request
    PutBucketPolicy (..),
    newPutBucketPolicy,

    -- * Request Lenses
    putBucketPolicy_confirmRemoveSelfBucketAccess,
    putBucketPolicy_contentMD5,
    putBucketPolicy_expectedBucketOwner,
    putBucketPolicy_bucket,
    putBucketPolicy_policy,

    -- * Destructuring the Response
    PutBucketPolicyResponse (..),
    newPutBucketPolicyResponse,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types

-- | /See:/ 'newPutBucketPolicy' smart constructor.
data PutBucketPolicy = PutBucketPolicy'
  { -- | Set this parameter to true to confirm that you want to remove your
    -- permissions to change this bucket policy in the future.
    PutBucketPolicy -> Maybe Bool
confirmRemoveSelfBucketAccess :: Prelude.Maybe Prelude.Bool,
    -- | The MD5 hash of the request body.
    --
    -- For requests made using the Amazon Web Services Command Line Interface
    -- (CLI) or Amazon Web Services SDKs, this field is calculated
    -- automatically.
    PutBucketPolicy -> Maybe Text
contentMD5 :: Prelude.Maybe Prelude.Text,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request will fail with an HTTP
    -- @403 (Access Denied)@ error.
    PutBucketPolicy -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket.
    PutBucketPolicy -> BucketName
bucket :: BucketName,
    -- | The bucket policy as a JSON document.
    PutBucketPolicy -> ByteString
policy :: Prelude.ByteString
  }
  deriving (PutBucketPolicy -> PutBucketPolicy -> Bool
(PutBucketPolicy -> PutBucketPolicy -> Bool)
-> (PutBucketPolicy -> PutBucketPolicy -> Bool)
-> Eq PutBucketPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBucketPolicy -> PutBucketPolicy -> Bool
$c/= :: PutBucketPolicy -> PutBucketPolicy -> Bool
== :: PutBucketPolicy -> PutBucketPolicy -> Bool
$c== :: PutBucketPolicy -> PutBucketPolicy -> Bool
Prelude.Eq, Int -> PutBucketPolicy -> ShowS
[PutBucketPolicy] -> ShowS
PutBucketPolicy -> String
(Int -> PutBucketPolicy -> ShowS)
-> (PutBucketPolicy -> String)
-> ([PutBucketPolicy] -> ShowS)
-> Show PutBucketPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBucketPolicy] -> ShowS
$cshowList :: [PutBucketPolicy] -> ShowS
show :: PutBucketPolicy -> String
$cshow :: PutBucketPolicy -> String
showsPrec :: Int -> PutBucketPolicy -> ShowS
$cshowsPrec :: Int -> PutBucketPolicy -> ShowS
Prelude.Show, (forall x. PutBucketPolicy -> Rep PutBucketPolicy x)
-> (forall x. Rep PutBucketPolicy x -> PutBucketPolicy)
-> Generic PutBucketPolicy
forall x. Rep PutBucketPolicy x -> PutBucketPolicy
forall x. PutBucketPolicy -> Rep PutBucketPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutBucketPolicy x -> PutBucketPolicy
$cfrom :: forall x. PutBucketPolicy -> Rep PutBucketPolicy x
Prelude.Generic)

-- |
-- Create a value of 'PutBucketPolicy' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'confirmRemoveSelfBucketAccess', 'putBucketPolicy_confirmRemoveSelfBucketAccess' - Set this parameter to true to confirm that you want to remove your
-- permissions to change this bucket policy in the future.
--
-- 'contentMD5', 'putBucketPolicy_contentMD5' - The MD5 hash of the request body.
--
-- For requests made using the Amazon Web Services Command Line Interface
-- (CLI) or Amazon Web Services SDKs, this field is calculated
-- automatically.
--
-- 'expectedBucketOwner', 'putBucketPolicy_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- 'bucket', 'putBucketPolicy_bucket' - The name of the bucket.
--
-- 'policy', 'putBucketPolicy_policy' - The bucket policy as a JSON document.
newPutBucketPolicy ::
  -- | 'bucket'
  BucketName ->
  -- | 'policy'
  Prelude.ByteString ->
  PutBucketPolicy
newPutBucketPolicy :: BucketName -> ByteString -> PutBucketPolicy
newPutBucketPolicy BucketName
pBucket_ ByteString
pPolicy_ =
  PutBucketPolicy' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> BucketName
-> ByteString
-> PutBucketPolicy
PutBucketPolicy'
    { $sel:confirmRemoveSelfBucketAccess:PutBucketPolicy' :: Maybe Bool
confirmRemoveSelfBucketAccess =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:contentMD5:PutBucketPolicy' :: Maybe Text
contentMD5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:PutBucketPolicy' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:PutBucketPolicy' :: BucketName
bucket = BucketName
pBucket_,
      $sel:policy:PutBucketPolicy' :: ByteString
policy = ByteString
pPolicy_
    }

-- | Set this parameter to true to confirm that you want to remove your
-- permissions to change this bucket policy in the future.
putBucketPolicy_confirmRemoveSelfBucketAccess :: Lens.Lens' PutBucketPolicy (Prelude.Maybe Prelude.Bool)
putBucketPolicy_confirmRemoveSelfBucketAccess :: (Maybe Bool -> f (Maybe Bool))
-> PutBucketPolicy -> f PutBucketPolicy
putBucketPolicy_confirmRemoveSelfBucketAccess = (PutBucketPolicy -> Maybe Bool)
-> (PutBucketPolicy -> Maybe Bool -> PutBucketPolicy)
-> Lens PutBucketPolicy PutBucketPolicy (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketPolicy' {Maybe Bool
confirmRemoveSelfBucketAccess :: Maybe Bool
$sel:confirmRemoveSelfBucketAccess:PutBucketPolicy' :: PutBucketPolicy -> Maybe Bool
confirmRemoveSelfBucketAccess} -> Maybe Bool
confirmRemoveSelfBucketAccess) (\s :: PutBucketPolicy
s@PutBucketPolicy' {} Maybe Bool
a -> PutBucketPolicy
s {$sel:confirmRemoveSelfBucketAccess:PutBucketPolicy' :: Maybe Bool
confirmRemoveSelfBucketAccess = Maybe Bool
a} :: PutBucketPolicy)

-- | The MD5 hash of the request body.
--
-- For requests made using the Amazon Web Services Command Line Interface
-- (CLI) or Amazon Web Services SDKs, this field is calculated
-- automatically.
putBucketPolicy_contentMD5 :: Lens.Lens' PutBucketPolicy (Prelude.Maybe Prelude.Text)
putBucketPolicy_contentMD5 :: (Maybe Text -> f (Maybe Text))
-> PutBucketPolicy -> f PutBucketPolicy
putBucketPolicy_contentMD5 = (PutBucketPolicy -> Maybe Text)
-> (PutBucketPolicy -> Maybe Text -> PutBucketPolicy)
-> Lens PutBucketPolicy PutBucketPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketPolicy' {Maybe Text
contentMD5 :: Maybe Text
$sel:contentMD5:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
contentMD5} -> Maybe Text
contentMD5) (\s :: PutBucketPolicy
s@PutBucketPolicy' {} Maybe Text
a -> PutBucketPolicy
s {$sel:contentMD5:PutBucketPolicy' :: Maybe Text
contentMD5 = Maybe Text
a} :: PutBucketPolicy)

-- | The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
putBucketPolicy_expectedBucketOwner :: Lens.Lens' PutBucketPolicy (Prelude.Maybe Prelude.Text)
putBucketPolicy_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> PutBucketPolicy -> f PutBucketPolicy
putBucketPolicy_expectedBucketOwner = (PutBucketPolicy -> Maybe Text)
-> (PutBucketPolicy -> Maybe Text -> PutBucketPolicy)
-> Lens PutBucketPolicy PutBucketPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketPolicy' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: PutBucketPolicy
s@PutBucketPolicy' {} Maybe Text
a -> PutBucketPolicy
s {$sel:expectedBucketOwner:PutBucketPolicy' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: PutBucketPolicy)

-- | The name of the bucket.
putBucketPolicy_bucket :: Lens.Lens' PutBucketPolicy BucketName
putBucketPolicy_bucket :: (BucketName -> f BucketName)
-> PutBucketPolicy -> f PutBucketPolicy
putBucketPolicy_bucket = (PutBucketPolicy -> BucketName)
-> (PutBucketPolicy -> BucketName -> PutBucketPolicy)
-> Lens PutBucketPolicy PutBucketPolicy BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketPolicy' {BucketName
bucket :: BucketName
$sel:bucket:PutBucketPolicy' :: PutBucketPolicy -> BucketName
bucket} -> BucketName
bucket) (\s :: PutBucketPolicy
s@PutBucketPolicy' {} BucketName
a -> PutBucketPolicy
s {$sel:bucket:PutBucketPolicy' :: BucketName
bucket = BucketName
a} :: PutBucketPolicy)

-- | The bucket policy as a JSON document.
putBucketPolicy_policy :: Lens.Lens' PutBucketPolicy Prelude.ByteString
putBucketPolicy_policy :: (ByteString -> f ByteString)
-> PutBucketPolicy -> f PutBucketPolicy
putBucketPolicy_policy = (PutBucketPolicy -> ByteString)
-> (PutBucketPolicy -> ByteString -> PutBucketPolicy)
-> Lens PutBucketPolicy PutBucketPolicy ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketPolicy' {ByteString
policy :: ByteString
$sel:policy:PutBucketPolicy' :: PutBucketPolicy -> ByteString
policy} -> ByteString
policy) (\s :: PutBucketPolicy
s@PutBucketPolicy' {} ByteString
a -> PutBucketPolicy
s {$sel:policy:PutBucketPolicy' :: ByteString
policy = ByteString
a} :: PutBucketPolicy)

instance Core.AWSRequest PutBucketPolicy where
  type
    AWSResponse PutBucketPolicy =
      PutBucketPolicyResponse
  request :: PutBucketPolicy -> Request PutBucketPolicy
request =
    Request PutBucketPolicy -> Request PutBucketPolicy
forall a. Request a -> Request a
Request.contentMD5Header
      (Request PutBucketPolicy -> Request PutBucketPolicy)
-> (PutBucketPolicy -> Request PutBucketPolicy)
-> PutBucketPolicy
-> Request PutBucketPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Request PutBucketPolicy -> Request PutBucketPolicy
forall a. Request a -> Request a
Request.s3vhost
      (Request PutBucketPolicy -> Request PutBucketPolicy)
-> (PutBucketPolicy -> Request PutBucketPolicy)
-> PutBucketPolicy
-> Request PutBucketPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> PutBucketPolicy -> Request PutBucketPolicy
forall a. (ToRequest a, ToBody a) => Service -> a -> Request a
Request.putBody Service
defaultService
  response :: Logger
-> Service
-> Proxy PutBucketPolicy
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutBucketPolicy)))
response =
    AWSResponse PutBucketPolicy
-> Logger
-> Service
-> Proxy PutBucketPolicy
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutBucketPolicy)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse PutBucketPolicy
PutBucketPolicyResponse
PutBucketPolicyResponse'

instance Prelude.Hashable PutBucketPolicy

instance Prelude.NFData PutBucketPolicy

instance Core.ToBody PutBucketPolicy where
  toBody :: PutBucketPolicy -> RequestBody
toBody PutBucketPolicy' {Maybe Bool
Maybe Text
ByteString
BucketName
policy :: ByteString
bucket :: BucketName
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
confirmRemoveSelfBucketAccess :: Maybe Bool
$sel:policy:PutBucketPolicy' :: PutBucketPolicy -> ByteString
$sel:bucket:PutBucketPolicy' :: PutBucketPolicy -> BucketName
$sel:expectedBucketOwner:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
$sel:contentMD5:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
$sel:confirmRemoveSelfBucketAccess:PutBucketPolicy' :: PutBucketPolicy -> Maybe Bool
..} = ByteString -> RequestBody
forall a. ToBody a => a -> RequestBody
Core.toBody ByteString
policy

instance Core.ToHeaders PutBucketPolicy where
  toHeaders :: PutBucketPolicy -> [Header]
toHeaders PutBucketPolicy' {Maybe Bool
Maybe Text
ByteString
BucketName
policy :: ByteString
bucket :: BucketName
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
confirmRemoveSelfBucketAccess :: Maybe Bool
$sel:policy:PutBucketPolicy' :: PutBucketPolicy -> ByteString
$sel:bucket:PutBucketPolicy' :: PutBucketPolicy -> BucketName
$sel:expectedBucketOwner:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
$sel:contentMD5:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
$sel:confirmRemoveSelfBucketAccess:PutBucketPolicy' :: PutBucketPolicy -> Maybe Bool
..} =
    [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-confirm-remove-self-bucket-access"
          HeaderName -> Maybe Bool -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe Bool
confirmRemoveSelfBucketAccess,
        HeaderName
"Content-MD5" HeaderName -> Maybe Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe Text
contentMD5,
        HeaderName
"x-amz-expected-bucket-owner"
          HeaderName -> Maybe Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe Text
expectedBucketOwner
      ]

instance Core.ToPath PutBucketPolicy where
  toPath :: PutBucketPolicy -> ByteString
toPath PutBucketPolicy' {Maybe Bool
Maybe Text
ByteString
BucketName
policy :: ByteString
bucket :: BucketName
expectedBucketOwner :: Maybe Text
contentMD5 :: Maybe Text
confirmRemoveSelfBucketAccess :: Maybe Bool
$sel:policy:PutBucketPolicy' :: PutBucketPolicy -> ByteString
$sel:bucket:PutBucketPolicy' :: PutBucketPolicy -> BucketName
$sel:expectedBucketOwner:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
$sel:contentMD5:PutBucketPolicy' :: PutBucketPolicy -> Maybe Text
$sel:confirmRemoveSelfBucketAccess:PutBucketPolicy' :: PutBucketPolicy -> Maybe Bool
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket]

instance Core.ToQuery PutBucketPolicy where
  toQuery :: PutBucketPolicy -> QueryString
toQuery = QueryString -> PutBucketPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"policy"])

-- | /See:/ 'newPutBucketPolicyResponse' smart constructor.
data PutBucketPolicyResponse = PutBucketPolicyResponse'
  {
  }
  deriving (PutBucketPolicyResponse -> PutBucketPolicyResponse -> Bool
(PutBucketPolicyResponse -> PutBucketPolicyResponse -> Bool)
-> (PutBucketPolicyResponse -> PutBucketPolicyResponse -> Bool)
-> Eq PutBucketPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBucketPolicyResponse -> PutBucketPolicyResponse -> Bool
$c/= :: PutBucketPolicyResponse -> PutBucketPolicyResponse -> Bool
== :: PutBucketPolicyResponse -> PutBucketPolicyResponse -> Bool
$c== :: PutBucketPolicyResponse -> PutBucketPolicyResponse -> Bool
Prelude.Eq, ReadPrec [PutBucketPolicyResponse]
ReadPrec PutBucketPolicyResponse
Int -> ReadS PutBucketPolicyResponse
ReadS [PutBucketPolicyResponse]
(Int -> ReadS PutBucketPolicyResponse)
-> ReadS [PutBucketPolicyResponse]
-> ReadPrec PutBucketPolicyResponse
-> ReadPrec [PutBucketPolicyResponse]
-> Read PutBucketPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBucketPolicyResponse]
$creadListPrec :: ReadPrec [PutBucketPolicyResponse]
readPrec :: ReadPrec PutBucketPolicyResponse
$creadPrec :: ReadPrec PutBucketPolicyResponse
readList :: ReadS [PutBucketPolicyResponse]
$creadList :: ReadS [PutBucketPolicyResponse]
readsPrec :: Int -> ReadS PutBucketPolicyResponse
$creadsPrec :: Int -> ReadS PutBucketPolicyResponse
Prelude.Read, Int -> PutBucketPolicyResponse -> ShowS
[PutBucketPolicyResponse] -> ShowS
PutBucketPolicyResponse -> String
(Int -> PutBucketPolicyResponse -> ShowS)
-> (PutBucketPolicyResponse -> String)
-> ([PutBucketPolicyResponse] -> ShowS)
-> Show PutBucketPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBucketPolicyResponse] -> ShowS
$cshowList :: [PutBucketPolicyResponse] -> ShowS
show :: PutBucketPolicyResponse -> String
$cshow :: PutBucketPolicyResponse -> String
showsPrec :: Int -> PutBucketPolicyResponse -> ShowS
$cshowsPrec :: Int -> PutBucketPolicyResponse -> ShowS
Prelude.Show, (forall x.
 PutBucketPolicyResponse -> Rep PutBucketPolicyResponse x)
-> (forall x.
    Rep PutBucketPolicyResponse x -> PutBucketPolicyResponse)
-> Generic PutBucketPolicyResponse
forall x. Rep PutBucketPolicyResponse x -> PutBucketPolicyResponse
forall x. PutBucketPolicyResponse -> Rep PutBucketPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutBucketPolicyResponse x -> PutBucketPolicyResponse
$cfrom :: forall x. PutBucketPolicyResponse -> Rep PutBucketPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutBucketPolicyResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newPutBucketPolicyResponse ::
  PutBucketPolicyResponse
newPutBucketPolicyResponse :: PutBucketPolicyResponse
newPutBucketPolicyResponse = PutBucketPolicyResponse
PutBucketPolicyResponse'

instance Prelude.NFData PutBucketPolicyResponse