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 |
Retrieves the PublicAccessBlock
configuration for an Amazon S3 bucket.
To use this operation, you must have the s3:GetBucketPublicAccessBlock
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
settings 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".
The following operations are related to GetPublicAccessBlock
:
Synopsis
- data GetPublicAccessBlock = GetPublicAccessBlock' {}
- newGetPublicAccessBlock :: BucketName -> GetPublicAccessBlock
- getPublicAccessBlock_expectedBucketOwner :: Lens' GetPublicAccessBlock (Maybe Text)
- getPublicAccessBlock_bucket :: Lens' GetPublicAccessBlock BucketName
- data GetPublicAccessBlockResponse = GetPublicAccessBlockResponse' {}
- newGetPublicAccessBlockResponse :: Int -> GetPublicAccessBlockResponse
- getPublicAccessBlockResponse_publicAccessBlockConfiguration :: Lens' GetPublicAccessBlockResponse (Maybe PublicAccessBlockConfiguration)
- getPublicAccessBlockResponse_httpStatus :: Lens' GetPublicAccessBlockResponse Int
Creating a Request
data GetPublicAccessBlock Source #
See: newGetPublicAccessBlock
smart constructor.
GetPublicAccessBlock' | |
|
Instances
newGetPublicAccessBlock Source #
Create a value of GetPublicAccessBlock
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:expectedBucketOwner:GetPublicAccessBlock'
, getPublicAccessBlock_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:GetPublicAccessBlock'
, getPublicAccessBlock_bucket
- The name of the Amazon S3 bucket whose PublicAccessBlock
configuration
you want to retrieve.
Request Lenses
getPublicAccessBlock_expectedBucketOwner :: Lens' GetPublicAccessBlock (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.
getPublicAccessBlock_bucket :: Lens' GetPublicAccessBlock BucketName Source #
The name of the Amazon S3 bucket whose PublicAccessBlock
configuration
you want to retrieve.
Destructuring the Response
data GetPublicAccessBlockResponse Source #
See: newGetPublicAccessBlockResponse
smart constructor.
GetPublicAccessBlockResponse' | |
|
Instances
newGetPublicAccessBlockResponse Source #
Create a value of GetPublicAccessBlockResponse
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:publicAccessBlockConfiguration:GetPublicAccessBlockResponse'
, getPublicAccessBlockResponse_publicAccessBlockConfiguration
- The PublicAccessBlock
configuration currently in effect for this
Amazon S3 bucket.
$sel:httpStatus:GetPublicAccessBlockResponse'
, getPublicAccessBlockResponse_httpStatus
- The response's http status code.
Response Lenses
getPublicAccessBlockResponse_publicAccessBlockConfiguration :: Lens' GetPublicAccessBlockResponse (Maybe PublicAccessBlockConfiguration) Source #
The PublicAccessBlock
configuration currently in effect for this
Amazon S3 bucket.
getPublicAccessBlockResponse_httpStatus :: Lens' GetPublicAccessBlockResponse Int Source #
The response's http status code.