@aws-sdk/client-s3
Version:
AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native
78 lines • 4.09 kB
JavaScript
import { __extends } from "tslib";
import { DeleteBucketLifecycleRequest } from "../models/models_0";
import { deserializeAws_restXmlDeleteBucketLifecycleCommand, serializeAws_restXmlDeleteBucketLifecycleCommand, } 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 lifecycle configuration from the specified bucket. Amazon S3 removes all the
* lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your
* objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of
* rules contained in the deleted lifecycle configuration.</p>
* <p>To use this operation, you must have permission to perform the
* <code>s3:PutLifecycleConfiguration</code> action. By default, the bucket owner has this
* permission and the bucket owner can grant this permission to others.</p>
*
* <p>There is usually some time lag before lifecycle configuration deletion is fully
* propagated to all the Amazon S3 systems.</p>
*
* <p>For more information about the object expiration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions">Elements to
* Describe Lifecycle Actions</a>.</p>
* <p>Related actions include:</p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a>
* </p>
* </li>
* </ul>
*/
var DeleteBucketLifecycleCommand = /** @class */ (function (_super) {
__extends(DeleteBucketLifecycleCommand, _super);
// Start section: command_properties
// End section: command_properties
function DeleteBucketLifecycleCommand(input) {
var _this =
// Start section: command_constructor
_super.call(this) || this;
_this.input = input;
return _this;
// End section: command_constructor
}
/**
* @internal
*/
DeleteBucketLifecycleCommand.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 = "DeleteBucketLifecycleCommand";
var handlerExecutionContext = {
logger: logger,
clientName: clientName,
commandName: commandName,
inputFilterSensitiveLog: DeleteBucketLifecycleRequest.filterSensitiveLog,
outputFilterSensitiveLog: function (output) { return output; },
};
var requestHandler = configuration.requestHandler;
return stack.resolve(function (request) {
return requestHandler.handle(request.request, options || {});
}, handlerExecutionContext);
};
DeleteBucketLifecycleCommand.prototype.serialize = function (input, context) {
return serializeAws_restXmlDeleteBucketLifecycleCommand(input, context);
};
DeleteBucketLifecycleCommand.prototype.deserialize = function (output, context) {
return deserializeAws_restXmlDeleteBucketLifecycleCommand(output, context);
};
return DeleteBucketLifecycleCommand;
}($Command));
export { DeleteBucketLifecycleCommand };
//# sourceMappingURL=DeleteBucketLifecycleCommand.js.map