为共享单元绑定标签。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
 调试
        
            调试
        
    
授权信息
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
| resourcesharing:TagResources | update | *ResourceShare 
 | 无 | 无 | 
请求语法
POST  HTTP/1.1请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
| ResourceType | string | 是 | 资源类型。 取值为 | ResourceShare | 
| ResourceId | array | 是 | 共享单元 ID。 | |
| string | 否 | 共享单元 ID。 | rs-PqysnzIj**** | |
| RegionId | string | 是 | 共享单元所属的地域 ID。 | cn-hangzhou | 
| Tag | array<object> | 是 | 标签列表。 最多可以绑定 20 个标签。 | |
| object | 否 | 标签列表。 | ||
| Key | string | 否 | 标签键。 说明 
 如需传入该值,则不能输入空字符串。最多支持 128 个字符,不能以 | k1 | 
| Value | string | 否 | 标签值。 说明 
 最多支持 128 个字符,不能以 | v1 | 
返回参数
| 名称 | 类型 | 描述 | 示例值 | 
| object | 返回结果。 | ||
| RequestId | string | 请求 ID。 | E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C | 
示例
正常返回示例
JSON格式
{
  "RequestId": "E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C"
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | InvalidParameter.ResourceId | The ResourceId is invalid. | ResourceId参数错误。 | 
| 400 | InvalidResourceId.NotFound | The specified ResourceIds are not found in our records. | 资源ID不存在。 | 
| 400 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. | 资源ID数量超出限制。 | 
| 400 | InvalidParameter.RegionId | The RegionId parameter is invalid. | 地域ID参数无效。 | 
| 400 | MissingParameter.ResourceIds | You must specify ResourceIds. | 资源ID参数不能为空。 | 
| 400 | MissingParameter.ResourceType | You must specify ResourceType. | 资源类型参数不能为空。 | 
| 400 | MissingParameter.Tags | You must specify Tags. | 标签参数不能为空。 | 
| 400 | InvalidParameter.ResourceType | The ResourceType parameter is invalid. | 资源类型参数无效。 | 
| 500 | InternalError | The request processing has failed due to some unknown error. | 由于某些未知错误,请求处理失败。 | 
| 403 | NoPermission | You are not authorized to perform this action. | 当前操作未被授权,请联系管理员授权。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。