You need to enable JavaScript to run this app.
导航
TagResources - 为资源打标签
最近更新时间:2025.05.28 16:33:34首次发布时间:2025.05.28 14:59:58
我的收藏
有用
有用
无用
无用

为资源打标签

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

TagResources

要执行的操作,取值:TagResources。

Version
String

2022-01-01

API的版本,取值:2022-01-01。

ResourceType
String

account

资源类型: account, unit

Tags.N.Key
Array of String

Tags.1.Key=key1&Tags.2.Key=key2

标签键

Tags.N.Value
Array of String

Tags.1.Value=value1&Tags.2.Value=value2

标签值

ResourceIds.N
Array of String

ResourceIds.1=200xxx&ResourceIds.2=201xxxx

资源id,ResourceType 为 account 时传组织成员账号account_id, ResourceType 为 unit 时需要传组织单元 id

返回参数

本接口无特有的返回参数。更多信息请见返回结构

请求示例

GET /?Action=TagResources&Version=2022-01-01&ResourceType=account&Tags.N.Value=value1&Tags.N.Key=key2&ResourceIds.N=2 HTTP/1.1
Host: https://open.volcengineapi.com
X-Date: 20250520T033945Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250520/cn-beijing/organization/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f


返回示例

{
  "ResponseMetadata": {
    "RequestId": "202505201139491282241431373FFE18",
    "Action": "TagResources",
    "Version": "2022-01-01",
    "Service": "organization",
    "Region": "cn-beijing"
  },
  "Result": {}
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
InvalidParam

The parameter %v[%v] is invalid.

参数不合法

400
InvalidResourceId

resource not exists

资源不存在

500
InternalError

Unknown internal error: %v

未知错误,根据错误信息判断详情