QCloudDeleteBucketRequest Class Reference

Inherits from QCloudBizHTTPRequest
Declared in QCloudDeleteBucketRequest.h
QCloudDeleteBucketRequest.m

Overview

删除存储桶 (Bucket)的方法.

功能说明

COS 目前仅支持删除已经清空的 Bucket,如果 Bucket 中仍有对象,将会删除失败. 因此,在执行删除 Bucket 前, 需确保 Bucket 内已经没有对象.

关于删除 Bucket 接口的具体描述,请查看https://cloud.tencent.com/document/product/436/7732.

示例

@code

QCloudDeleteBucketRequest* request = [[QCloudDeleteBucketRequest alloc ] init];

// 存储桶名称,命名格式:BucketName-APPID
request.bucket = @"examplebucket-1250000000";

[request setFinishBlock:^(id outputObject,NSError*error) {

    // 可以从 outputObject 中获取服务器返回的 header 信息
    NSDictionary* info = (NSDictionary *) outputObject;
}];
[[QCloudCOSXMLService defaultCOSXML] DeleteBucket:request];];

  bucket

要删除的存储桶名。注意删除之前要求bucket里的内容为空。

@property (strong, nonatomic) NSString *bucket

Declared In

QCloudDeleteBucketRequest.h