Removes tags from specified Virtual Private Cloud (VPC) peering connections.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UnTagResources | The operation that you want to perform. Set the value to UnTagResources. |
ResourceId.N | String | No | pcc-bp16qjewdsunr41m1**** | The ID of the resource. You can specify up to 20 resource IDs. |
TagKey.N | String | No | FinanceDept | The key of the tag that you want to remove. You can specify up to 20 tag keys. It can be an empty string. The key can be up to 64 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with |
All | Boolean | No | false | Specifies whether to remove all tags from the specified resource. Valid values:
|
ResourceType | String | Yes | PeerConnection | The type of the resource. Set the value to PeerConnection, which specifies a VPC peering connection. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among all requests. The token can contain only ASCII characters. Note If you do not specify this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different. |
RegionId | String | Yes | cn-hangzhou | The region ID of the tag. You can call the DescribeRegions operation to query the most recent region list. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | C46FF5A8-C5F0-4024-8262-B16B639225A0 | The ID of the request. |
Success | Boolean | true | Indicates whether the tags are removed. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=UnTagResources
&ResourceId=["pcc-bp16qjewdsunr41m1****"]
&TagKey=["FinanceDept"]
&All=false
&ResourceType=PeerConnection
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-hangzhou
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UnTagResourcesResponse>
<RequestId>C46FF5A8-C5F0-4024-8262-B16B639225A0</RequestId>
<Success>true</Success>
</UnTagResourcesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C46FF5A8-C5F0-4024-8262-B16B639225A0",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | NumberExceed.Tags | The maximum number of tags is exceeded. | The error message returned because the number of tags exceeds the upper limit. |
400 | NumberExceed.ResourceIds | The maximum number of resource IDs is exceeded. | The error message returned because the specified number of resource group IDs exceeds the upper limit. |
400 | Forbidden.TagKeys | The tag key cannot be operated by the request. | The error message returned because you cannot manage the tag key by calling the operation. |
400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | The error message returned because the tag key already exists. |
400 | InvalidInstanceIds.NotFound | The instance IDs are not found. | The error message returned because the instance ID is not found. |
400 | InvalidInstanceType.NotFound | The instance type is not found. | The error message returned because the instance type is not found. |
For a list of error codes, see Service error codes.