详情页标题前

阿里云ECS云服务器TagResources-云淘科技

详情页1

调用TagResources为指定的EBS资源统一创建并绑定标签。

接口说明

绑定标签前,阿里云会校验资源已有标签数量。超过限制值后返回报错信息。更多详情,请参见使用限制。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String TagResources

系统规定参数。取值:TagResources

ResourceId.N String pair-cn-c4d2t7f****

资源ID。N的取值范围为:1~50。

Tag.N.Key String tag-key

资源的标签键。N的取值范围:1~20。一旦传入该值,则不允许为空字符串。最多支持128个字符,不能以aliyunacs:开头,不能包含http://或者https://

Tag.N.Value String tag-value

资源的标签值。N的取值范围:1~20。一旦传入该值,可以为空字符串。最多支持128个字符,不能以acs:开头,不能包含http://或者https://

RegionId String cn-hangzhou

资源所属的地域ID。您可以调用DescribeRegions查看最新的阿里云地域列表。

ResourceType String pair

资源类型定义。取值范围:

  • dbsc:专属块存储集群。
  • pair:异步复制关系。
  • group:一致性复制组。
ClientToken String 0c593ea1-3bea-11e9-b96b-88e9fe63****

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符,且不能超过64个字符。更多详情,请参见如何保证幂等性。

返回数据

名称 类型 示例值 描述
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

请求ID。无论调用接口成功与否,我们都会返回请求ID。

示例

请求示例

http(s)://ebs.cn-hangzhou.aliyuncs.com/?Action=TagResources
&ResourceId.1=pair-cn-c4d2t7f****
&RegionId=cn-hangzhou
&ResourceType=pair
&ClientToken=0c593ea1-3bea-11e9-b96b-88e9fe63****
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml


    473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidParameter The parameter %s is invalid. 参数错误
400 InvalidParameter.Conflict The specified parameter %s and %s are not blank at the same time. 参数冲突
400 InvalidParameter.Format Specified parameter format is not valid. 返回值格式不正确(Format 不支持)。返回格式支持 XML 与 JSON,默认为 XML。
400 MissingParameter The input parameter %s that is mandatory for processing this request is not supplied. 参数缺失。
400 Duplicate.TagKey The Tag.N.Key contain duplicate key. 标签中存在重复的键,请保持键的唯一性。
400 NumberExceed.ResourceIds The ResourceIds parameter number is exceed , Valid : 50 参数“ResourceIds”中包含的“ResourceId”不能超过 50 个。
400 NumberExceed.Tags NumberExceed.Tags 标签个数超过最大限制,本操作最多可以操作 20 个标签。
403 Forbidden User is not authorized to operate. 当前用户无权限对当前资源执行任何操作。请检查您的账号权限或者咨询您的主账号管理员。
403 Forbidden.Action User is not authorized to operate this action. 当前用户无权限执行该操作。请检查您的账号权限或者咨询您的主账号管理员。
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance. 您的账户余额不足。
403 LastTokenProcessing The last token request is processing. 相同clientToken的请求正在执行,请稍后再重试。
403 NoPermission.SLR The RAM user does not have the permission to create service linked role: AliyunServiceLinkedRoleForEBS. 当前用户无权限创建SLR。
403 OperationDenied The operation is not allowed. 当前操作不允许执行。
403 InvalidPayMethod The specified pay method is not valid. 不支持该购买方式。请检查您传入的参数chargeType是否正确。
403 OperationDenied.QuotaExceed The operation is not allowed due to quota exceed. 当前操作已超过使用配额。
403 NotOnSale.Region The specified region is not on sale. 当前Region停售或无库存。
403 NotOnSale.Zone The specified zone is not on sale. 当前Zone停售或无库存。
404 InvalidApi.NotFound Specified api is not found, please check your url and method. 找不到指定的 API。请检查调用的 URL 和方法。您调用的 API 不存在。请检查 API 的名称是否正确,请注意确认大小写。
404 InvalidResourceId.NotFound The specified ResourceIds are not found in our records. 指定的资源不存在,请检查参数ResourceId是否正确。
404 InvalidResourceType.NotFound The ResourceType provided does not exist in our records. 指定的资源类型不存在。
404 MissingParameter.ResourceType The parameter – ResourceType should not be null 参数ResourceType不能为空。
404 NoSuchResource The specified resource does not exist. 指定的资源不存在。
404 InvalidRegionId.NotFound The specified RegionId does not exist. 指定的RegionId不存在。
404 InvalidZoneId.NotFound The specified ZoneId does not exist. 指定的ZoneId不存在。
500 InternalError The request processing has failed due to some unknown error, exception or failure. 内部错误。
504 RequestTimeout The request is timeout, please try again later. 该请求超时,请稍后再重试。

访问错误中心查看更多错误码。

腾讯云1折,限时活动,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利。同意关联立享优惠

转转请注明出处:https://www.yunxiaoer.com/153270.html

(0)
上一篇 2023年12月9日
下一篇 2023年12月9日
详情页2

相关推荐

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
本站为广大会员提供阿里云、腾讯云、华为云、百度云等一线大厂的购买,续费优惠,保证底价,买贵退差。