为指定的多个云产品的多个云资源统一创建并绑定标签。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
tag:TagResources |
update |
*全部资源
|
无 |
|
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。取值:
|
cn-hangzhou |
| RegionId |
string |
是 |
地域 ID。取值:
|
cn-hangzhou |
| Tags |
string |
是 |
标签键和标签值。键值对取值范围:1~10。 如果指定多个标签,则会为指定资源同时创建并绑定该多个标签。 约束如下:
|
{"k1":"v1","k2":"v2"} |
| ResourceARN |
array |
是 |
资源 ARN(Aliyun Resource Name)。 N 的取值范围:1~50。 资源 ARN 的格式:
说明
ResourceARN 支持传递资源组、操作审计和资源管理的 |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
|
string |
否 |
资源 ARN(Aliyun Resource Name)。 |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
关于公共请求参数的详情,请参见公共参数。
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数。 |
||
| RequestId |
string |
请求 ID。 |
72086426-9F8C-4A60-852B-864048FD1199 |
| FailedResources |
object |
||
| FailedResource |
array<object> |
失败资源信息。 说明
|
|
|
array<object> |
失败资源信息。 |
||
| ResourceARN |
string |
失败资源 ARN。 |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
| Result |
object |
错误结果。 |
|
| Code |
string |
错误码。 |
InvalidResourceId.NotFound |
| Message |
string |
错误信息。 |
The specified ResourceIds are not found in our records. |
示例
正常返回示例
JSON格式
{
"RequestId": "72086426-9F8C-4A60-852B-864048FD1199",
"FailedResources": {
"FailedResource": [
{
"ResourceARN": "arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu****",
"Result": {
"Code": "InvalidResourceId.NotFound",
"Message": "The specified ResourceIds are not found in our records."
}
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidResourceARN.Region | The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. | ResourceARN中的Region与参数RegionId不匹配,它们分别是:%s |
| 400 | InvalidResourceARN.Account | The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. | ResourceARN中的Account与实际用户不吻合,分别是:%s |
| 400 | InvalidResourceARN.FormatError | The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. | ResourceARN的格式不符合规范,正确的格式请参考错误诊断。 |
| 400 | InvalidParameter.ResourceType | The parameter resource type: %s in ResourceARN is not valid or not support. | 在ResourceARN中的ResourceType:%s 不合法或不被支持。 |
| 400 | InvalidParameter.ServiceCode | The parameter service code: %s in ResourceARN is not valid or not support. | ResourceARN中的ServiceCode:%s 不合法或未被支持。 |
| 400 | InvalidParameter.TagKey | The TagKey parameter is invalid. The following TagKeys are invalid: %s. | 参数中存在不合法的标签键,不合法的标签键如下:%s |
| 400 | InvalidParameter.TagValue | The TagValue parameter is invalid. The following TagValues are invalid: %s. | 参数中包含不合法的标签值,不合法的标签值如下:%s |
| 400 | InvalidParameter.Tags | The Tags parameter cannot be empty, and JSON parsing should adhere to the format of a Map. | |
| 403 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | 参数包含重复标签键。 |
| 403 | InvalidParameter.Category | The specified Category is invalid. Valid values are Custom and System. | 标签类型非法,合法值为Custom,System。 |
| 403 | MissingParameter.Createby | You must specify Createby. | 操作者参数不可为空。 |
| 403 | MissingParameter.ResourceIds | You must specify ResourceIds. | 资源列表参数不可为空。 |
| 403 | NoPermission.Operator | The user is not authorized to operate on the specified resource. | 该用户没有权限操作。 |
| 403 | NoPermissionKey.Category | Some keys cannot be modified because the user does not have permission. | 某些key的标签类型没有操作权限。 |
| 403 | NoPermissionKey.Operator | You are not authorized to operate the tag key. | 该用户没有操作此标签键权限。 |
| 403 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. | 资源列表参数数量超限。 |
| 403 | NumberExceed.Tags | The maximum number of Tags is exceeded. | 标签参数数量超限。 |
| 403 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | 每个资源上的标签数量有限制,目前有资源已经超限。 |
| 404 | Missing.TagKey | Tag.N.Value has been specified and you must specify Tag.N.Key. | 一对键值对,对应的TagValue缺失相同N的TagKey。 |
| 404 | MissingParameter.AliUid | You must specify AliUid. | 缺失用户UID参数。 |
| 404 | MissingParameter.Bid | You must specify Bid. | bid参数不可为空。 |
| 404 | MissingParameter.TagKey | You must specify TagKey. | 标签键参数不可为空。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。