You need to enable JavaScript to run this app.
导航

UntagResources

最近更新时间2024.04.10 10:14:14

首次发布时间2023.11.10 10:02:49

调用UntagResources接口,为资源删除用户标签。

请求参数

名称类型是否必选示例值描述
ActionStringUntagResources要执行的操作,取值为UntagResources。
VersionString2020-04-01API版本信息,当前版本为2020-04-01。

ResourceType

String

transitrouter

资源的类型,取值如下:

  • transitrouter:中转路由器实例。
  • transitrouterroutetable:TR路由表。
  • transitrouterattachment:实例连接,包括VPC、VPN、专线网关类型网络实例连接和跨地域连接。
  • transitrouterbandwidthpackage:中转路由器带宽包。

ResourceIds.N

String

ResourceIds.1=tr-273sdsdsxxxxxp8u2j****&ResourceIds.2=tr-2fe6fszjgeznk5oxruv0u****

资源的ID。

  • 参数 - N:表示资源 ID的序号,单次调用数量上限50个。
  • 多个资源 ID之间使用&分隔。

说明

TagKeys.N

String

TagKeys.1=k1&TagKeys.2=k2

待删除用户标签的标签键。不能以空格开头或结尾。

  • 参数 - N:表示标签键的序号,单次调用数量上限20个。
  • 多个标签键之间使用&分隔。

说明

传入的Tags.N.Key不存在或已经解绑时默认返回解绑成功,不报错。

返回参数

名称类型示例值描述
RequestIdString2021062415303301022514515207C4****请求ID。

请求示例

GET /?Action=UntagResources&Version=2020-04-01&ResourceType=transitrouter&ResourceIds.1=tr-273sdsdsxxxxxp8u2j****&ResourceIds.2=tr-2fe6fszjgeznk5oxruv0u****&TagKeys.1=k1&TagKeys.2=k2 HTTP/1.1
Host: open.volcengineapi.com
ServiceName: transitrouter
Region: cn-guangzhou

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2021062415303301022514515207C4****",
        "Action": "UntagResources",
        "Version": "2020-04-01",
        "Service": "transitrouter",
        "Region": "cn-guangzhou"
    },
    "Result": {
        "RequestId": "2021062415303301022514515207C4****"
    }
}

错误码

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

HttpCode错误码错误信息描述
400InvalidResourceType.MalformedThe specified parameter resource type is invalid.资源类型不合法。
400InvalidTagKey.MalformedThe specified parameter tag key is invalid.标签键不合法。
400LimitExceeded.ResourceYou've reached the limit on the number of resources that you can operate at a time.已达到单次可操作资源数量的上限。
400LimitExceeded.TagsYou've reached the limit on the number of tags that you can operate at a time.已达到单次可操作标签数量的上限。
404InvalidResource.NotFoundThe specified resource does not exist.指定的资源不存在。