Detaches tags from gateways.

When you call the operation, take note of the following information:

  • You can detach a maximum of 20 tags at a time.
  • If a tag is detached from a gateway and is not attached to other gateways, the tag is deleted.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UntagResources

The operation that you want to perform. Set the value to UntagResources.

RegionId String Yes cn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query available region IDs.

ResourceId.N RepeatList Yes gw-uf6wjk5xxxxxxx

The list of gateway IDs. You can attach tags to N gateways at a time. Valid values of N: 1 to 50.

ResourceType String Yes GATEWAY

The type of the resource. Valid value: GATEWAY.

TagKey.N RepeatList Yes testkey1

The key of the tag. You can detach N tag keys at a time. Valid values of N: 1 to 20. This parameter cannot be an empty string.

All Boolean No false

Specifies whether to detach all tags from the gateway. Valid values:

  • true
  • false

Default value: false

Note This parameter takes effect only when TagKey.N is not specified.

Response parameters

Parameter Type Example Description
RequestId String 601B6F25-21E7-4484-99D5-3EF2625C0088

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UntagResources
&RegionId=cn-hangzhou	
&ResourceId.1=gw-uf6wjk5xxxxxxx	
&ResourceType=GATEWAY
&TagKey.1=testkey1
&<Common request parameters>

Sample success responses

XML format

<UntagResourcesResponse>
          <RequestId>601B6F25-21E7-4484-99D5-3EF2625C0088</RequestId>
</UntagResourcesResponse>

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.