调用UntagResources为指定的多个云产品的多个云资源统一解绑标签。
使用说明
解绑后,如果该标签没有绑定其他任何资源,系统会在24小时内自动将其删除。
本文将提供一个示例,在cn-hangzhou
地域,为VPC实例vpc-bp19dd90tkt6tz7wu****
解绑标签键为k1
的标签。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UntagResources |
要执行的操作。取值:UntagResources。 |
RegionId | String | 是 | cn-hangzhou |
资源所属的地域ID。 |
ResourceARN.N | String | 是 | arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
资源ARN(Aliyun Resource Name)。支持的资源类型和ARN示例,请参见支持标签API的资源类型。 N的取值范围:1~50。 例如:ResourceARN.1 = arn:acs:${Service}:${Region}:${Account}:${ResourceType}/${ResourceId}。 说明 ARN支持传递资源组、操作审计和资源管理的Service和ResourceType。
|
TagKey.N | String | 是 | k1 |
标签键。 N的取值范围:1~10。 |
关于公共请求参数的详情,请参见公共参数。
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 43D12436-B10F-4469-8136-FD1C5D2B2083 |
请求ID。 |
FailedResources | Array of FailedResource |
失败资源信息。 说明
|
|
FailedResource | |||
ResourceARN | String | arn:acs:ecs:cn-hangzhou:123456789****:instance/i-xxxxxxxxxx1 |
失败资源ARN。 |
Result | Object |
错误结果。 |
|
Code | String | InvalidResourceId.NotFound |
错误码。 |
Message | String | The specified ResourceIds are not found in our records. |
错误信息。 |
示例
请求示例
https://tag.aliyuncs.com/?Action=UntagResources
&RegionId=cn-hangzhou
&ResourceARN.1=arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu****
&TagKey.1=k1
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<UntagResourcesResponse>
<RequestId>43D12436-B10F-4469-8136-FD1C5D2B2083</RequestId>
<FailedResources></FailedResources>
</UntagResourcesResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "43D12436-B10F-4469-8136-FD1C5D2B2083",
"FailedResources" : {
"FailedResource" : [ ]
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParameter.ServiceCode | The ServiceCode parameter of ResourceIdARN is invalid. | ResourceIdARN的产品服务名参数非法。 |
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 | NoPermission.SystemTag | The user does not have permission to operate the system tag. | 该用户没有权限操作此系统标签。 |
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. | 每个资源上的标签数量有限制,目前有资源已经超限。 |
403 | Invalid.ResourceIdARN | The parameter ResourceIdARN is invalid. | ResourceIdARN参数非法。 |
403 | Missing.ServiceCode | You must specify ServiceCode. | 该账号没有对应的服务code。 |
403 | InvalidParameter.ResourceType | The ResourceType parameter is invalid. | 资源类型参数非法。 |
403 | InvalidParameter.TagKey | The Tag.N.Key parameter is invalid. | 标签键参数非法。 |
403 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | 标签值参数非法。 |
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. | 标签键参数不可为空。 |
访问错误中心查看更多错误码。