QCloudGetBucketLocationRequest Class Reference

Inherits from QCloudBizHTTPRequest
Declared in QCloudGetBucketLocationRequest.h
QCloudGetBucketLocationRequest.m

Overview

获取存储桶(Bucket) 所在的地域信息的方法.

功能说明

在创建 Bucket 时,需要指定所属该 Bucket 所属地域信息.

COS 支持的地域信息,可查看https://cloud.tencent.com/document/product/436/6224.

关于获取 Bucket 所在的地域信息接口的具体描述,请查看https://cloud.tencent.com/document/product/436/8275.

示例

@code

QCloudGetBucketLocationRequest* locationReq = [QCloudGetBucketLocationRequest new];
locationReq.bucket = @"bucketName";//存储桶名称(cos v5 的 bucket格式为:xxx-appid, 如 test-1253960454)
__block QCloudBucketLocationConstraint* location;
[locationReq setFinishBlock:^(QCloudBucketLocationConstraint * _Nonnull result,
                                                        NSError * _Nonnull error) {
location = result;
}];
[[QCloudCOSXMLService defaultCOSXML] GetBucketLocation:locationReq];

  bucket

存储桶名

@property (strong, nonatomic) NSString *bucket

Declared In

QCloudGetBucketLocationRequest.h