更新时间:2025-12-04 GMT+08:00
删除对象标签
功能说明
删除指定桶中的对象的标签。
方法定义
ObsClient->deleteObjectTagging(array $parameter)
请求参数
| 字段名 | 类型 | 约束 | 说明 |
|---|---|---|---|
| Bucket | string | 必选 | 桶名。 |
| Key | string | 必选 | 目标对象名。 |
| VersionId | string | 可选 | 待删除对象的版本号。 |
返回结果
| 字段名 | 类型 | 说明 |
|---|---|---|
| HttpStatusCode | integer | HTTP状态码。 |
| Reason | string | HTTP文本描述。 |
| RequestId | string | OBS服务端返回的请求ID。 |
代码样例
try{
$resp = $obsClient -> deleteObjectTagging([
'Bucket' => 'bucketname'
'Key' => 'objectname',
]);
printf("RequestId:%s\n", $resp['RequestId']);
}catch (Obs\Common\ObsException $obsException){
printf("ExceptionCode:%s\n", $obsException->getExceptionCode());
printf("ExceptionMessage:%s\n", $obsException->getExceptionMessage());
} 父主题: 对象相关接口