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) |
Safe Haskell | None |
Creates or modifies the PublicAccessBlock
configuration for an Amazon
S3 bucket. To use this operation, you must have the
s3:PutBucketPublicAccessBlock
permission. For more information about
Amazon S3 permissions, see
Specifying Permissions in a Policy.
When Amazon S3 evaluates the PublicAccessBlock
configuration for a
bucket or an object, it checks the PublicAccessBlock
configuration for
both the bucket (or the bucket that contains the object) and the bucket
owner's account. If the PublicAccessBlock
configurations are
different between the bucket and the account, Amazon S3 uses the most
restrictive combination of the bucket-level and account-level settings.
For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".
Related Resources
Synopsis
- data PutPublicAccessBlock = PutPublicAccessBlock' {}
- newPutPublicAccessBlock :: BucketName -> PublicAccessBlockConfiguration -> PutPublicAccessBlock
- putPublicAccessBlock_contentMD5 :: Lens' PutPublicAccessBlock (Maybe Text)
- putPublicAccessBlock_expectedBucketOwner :: Lens' PutPublicAccessBlock (Maybe Text)
- putPublicAccessBlock_bucket :: Lens' PutPublicAccessBlock BucketName
- putPublicAccessBlock_publicAccessBlockConfiguration :: Lens' PutPublicAccessBlock PublicAccessBlockConfiguration
- data PutPublicAccessBlockResponse = PutPublicAccessBlockResponse' {
- newPutPublicAccessBlockResponse :: PutPublicAccessBlockResponse
Creating a Request
data PutPublicAccessBlock Source #
See: newPutPublicAccessBlock
smart constructor.
PutPublicAccessBlock' | |
|
Instances
newPutPublicAccessBlock Source #
Create a value of PutPublicAccessBlock
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:contentMD5:PutPublicAccessBlock'
, putPublicAccessBlock_contentMD5
- The MD5 hash of the PutPublicAccessBlock
request body.
For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
$sel:expectedBucketOwner:PutPublicAccessBlock'
, putPublicAccessBlock_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.
$sel:bucket:PutPublicAccessBlock'
, putPublicAccessBlock_bucket
- The name of the Amazon S3 bucket whose PublicAccessBlock
configuration
you want to set.
$sel:publicAccessBlockConfiguration:PutPublicAccessBlock'
, putPublicAccessBlock_publicAccessBlockConfiguration
- The PublicAccessBlock
configuration that you want to apply to this
Amazon S3 bucket. You can enable the configuration options in any
combination. For more information about when Amazon S3 considers a
bucket or object public, see
The Meaning of "Public"
in the Amazon S3 User Guide.
Request Lenses
putPublicAccessBlock_contentMD5 :: Lens' PutPublicAccessBlock (Maybe Text) Source #
The MD5 hash of the PutPublicAccessBlock
request body.
For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
putPublicAccessBlock_expectedBucketOwner :: Lens' PutPublicAccessBlock (Maybe Text) Source #
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.
putPublicAccessBlock_bucket :: Lens' PutPublicAccessBlock BucketName Source #
The name of the Amazon S3 bucket whose PublicAccessBlock
configuration
you want to set.
putPublicAccessBlock_publicAccessBlockConfiguration :: Lens' PutPublicAccessBlock PublicAccessBlockConfiguration Source #
The PublicAccessBlock
configuration that you want to apply to this
Amazon S3 bucket. You can enable the configuration options in any
combination. For more information about when Amazon S3 considers a
bucket or object public, see
The Meaning of "Public"
in the Amazon S3 User Guide.
Destructuring the Response
data PutPublicAccessBlockResponse Source #
See: newPutPublicAccessBlockResponse
smart constructor.
Instances
newPutPublicAccessBlockResponse :: PutPublicAccessBlockResponse Source #
Create a value of PutPublicAccessBlockResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.