amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.S3.GetObjectAcl

Description

Returns the access control list (ACL) of an object. To use this operation, you must have s3:GetObjectAcl permissions or READ_ACP access to the object. For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3 User Guide

This action is not supported by Amazon S3 on Outposts.

Versioning

By default, GET returns ACL information about the current version of an object. To return ACL information about a different version, use the versionId subresource.

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests to read ACLs are still supported and return the bucket-owner-full-control ACL with the owner being the account that created the bucket. For more information, see Controlling object ownership and disabling ACLs in the Amazon S3 User Guide.

The following operations are related to GetObjectAcl:

Synopsis

Creating a Request

data GetObjectAcl Source #

See: newGetObjectAcl smart constructor.

Constructors

GetObjectAcl' 

Fields

  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • requestPayer :: Maybe RequestPayer
     
  • versionId :: Maybe ObjectVersionId

    VersionId used to reference a specific version of the object.

  • bucket :: BucketName

    The bucket name that contains the object for which to get the ACL information.

    When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

  • key :: ObjectKey

    The key of the object for which to get the ACL information.

Instances

Instances details
ToHeaders GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

ToPath GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

ToQuery GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

AWSRequest GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Associated Types

type AWSResponse GetObjectAcl #

Generic GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Associated Types

type Rep GetObjectAcl :: Type -> Type #

Read GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Show GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

NFData GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Methods

rnf :: GetObjectAcl -> () #

Eq GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Hashable GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

type AWSResponse GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

type Rep GetObjectAcl Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

newGetObjectAcl Source #

Create a value of GetObjectAcl 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:GetObjectAcl', getObjectAcl_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

$sel:requestPayer:GetObjectAcl', getObjectAcl_requestPayer - Undocumented member.

GetObjectAcl, getObjectAcl_versionId - VersionId used to reference a specific version of the object.

GetObjectAcl, getObjectAcl_bucket - The bucket name that contains the object for which to get the ACL information.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

GetObjectAcl, getObjectAcl_key - The key of the object for which to get the ACL information.

Request Lenses

getObjectAcl_expectedBucketOwner :: Lens' GetObjectAcl (Maybe Text) Source #

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

getObjectAcl_versionId :: Lens' GetObjectAcl (Maybe ObjectVersionId) Source #

VersionId used to reference a specific version of the object.

getObjectAcl_bucket :: Lens' GetObjectAcl BucketName Source #

The bucket name that contains the object for which to get the ACL information.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

getObjectAcl_key :: Lens' GetObjectAcl ObjectKey Source #

The key of the object for which to get the ACL information.

Destructuring the Response

data GetObjectAclResponse Source #

See: newGetObjectAclResponse smart constructor.

Constructors

GetObjectAclResponse' 

Fields

Instances

Instances details
Generic GetObjectAclResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Associated Types

type Rep GetObjectAclResponse :: Type -> Type #

Read GetObjectAclResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Show GetObjectAclResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

NFData GetObjectAclResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

Methods

rnf :: GetObjectAclResponse -> () #

Eq GetObjectAclResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

type Rep GetObjectAclResponse Source # 
Instance details

Defined in Amazonka.S3.GetObjectAcl

type Rep GetObjectAclResponse = D1 ('MetaData "GetObjectAclResponse" "Amazonka.S3.GetObjectAcl" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "GetObjectAclResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "grants") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Grant])) :*: S1 ('MetaSel ('Just "owner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Owner))) :*: (S1 ('MetaSel ('Just "requestCharged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestCharged)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetObjectAclResponse Source #

Create a value of GetObjectAclResponse 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:

GetObjectAclResponse, getObjectAclResponse_grants - A list of grants.

GetObjectAclResponse, getObjectAclResponse_owner - Container for the bucket owner's display name and ID.

$sel:requestCharged:GetObjectAclResponse', getObjectAclResponse_requestCharged - Undocumented member.

$sel:httpStatus:GetObjectAclResponse', getObjectAclResponse_httpStatus - The response's http status code.

Response Lenses

getObjectAclResponse_owner :: Lens' GetObjectAclResponse (Maybe Owner) Source #

Container for the bucket owner's display name and ID.