该接口用于为指定的RDS实例创建并绑定标签。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
rds:TagResources | Write |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | 地域 ID,可以通过接口 DescribeRegions 查看可用的地域 ID。 | cn-hangzhou |
ResourceType | string | 是 | 资源类型定义。唯一取值:INSTANCE。 | INSTANCE |
ResourceId | array | 是 | 实例 ID。 | |
string | 是 | 实例 ID。可以同时对 N 个实例绑定标签,N 的取值范围:1~50。 | rm-uf6wjk5**** | |
Tag | object [] | 否 | 标签列表。 | |
Key | string | 是 | 标签键。可以同时创建 N 个标签键,N 的取值范围:1~20。不允许传入空字符串。 | testkey1 |
Value | string | 否 | 标签键对应的标签值。可以同时创建 N 个标签值,N 的取值范围:1~20。允许传入空字符串。 | testvalue1 |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "224DB9F7-3100-4899-AB9C-C938BCCB43E7"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | NumberExceed.Tags | The maximum number of Tags is exceeded. The maximum value is 20. | Tag参数中最多包含不超过20个标签。 |
400 | MissingParameter | The parameter - ResourceIds.N should not be null | - |
400 | MissingParameter | The parameter - Tags should not be null | 操作失败,标签键(Tag.N.Key)参数不能为空。 |
400 | InvalidTagKey.Malformed | The Tag.N.Key parameter is blank | 操作失败,标签键(Tag.N.Key)参数为空。 |
400 | InvalidTagValue.Malformed | The Tag.N.Value parameter is blank | 操作失败,标签键对应的标签值(Tag.N.Value)参数为空。 |
400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | 操作失败,标签键(Tag.N.Key)包含重复键。 |
400 | OperationDenied.QuotaExceed | The maximum number of Tags is exceeded. | 操作失败,Tags超过限制。 |
400 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. The maximum value is 50. | 操作失败,ResourceIds参数的编号超过有效值,有效值:50 |
400 | InvalidTagKey.Malformed | The operator is not permission for the system tag | 操作失败,没有系统标签的权限。 |
400 | Request.NotFound | The requested resource is not available. | 请求的资源不可用。 |
400 | InvalidTagValue.Malformed | The Tag.N.Value parameter is invalid. | Tag.N.Value参数无效。 |
400 | Order.ComboInstanceNotAllowOperate | A package instance is not allowed to operate independently. | 套餐实例不允许单独操作。 |
400 | Price.PricingPlanResultNotFound | Pricing plan price result not found. | 定价计划价格结果没有找到。 |
400 | Order.NoRealNameAuthentication | You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication. | 您还未通过实名认证,不符合购买条件,请登录用户中心进行实名认证。 |
400 | InsufficientAvailableQuota | Your account quota limit is less than 0, please recharge before trying to purchase. | 您的账户可用额度小于0,请先充值后再尝试购买。 |
400 | CommodityServiceCalling.Exception | Failed to call commodity service. | 调用商品服务返回失败。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||
---|---|---|---|---|---|---|---|---|
2022-06-23 | OpenAPI 描述信息更新、OpenAPI 错误码发生变更 | 看变更集 | ||||||
|