Removes tags from a bastion host and deletes the tags at a time.

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 region ID of the bastion host.

ResourceType String Yes INSTANCE

The type of the resource.

Set the value to INSTANCE, which indicates that the resource is a bastion host.

ResourceId.N RepeatList Yes bastionhost-cn-78v1gc****

The ID of bastion host N.

Valid values of N: 1 to 20.

Note You can call the DescribeInstances operation to obtain the ID of the bastion host.
TagKey.N RepeatList No test

The key of tag N.

Valid values of N: 1 to 20.

All Boolean No false

Specifies whether to delete all tags that are added to the bastion host.

  • If you specify TagKey.N, the value of this parameter can only be false, which indicates that only the specified tag is deleted.
  • If you do not specify TagKey.N and the value of this parameter is true, all tags are deleted. If you do not specify TagKey.N and the value of this parameter is false, no tags are deleted.

Response parameters

Parameter Type Example Description
RequestId String A8A665B9-8550-4942-9DEE-73198051856B

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UntagResources
&RegionId=cn-hangzhou
&ResourceType=INSTANCE
&ResourceId.1=bastionhost-cn-78v1gc****
&<Common request parameters>

Sample success responses

XML format

<UntagResourcesResponse>
      <RequestId>A8A665B9-8550-4942-9DEE-73198051856B</RequestId>
</UntagResourcesResponse>

JSON format

{
    "RequestId":"A8A665B9-8550-4942-9DEE-73198051856B"
}

Error codes

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