检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
You can call delete_bucket_lifecycle_configuration() to delete lifecycle rules for a bucket. Sample code is as follows: Parameter Description Field Type Mandatory or Optional Description option The context of the bucket. For details, see Configuring option.
You can call set_bucket_logging_configuration_ob to delete all logs of a bucket to disable logging of the bucket.
Default value: None expiredObjectDeleteMarker Boolean Yes if days or date is absent Explanation: Whether to delete expired delete markers. The value can be true or false. If tags are configured in a lifecycle rule, this element cannot be configured.
Current Version Delete Objects After (Days) 1 day Historical Version Delete Objects After (Days) 1 day One day later, objects in the bucket are successfully deleted based on the rule. If you no longer need this lifecycle rule, you can disable it or delete it.
bucketname := "examplebucket" // Delete lifecycle configurations of the bucket. output, err := obsClient.DeleteBucketLifecycleConfiguration(bucketname) if err == nil { fmt.Printf("Delete LifecycleConfiguration successful with bucket:%s!
You cannot use this API to delete a specified lifecycle rule. When you call this API, all lifecycle rules in the bucket are deleted.
Deleting the Lifecycle Configuration of a Bucket (SDK for Python) Function You can configure lifecycle rules to periodically delete objects or transition objects between storage classes. For more information, see Lifecycle Management.
You can call delete_bucket to delete a bucket. Parameter Description Field Type Mandatory or Optional Description option The context of the bucket. For details, see Configuring option.
Deleting Versioning Objects Deleting a Single Versioning Object You can call OBSDeleteObjectRequest and pass a version ID (versionID) to delete a versioning object.
Default value: None deleteMarker boolean Explanation: Whether the deleted object is a delete marker. Value range: true: The deleted object is a delete marker. false: The deleted object is not a delete marker. Default value: false objectKey String Explanation: Object name.
Configuring Lifecycle Rules (SDK for Java) Function You can configure lifecycle rules to periodically delete objects or transition objects between storage classes. For more information, see Lifecycle Management.
Default value: None expiredObjectDeleteMarker Boolean Yes if days or date is absent Explanation: Whether to delete expired delete markers. The value can be true or false. If tags are configured in a lifecycle rule, this element cannot be configured.
You can call delete_bucket_cors_configuration() to delete CORS rules of a bucket. Sample code is as follows: Parameter Description Field Type Mandatory or Optional Description option The context of the bucket. For details, see Configuring option.
Deleting a Bucket You can call deleteBucket to delete a bucket. Sample code is as follows: static OBSClient *client; NSString *endPoint = @"your-endpoint"; // Hard-coded or plaintext AK/SK are risky.
Default value: None deleteMarker boolean Explanation: Whether the deleted object is a delete marker. Value range: true: The deleted object is a delete marker. false: The deleted object is not a delete marker. Default value: false objectKey String Explanation: Object name.
Delete buckets. Get the bucket list or configuration information. Basic object management Allows you to upload, download, delete, and list objects. In detail, you can: Upload one or more files or folders. Upload large files in multipart uploads.
Delete buckets. Get the bucket list or configuration information. Basic object management Allows you to upload, download, delete, and list objects. In detail, you can: Upload one or more files or folders. Upload large files in multipart uploads.
For example, 2018-01-01T00:00:00.000Z indicates only objects that were last modified before the specified time are deleted.
input.CustomDomain = "www.example.com" // Delete the user-defined domain name bound to the bucket. output, err := obsClient.DeleteBucketCustomDomain(input) if err == nil { fmt.Printf("Delete bucket(%s)'s customdomain successful!
input.Key = "example/objectname" // Delete the object. output, err := obsClient.DeleteObject(input) if err == nil { fmt.Printf("Delete object(%s) under the bucket(%s) successful!