检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
ObsClient obsClient = new ObsClient(ak, sk, endPoint); obsClient.deleteObject("bucketname", "objectname"); Deleting Objects in a Batch You can call ObsClient.deleteObjects to delete objects in a batch. A maximum of 1000 objects can be deleted each time.
Sample Request 1 2 3 4 5 6 DELETE /object02?
To disable logging for a bucket is to call ObsClient.SetBucketLogging to delete the logging configuration. This example disables logging for bucket bucketname. The example code is as follows: // Initialize configuration parameters.
(Optional) Select one or more tasks and click Delete (). Parent topic: Task Management
Figure 1 Failed task list (Optional) Select one or more tasks and click Delete (). (Optional) Select one or more tasks and click Retry (). A failed task will be automatically retried three times. Parent topic: Task Management
DELETE: Requests that a server delete a specific resource such as an object. HEAD: Requests that a server return the description of a specific resource, for example, obtaining object metadata.
Delete Fragments After (Days): After this number of days since fragment generation, OBS will automatically delete fragments in the bucket.
Bucket: "examplebucket", }; // Delete the website configuration of the bucket. const result = await obsClient.deleteBucketWebsite(params); if (result.CommonMsg.Status <= 300) { console.log("Delete bucket(%s)'s website configuration successful!"
(Optional) Select one or more tasks and click Delete (). Parent topic: Task Management
Type: string Value options: GET, PUT, HEAD, POST, DELETE Access-Control-Expose-Headers Indicates ExposeHeader in the CORS configuration of a server. Type: string Response Elements This response contains no elements.
Types OBS requests fall into the following types: Read requests: GET (for downloading objects), HEAD (for obtaining bucket locations or bucket policies), LIST (for listing objects), and others Write requests: PUT/POST (for uploading objects), COPY (for copying objects), and others Delete
objects) DeleteObjectVersion (to delete a specified object version) AbortMultipartUpload (to abort multipart uploads) Click Create.
To delete objects in a batch, traverse objects and list to-be-deleted objects on your own. For details about deletion, see Deleting Objects. Parent topic: Quick Start
If you want to search for other buckets, click in the search box to delete the keyword you have entered and enter a new one, as shown in Figure 2. Figure 2 Searching for buckets Parent topic: Basic Bucket Operations
request to delete an object.
Type: string Value options: GET, PUT, HEAD, POST, DELETE Access-Control-Expose-Headers Value of ExposeHeader in the CORS configuration of a server Type: string Response Elements This response contains no elements.
The total number of requests is not equal to the sum of GET, PUT, and DELETE requests. The possible causes are as follows: In addition to GET, PUT, and DELETE requests, the total number of requests covers that of other types of requests such as POST and HEAD.
bucketname := "examplebucket" // Delete the bucket encryption configuration. output, err := obsClient.DeleteBucketEncryption(bucketname) if err == nil { fmt.Printf("Delete bucket(%s)'s encryption configuration successful!
If multiple clients simultaneously upload, query, or delete the same object or bucket, these operations may reach the system at different times and have different latency periods, so different results may return.
FAQs After Some Files Are Deleted in My Local Directory, Can obsutil Synchronously Delete Them from the Bucket? Can I Use obsutil to Directly Save a Listing Result to a Local File? Why Is the Size of Objects Queried by obsutil Inconsistent with That on OBS Console?