You need to enable JavaScript to run this app.
文档中心
NAT网关

NAT网关

复制全文
下载 pdf
标签
TagResources - 添加用户标签
复制全文
下载 pdf
TagResources - 添加用户标签
调用TagResources接口,为资源添加用户标签。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:TagResources​
要执行的操作,取值:TagResources。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
ResourceType string 必选 示例值:ngw​
绑定标签的资源类型,当前仅支持ngw,即NAT网关实例。​
​
ResourceIds.N string[] 必选 示例值:ngw-273w3e33y2y9s7fap8u2j****​
NAT网关的ID。​
  • 参数 - N:表示NAT网关的序号,单次调用数量上限50个ID。​
  • 多个ID之间请使用&分隔。​
​
Tags.N.Value string[] 可选 示例值:v1​
资源的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~20。​
  • 多个标签键之间用&分隔。​
  • 不能以 volc:或sys:开头,包括任意大小写形式。​
  • 长度取值范围为1~128字符,允许输入各国语言文字、数字、空格( )、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。​
  • 若标签键开头或结尾存在空格,系统会自动为其去除。​
同一资源的标签键不允许重复。​
​
Tags.N.Key string[] 必选 示例值:k1​
资源的标签值。​
  • 参数 - N:表示标签值的序号,取值范围:1~20。​
  • 多个标签值之间用&分隔。​
  • 长度取值范围为0~256字符,不填默认为空。​
  • 允许输入各国语言文字、数字、空格( )、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。​
  • 大小写敏感。​
  • 若标签值开头或结尾存在空格,系统会自动为其去除。​
若传入该参数,则必须先传入Tags.N.Key。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:2021062415303301022514515207C4****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=TagResources&Version=2020-04-01&ResourceType=ngw&ResourceIds.1=ResourceIds.1%3Dngw-273w3e33y2y9s7fap8u2j****%26ResourceIds.2%3Dngw-bp15zckdt37pq72zv**** HTTP/1.1​
Host: natgateway.cn-beijing.volcengineapi.com​
X-Date: 20251113T124710Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251113/cn-beijing/natgateway/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2021062415303301022514515207C4****",​
"Action": "TagResources",​
"Version": "2020-04-01",​
"Service": "natgateway",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "2021062415303301022514515207C4****"​
}​
}​
​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidTagKey.Malformed​
The specified parameter tag key is invalid.​
标签键不合法。​
400​
InvalidTagValue.Malformed​
The specified parameter tag value is invalid.​
标签值不合法。​
400​
LimitExceeded.Resource​
You've reached the limit on the number of resources that you can operate at one time.​
已达到单次可操作资源数量的上限。​
400​
InvalidResource.NotFound​
The specified resource does not exist.​
指定的资源不存在。​
400​
LimitExceeded.Tags​
You've reached the limit on the number of tags that you can operate at one time.​
已达到单次可操作标签数量的上限。​
400​
InvalidTag.Disorder​
The specified index order of tag is malformed.​
指定标签的索引顺序参数格式不合法。​
400​
QuotaExceeded.ResourceSystemTags​
You've reached the limit on the number of system tags that you can create.​
已达到单个资源可创建系统标签的数量的配额上限。​
400​
QuotaExceeded.ResourceTags​
You've reached the limit on the number of resource tags that you can create.​
已达到单个资源可创建用户标签的数量的配额上限。​
400​
InvalidResourceType.Malformed​
The specified parameter resource type is invalid.​
资源类型不合法。​
​
​
最近更新时间:2025.11.30 15:43:14
这个页面对您有帮助吗?
有用
有用
无用
无用