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 |
Returns the tag-set of an object. You send the GET request against the tagging subresource associated with the object.
To use this operation, you must have permission to perform the
s3:GetObjectTagging
action. By default, the GET action returns
information about current version of an object. For a versioned bucket,
you can have multiple versions of an object in your bucket. To retrieve
tags of any other version, use the versionId query parameter. You also
need permission for the s3:GetObjectVersionTagging
action.
By default, the bucket owner has this permission and can grant this permission to others.
For information about the Amazon S3 object tagging feature, see Object Tagging.
The following action is related to GetObjectTagging
:
Synopsis
- data GetObjectTagging = GetObjectTagging' {}
- newGetObjectTagging :: BucketName -> ObjectKey -> GetObjectTagging
- getObjectTagging_versionId :: Lens' GetObjectTagging (Maybe ObjectVersionId)
- getObjectTagging_requestPayer :: Lens' GetObjectTagging (Maybe RequestPayer)
- getObjectTagging_expectedBucketOwner :: Lens' GetObjectTagging (Maybe Text)
- getObjectTagging_bucket :: Lens' GetObjectTagging BucketName
- getObjectTagging_key :: Lens' GetObjectTagging ObjectKey
- data GetObjectTaggingResponse = GetObjectTaggingResponse' {
- versionId :: Maybe ObjectVersionId
- httpStatus :: Int
- tagSet :: [Tag]
- newGetObjectTaggingResponse :: Int -> GetObjectTaggingResponse
- getObjectTaggingResponse_versionId :: Lens' GetObjectTaggingResponse (Maybe ObjectVersionId)
- getObjectTaggingResponse_httpStatus :: Lens' GetObjectTaggingResponse Int
- getObjectTaggingResponse_tagSet :: Lens' GetObjectTaggingResponse [Tag]
Creating a Request
data GetObjectTagging Source #
See: newGetObjectTagging
smart constructor.
GetObjectTagging' | |
|
Instances
Create a value of GetObjectTagging
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:versionId:GetObjectTagging'
, getObjectTagging_versionId
- The versionId of the object for which to get the tagging information.
$sel:requestPayer:GetObjectTagging'
, getObjectTagging_requestPayer
- Undocumented member.
$sel:expectedBucketOwner:GetObjectTagging'
, getObjectTagging_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:GetObjectTagging'
, getObjectTagging_bucket
- The bucket name containing the object for which to get the tagging
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.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.
$sel:key:GetObjectTagging'
, getObjectTagging_key
- Object key for which to get the tagging information.
Request Lenses
getObjectTagging_versionId :: Lens' GetObjectTagging (Maybe ObjectVersionId) Source #
The versionId of the object for which to get the tagging information.
getObjectTagging_requestPayer :: Lens' GetObjectTagging (Maybe RequestPayer) Source #
Undocumented member.
getObjectTagging_expectedBucketOwner :: Lens' GetObjectTagging (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.
getObjectTagging_bucket :: Lens' GetObjectTagging BucketName Source #
The bucket name containing the object for which to get the tagging 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.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.
getObjectTagging_key :: Lens' GetObjectTagging ObjectKey Source #
Object key for which to get the tagging information.
Destructuring the Response
data GetObjectTaggingResponse Source #
See: newGetObjectTaggingResponse
smart constructor.
GetObjectTaggingResponse' | |
|
Instances
newGetObjectTaggingResponse Source #
Create a value of GetObjectTaggingResponse
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:versionId:GetObjectTagging'
, getObjectTaggingResponse_versionId
- The versionId of the object for which you got the tagging information.
$sel:httpStatus:GetObjectTaggingResponse'
, getObjectTaggingResponse_httpStatus
- The response's http status code.
$sel:tagSet:GetObjectTaggingResponse'
, getObjectTaggingResponse_tagSet
- Contains the tag set.
Response Lenses
getObjectTaggingResponse_versionId :: Lens' GetObjectTaggingResponse (Maybe ObjectVersionId) Source #
The versionId of the object for which you got the tagging information.
getObjectTaggingResponse_httpStatus :: Lens' GetObjectTaggingResponse Int Source #
The response's http status code.
getObjectTaggingResponse_tagSet :: Lens' GetObjectTaggingResponse [Tag] Source #
Contains the tag set.