@aws-sdk/client-s3
Version:
AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native
74 lines • 3.51 kB
JavaScript
import { __extends } from "tslib";
import { DeleteBucketCorsRequest } from "../models/models_0";
import { deserializeAws_restXmlDeleteBucketCorsCommand, serializeAws_restXmlDeleteBucketCorsCommand, } from "../protocols/Aws_restXml";
import { getBucketEndpointPlugin } from "@aws-sdk/middleware-bucket-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { Command as $Command } from "@aws-sdk/smithy-client";
/**
* <p>Deletes the <code>cors</code> configuration information set for the bucket.</p>
* <p>To use this operation, you must have permission to perform the
* <code>s3:PutBucketCORS</code> action. The bucket owner has this permission by default
* and can grant this permission to others. </p>
* <p>For information about <code>cors</code>, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling
* Cross-Origin Resource Sharing</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
*
* <p class="title">
* <b>Related Resources:</b>
* </p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html">PutBucketCors</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html">RESTOPTIONSobject</a>
* </p>
* </li>
* </ul>
*/
var DeleteBucketCorsCommand = /** @class */ (function (_super) {
__extends(DeleteBucketCorsCommand, _super);
// Start section: command_properties
// End section: command_properties
function DeleteBucketCorsCommand(input) {
var _this =
// Start section: command_constructor
_super.call(this) || this;
_this.input = input;
return _this;
// End section: command_constructor
}
/**
* @internal
*/
DeleteBucketCorsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(getBucketEndpointPlugin(configuration));
var stack = clientStack.concat(this.middlewareStack);
var logger = configuration.logger;
var clientName = "S3Client";
var commandName = "DeleteBucketCorsCommand";
var handlerExecutionContext = {
logger: logger,
clientName: clientName,
commandName: commandName,
inputFilterSensitiveLog: DeleteBucketCorsRequest.filterSensitiveLog,
outputFilterSensitiveLog: function (output) { return output; },
};
var requestHandler = configuration.requestHandler;
return stack.resolve(function (request) {
return requestHandler.handle(request.request, options || {});
}, handlerExecutionContext);
};
DeleteBucketCorsCommand.prototype.serialize = function (input, context) {
return serializeAws_restXmlDeleteBucketCorsCommand(input, context);
};
DeleteBucketCorsCommand.prototype.deserialize = function (output, context) {
return deserializeAws_restXmlDeleteBucketCorsCommand(output, context);
};
return DeleteBucketCorsCommand;
}($Command));
export { DeleteBucketCorsCommand };
//# sourceMappingURL=DeleteBucketCorsCommand.js.map