Detaches tags from a specified gateway.
Operation description
When you call this operation, note the following:
You can detach a maximum of 20 tags at a time.
After a tag is detached from an instance, the tag is automatically deleted if it is not attached to any other instances.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
hcs-sgw:UntagResources | update | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | Yes | The region ID. You can call the DescribeRegions operation to query the region list. | cn-hangzhou |
ResourceRegionId | string | No | The region ID of the resource. | cn-hangzhou |
ResourceType | string | Yes | The resource type. The value must be GATEWAY. | GATEWAY |
All | boolean | No | Specifies whether to remove all tags from the instance. The default value is false. Valid values:
| false |
| ResourceId | array | Yes | The list of resource IDs. | gw-uf6wjk5xxxxxxx |
string | No | The list of gateway IDs. You can detach tags from N instances at a time. N can be a value from 1 to 50. | gw-uf6wjk5xxxxxxx | |
| TagKey | array | No | The tag key. Note
| testkey1 |
string | No | The tag key. You can remove N tag keys at a time. N can be a value from 1 to 20. An empty string is not allowed. | testkey1 |
Response elements
Element | Type | Description | Example |
object | |||
RequestId | string | The request ID. | 601B6F25-21E7-4484-99D5-3EF2625C0088 |
Examples
Success response
JSON format
{
"RequestId": "601B6F25-21E7-4484-99D5-3EF2625C0088"
}Error codes
HTTP status code | Error code | Error message | Description |
400 | MissingParameter.ResourceIds | The parameter - ResourceIds.N should not be null. | |
400 | MissingParameter.Tags | The parameter - Tags should not be null. | |
400 | Missing.TagKey | The Tag.N.Key parameter is blank. | |
400 | InvalidParameter.TagKey | The Tag.N.Key parameter is invalid. | |
400 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | |
400 | InvalidParameter.ResourceType | The ResourceType parameter is invalid. | |
400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | |
400 | The specified ResourceId is not found in our records. | The specified Tags and ResourcesIds are not allow to both empty. | |
400 | NumberExceed.ResourceIds | The ResourceIds parameter's number is exceed , Valid : 50 | |
400 | NumberExceed.Tags | The Tags parameter's number is exceed , Valid : 20 | |
403 | PermissionDenied.Scope | The specified operator not have permission to set Scope value. | |
403 | PermissionDenied.TagOwnerUid | The specified operator not have permission to set TagOwnerUid value. | |
403 | PermissionDenied.TagOwnerBid | The specified operator not have permission to set TagOwnerBid value. | |
403 | NoPermissionKey.Operator | These keys are not permission for this operator. | |
403 | NoPermissionKey.Scope | These keys are not permission for this scope. | |
403 | NoPermissionKey.Category | These keys are not permission for this category. | |
403 | NoPermission.SystemTag | The operator is not permission for the system tag. | |
403 | NoPermission.Operator | The operator is not permission for this operate. | |
404 | InvalidResourceType.NotFound | The ResourceType provided does not exist in our records. | |
404 | InvalidResourceId.NotFound | The specified ResourceId is not found in our records. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.