更新时间:2021-03-18 GMT+08:00
获取桶区域位置
功能说明
获取桶所在的区域位置。
方法定义
1. ObsClient->getBucketLocation(array $parameter) 2. ObsClient->getBucketLocationAsync(array $parameter, callable $callback)
请求参数
字段名 | 类型 | 约束 | 说明 |
|---|---|---|---|
Bucket | string | 必选 | 桶名。 |
返回结果
字段名 | 类型 | 说明 |
|---|---|---|
HttpStatusCode | integer | HTTP状态码。 |
Reason | string | HTTP文本描述。 |
RequestId | string | OBS服务端返回的请求ID。 |
Location | string | 桶所在的区域位置。 |
代码样例
try{
$resp = $obsClient -> getBucketLocation([
'Bucket' => 'bucketname'
]);
printf("RequestId:%s\n", $resp['RequestId']);
printf("Location:%s\n", $resp['Location']);
}catch (Obs\Common\ObsException $obsException){
printf("ExceptionCode:%s\n", $obsException->getExceptionCode());
printf("ExceptionMessage:%s\n", $obsException->getExceptionMessage());
} 父主题:桶相关接口

