All Products
Search
Document Center

ApsaraDB RDS:UntagResources

Last Updated:May 29, 2023

Removes tags from instances.

Operation Description

Note
  • You can remove up to 20 tags at a time.

  • If a tag is removed from an instance and is not added to other instances, the tag is automatically deleted.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rds:UntagResourcesWRITE
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ResourceTypestringYes

The type of the resource. Set the value to INSTANCE.

INSTANCE
AllbooleanNo

Specifies whether to delete all tags of the instance. Valid values:

  • true
  • false

Default value: false.

NoteThis parameter is valid if parameters that contain TagKey.N are not specified.
false
ResourceIdarrayYes

The IDs of instances. You can remove tags from N instances at a time. Valid values of N: 1 to 50.

stringNo

The ID of the instance.

rm-uf6wjk5xxxxxxx
TagKeyarrayNo

The list of tag keys. You can delete N tag keys at a time. Valid values of N: 1 to 20. The value of this parameter cannot be an empty string.

stringNo

The key of the tag.

key1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

601B6F25-21E7-4484-99D5-3EF2625C0088

Examples

Sample success responses

JSONformat

{
  "RequestId": "601B6F25-21E7-4484-99D5-3EF2625C0088"
}

Error codes

HTTP status codeError codeError messageDescription
400NumberExceed.TagsThe number of parameter Tags is exceed, Valid : 20-
400NumberExceed.ResourceIdsThe number of ResourceIds parameter is exceed , Valid : 50-
400InvalidTagValue.MalformedThe Tag.N.Value parameter is blankThe Tag.N.Value is empty.
400MissingParameterThe parameter - ResourceIds.N should not be null-
400InvalidTagKey.MalformedThe Tag.N.Key parameter is blankThe operation failed. The Tag.N.Key parameter is empty.
400InvalidResourceId.NotFoundResourceId does not refer to an existing DB instance.The operation failed. The value of the ResourceId parameter is not the ID of an existing RDS instance.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-09-01The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change