libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.S3.GetPublicAccessBlock

Description

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

Creating a Request

data GetPublicAccessBlock Source #

See: newGetPublicAccessBlock smart constructor.

Constructors

GetPublicAccessBlock' 

Fields

  • expectedBucketOwner :: Maybe 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.

  • bucket :: BucketName

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want to retrieve.

Instances

Instances details
Eq GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Read GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Show GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Generic GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Associated Types

type Rep GetPublicAccessBlock :: Type -> Type #

NFData GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Methods

rnf :: GetPublicAccessBlock -> () #

Hashable GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

AWSRequest GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Associated Types

type AWSResponse GetPublicAccessBlock #

ToHeaders GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

ToPath GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

ToQuery GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

type Rep GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

type Rep GetPublicAccessBlock = D1 ('MetaData "GetPublicAccessBlock" "Amazonka.S3.GetPublicAccessBlock" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "GetPublicAccessBlock'" 'PrefixI 'True) (S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName)))
type AWSResponse GetPublicAccessBlock Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

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.

Constructors

GetPublicAccessBlockResponse' 

Fields

Instances

Instances details
Eq GetPublicAccessBlockResponse Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Read GetPublicAccessBlockResponse Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Show GetPublicAccessBlockResponse Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Generic GetPublicAccessBlockResponse Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

Associated Types

type Rep GetPublicAccessBlockResponse :: Type -> Type #

NFData GetPublicAccessBlockResponse Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

type Rep GetPublicAccessBlockResponse Source # 
Instance details

Defined in Amazonka.S3.GetPublicAccessBlock

type Rep GetPublicAccessBlockResponse = D1 ('MetaData "GetPublicAccessBlockResponse" "Amazonka.S3.GetPublicAccessBlock" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "GetPublicAccessBlockResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "publicAccessBlockConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PublicAccessBlockConfiguration)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.