检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
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.
If the current object version is the only version of the object and has a delete marker, OBS will delete the current object version. Clearing a delete marker may take a while, because OBS needs to confirm that the delete marker is the only object version.
Lifecycle Management Overview OBS allows you to set lifecycle rules for buckets to automatically transition the storage class of an object and delete expired objects, to effectively use storage features and optimize the storage space.
Deleting Versioning Objects Deleting a Single Versioning Object You can call OBSDeleteObjectRequest to pass the version ID (versionID) to delete an object version.
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.
Bucket: "examplebucket", }; // Delete the lifecycle configuration of the bucket. const result = await obsClient.deleteBucketLifecycle(params); if (result.CommonMsg.Status <= 300) { console.log("Delete bucket(%s)'s lifecycle configuration successful!"
bucketname := "examplebucket" // Delete lifecycle configurations of the bucket. output, err := obsClient.DeleteBucketLifecycleConfiguration(bucketname) if err == nil { fmt.Printf("Delete LifecycleConfiguration successful with bucket:%s!
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.
Restrictions To delete the BPA configuration of a bucket, you must be the bucket owner or have the required permission (obs:bucket:DeleteBucketPublicAccessBlock in IAM or DeleteBucketPublicAccessBlock in a bucket policy).
Deleting Hosting Settings You can call deleteBucketWebsite to delete the hosting settings of a bucket. Sample code is as follows: static OBSClient *client; NSString *endPoint = @"your-endpoint"; // Hard-coded or plaintext AK/SK are risky.
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.
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.
delete_object(&option,&object_info,&responseHandler, &ret_status); if (OBS_STATUS_OK == ret_status) { printf("delete object successfully. \n"); } else { printf("delete object failed(%s).
delete_object(&options, &object_info, &response_handler, &ret_status); if (OBS_STATUS_OK == ret_status) { printf("delete object successfully. \n"); } else { printf("delete object failed(%s).
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.
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.
Deleting CORS Rules You can call deleteBucketCORS to delete CORS rules from a bucket. Sample code is as follows: static OBSClient *client; NSString *endPoint = @"your-endpoint"; // Hard-coded or plaintext AK/SK are risky.