UntagResources
Removes tags from the specified Wuying app instance groups according to Alibaba Cloud tag specifications. You can remove specific tags by tag key, or remove all custom tags from the resources at once by setting All to true without specifying tag keys. Currently, only the app instance group (APPINSTANCEGROUP) resource type is supported.
Operation description
Prerequisites
When you call this operation as a RAM user or by using STS credentials, you must have the appstreaming:UntagResources permission.
The resources from which you want to remove tags must belong to the current Alibaba Cloud account. This operation currently supports only app instance group resources. You must set ResourceType to APPINSTANCEGROUP. You can call the ListAppInstanceGroup operation to obtain the app instance group ID, and call the ListTagResources operation to query the tags bound to the resources.
metric description
A single request can remove labels from up to 50 resources. Duplicate resource IDs are automatically deduplicated.
- You must specify at least one of TagKey.N and All: If neither is specified, or if TagKey.N is not specified and All is set to false, the error code InvalidParameter.TagKeyListOrAll is returned.
If TagKey.N is specified: Only the labels corresponding to these label keys are removed. A maximum of 20 label keys can be specified in a single request. In this case, the All parameter is ignored.
If TagKey.N is not specified and All is set to true: All custom labels on the resources are removed, including Wuying system labels that start with
System/and are attached by calling the TagResources operation.
If a specified label key does not exist on a resource, the label key is skipped and no fault is returned.
Label keys that start with
System/are Wuying system labels. Only System/Scheduler/GRAYSCALE and System/Scheduler/STOP_NEW_USER_CONNECTION are supported. If you specify other label keys that start withSystem/, the error code InvalidTagPolicy.KeyInvalid or InvalidTag.SystemKeyNotAllow is returned.
Execution results
If any specified app instance group does not exist or does not belong to the current account, the entire request fails, and the error code InvalidAppInstanceGroup.NotFound is returned. No tags are removed from any resources.
If tags are successfully removed, the response contains only RequestId and does not return tag details.
If multiple resources are specified and tags are removed from only some of the resources, the operation still returns a success response, and the response does not contain failure details. You can call the ListTagResources operation to verify the tag removal results. If only one resource is specified and tag removal fails, the operation directly returns the corresponding error code.
Call sequence
Call the ListAppInstanceGroup operation to obtain the app instance group ID. To confirm the tag keys bound to the resources, call the ListTagResources operation.
Call this operation, set ResourceType to APPINSTANCEGROUP, specify ResourceId.N, and specify TagKey.N or set All to true to indicate the tags to be removed.
To bind tags again, call the TagResources operation.
The desensitized identifiers in the examples are used to demonstrate the format. Replace them with your actual identifiers when you call the operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:UntagResources |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. This parameter is required. Set this parameter to the ID of the region where the app instance group resides, such as cn-hangzhou. |
cn-hangzhou |
| ResourceType |
string |
Yes |
The resource type. This parameter is required. Currently, only app instance groups are supported. The value is not case-sensitive, but we recommend that you use uppercase letters:
If you specify other values, the error code InvalidResourceType.Invalid is returned. Valid values:
|
APPINSTANCEGROUP |
| ResourceId |
array |
Yes |
The list of resource IDs from which you want to remove tags. This parameter is required. Specify the app instance group IDs. A maximum of 50 IDs can be specified in a single request. Duplicate IDs are automatically deduplicated. All IDs must belong to existing app instance groups within the current Alibaba Cloud account. If any ID does not exist or does not belong to the current account, the entire request fails and the error code InvalidAppInstanceGroup.NotFound is returned. No tags are removed from any resources. |
|
|
string |
Yes |
The app instance group ID. You can call the ListAppInstanceGroup operation to obtain the ID. |
aig-9ciijz60n4xsv**** |
|
| TagKey |
array |
No |
The list of tag keys to be removed. A maximum of 20 tag keys can be specified in a single request. You must specify at least one of TagKey.N and All. If neither is specified, the error code InvalidParameter.TagKeyListOrAll is returned.
Tag keys that start with
If you specify other tag keys that start with |
|
|
string |
Yes |
The tag key. This parameter cannot be empty. You can call the ListTagResources operation to query the tag keys bound to the resources. |
Resolution |
|
| All |
boolean |
No |
Specifies whether to remove all custom tags from the resources. This parameter takes effect only when TagKey.N is not specified. If TagKey.N is specified, this parameter is ignored. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response of the request. If tags are successfully removed, only the request ID is returned. |
||
| RequestId |
string |
The request ID. You can use the request ID to troubleshoot issues. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
Examples
Success response
JSON format
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | ServiceUnavailable | Service unavailable. Please try again later. | Service unavailable. Please try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.