检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
You can call ObsClient->deleteBucketWebsite to delete the hosting settings of a bucket. This example deletes the hosting configuration of bucket bucketname.
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. You can set multiple lifecycle rules based on the prefix.
You send a delete request specifying both an object's name and its version ID, but this version ID points to a delete marker. In this case, OBS deletes the delete marker and returns its version ID in the response.
To disable logging for a bucket is to call ObsClient.setBucketLogging to delete the logging configuration. This example disables logging for bucket bucketname.
You can call ObsClient.deleteBucketWebsite to delete the hosting settings of a bucket. This example deletes the hosting configuration of bucket bucketname.
The returned result of ObsClient->listVersions includes the versioning objects and delete markers. Listing Versioning Objects in Simple Mode The following sample code shows how to list versioning objects in simple mode.
Certain APIs do not require the request body, such as the GET and DELETE APIs.
Permission.PERMISSION_READ WRITE A grantee with this permission for a bucket can upload, overwrite, and delete any object in the bucket. This permission is not applicable to objects.
Type: string Value options: GET, PUT, HEAD, POST, DELETE Parent: CORSRule AllowedOrigin The origin (domain name) that is allowed by a CORS rule. The value is a string of 0 to 20480 characters. It allows at most one wildcard character (*).
Deleting a Single Versioning Object You can call ObsClient->deleteObject to delete an object version by specifying the version ID (VersionId). This example deletes object objectname from bucket bucketname by specifying VersionId.
Constraints If an Archive or Deep Archive object is being restored, you cannot suspend or delete the restore task. You cannot re-restore an object that is in the Restoring state. After an object is restored, an object copy in the Standard storage class will be generated.
You send a delete request specifying both an object's name and its version ID, but this version ID points to a delete marker. In this case, OBS deletes the delete marker and returns its version ID in the response.
(Optional) Delete a cross-region replication rule. Click Delete in the Operation column of the target rule. You can also select multiple rules and click Delete above the list to delete them in batches. In the Delete This Cross-Region Replication Rule dialog box, click OK.
ObsClient.enums.PermissionRead WRITE A grantee with this permission for a bucket can upload, overwrite, and delete any object in the bucket. This permission is not applicable to objects.
Parent: CORSRule Constraints: None Range: The following HTTP methods are supported: GET PUT HEAD POST DELETE Default value: None AllowedOrigin String Yes Definition: The origin that is allowed to access the bucket.
DELETE: It measures the total number of DELETE requests made for the bucket and the objects in it in the last 30 days. Month-over-month growth It compares the current month's data with the previous month's data, showing the data increase or decrease.
client = new ObsClient(accessKey, secretKey, config); try { DeleteBucketPolicyRequest request = new DeleteBucketPolicyRequest { BucketName = "bucketname", }; DeleteBucketPolicyResponse response = client.DeleteBucketPolicy(request); Console.WriteLine("Delete
server: 'https://obs.ap-southeast-1.myhuaweicloud.com' }); // Delete a bucket policy. obsClient.deleteBucketPolicy({ Bucket: 'bucketname' }, function(err, result) { if(err){ console.error('Error-->' + err); }else{ console.log('Status
Deleting a Single Object You can call ObsClient->deleteObject to delete a single object.
OBSServiceConfiguration *conf = [[OBSServiceConfiguration alloc] initWithURLString:endPoint credentialProvider:credentialProvider]; // Initialize an instance of OBSClient. client = [[OBSClient alloc] initWithConfiguration:conf]; // Delete lifecycle rules.