use of software.amazon.awssdk.services.s3.model.DeleteObjectTaggingRequest in project aws-doc-sdk-examples by awsdocs.
the class S3Service method deleteTagFromObject.
// Delete tags from the given object.
public void deleteTagFromObject(String bucketName, String key) {
try {
DeleteObjectTaggingRequest deleteObjectTaggingRequest = DeleteObjectTaggingRequest.builder().key(key).bucket(bucketName).build();
S3Client s3 = getClient();
s3.deleteObjectTagging(deleteObjectTaggingRequest);
} catch (S3Exception e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
}
Aggregations