@aws-sdk/client-s3
Version:
AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native
71 lines • 3.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetObjectTaggingCommand = void 0;
const models_0_1 = require("../models/models_0");
const Aws_restXml_1 = require("../protocols/Aws_restXml");
const middleware_bucket_endpoint_1 = require("@aws-sdk/middleware-bucket-endpoint");
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
const smithy_client_1 = require("@aws-sdk/smithy-client");
/**
* <p>Returns the tag-set of an object. You send the GET request against the tagging
* subresource associated with the object.</p>
*
* <p>To use this operation, you must have permission to perform the
* <code>s3:GetObjectTagging</code> action. By default, the GET operation 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
* <code>s3:GetObjectVersionTagging</code> action.</p>
*
* <p> By default, the bucket owner has this permission and can grant this permission to
* others.</p>
*
* <p> For information about the Amazon S3 object tagging feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html">Object Tagging</a>.</p>
*
* <p>The following operation is related to <code>GetObjectTagging</code>:</p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html">PutObjectTagging</a>
* </p>
* </li>
* </ul>
*/
class GetObjectTaggingCommand extends smithy_client_1.Command {
// Start section: command_properties
// End section: command_properties
constructor(input) {
// Start section: command_constructor
super();
this.input = input;
// End section: command_constructor
}
/**
* @internal
*/
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(middleware_bucket_endpoint_1.getBucketEndpointPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "S3Client";
const commandName = "GetObjectTaggingCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetObjectTaggingRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetObjectTaggingOutput.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_restXml_1.serializeAws_restXmlGetObjectTaggingCommand(input, context);
}
deserialize(output, context) {
return Aws_restXml_1.deserializeAws_restXmlGetObjectTaggingCommand(output, context);
}
}
exports.GetObjectTaggingCommand = GetObjectTaggingCommand;
//# sourceMappingURL=GetObjectTaggingCommand.js.map