All Products
Search
Document Center

Server Load Balancer:UntagResources

Last Updated:Oct 10, 2024

Removes tags from a resource.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
slb:UntagResourcesupdate
  • acl
    acs:slb:{#regionId}:{#accountId}:acl/{#aclId}
  • certificate
    acs:slb:{#regionId}:{#accountId}:certificate/{#certificateId}
  • loadbalancer
    acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
  • slb:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Classic Load Balancer (CLB) instance.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ResourceTypestringYes

The type of resource. Valid values:

  • instance: CLB instance
  • certificate: certificate
  • acl: access control list (ACL)
  • listener: listener
  • vservergroup: vServer group
  • masterslaveservergroup: primary/secondary server group
instance
AllbooleanNo

Specifies whether to remove all tags from the specified resource. This parameter takes effect only if TagKey.N is empty.

Valid values: true and false.

true
ResourceIdarrayYes

The ID of the resource. You can specify at most 20 resources.

Note Set ResourceId of the listener to LoadBalancerId_Listener protocol_Port. Set LoadBalancerId to the ID of the CLB instance, and Port to the listener port.
stringYes

The ID of the resource. You can specify at most 20 resources.

Note Set ResourceId of the listener to LoadBalancerId_Listener protocol_Port. Set LoadBalancerId to the ID of the CLB instance, and Port to the listener port. Example: lb-bp1snb10sbml4****_http_80.
lb-bp16qjewdsunr41m1****
TagKeyarrayNo

The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

Note If you do not specify TagKey, all tags are removed from the instance.
stringNo

The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

Note If you do not specify TagKey, all tags are removed from the instance.
test_slb_yaochi_tag_key-4

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

C46FF5A8-C5F0-4024-8262-B16B639225A0

Examples

Sample success responses

JSONformat

{
  "RequestId": "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}

Error codes

HTTP status codeError codeError message
400TagTypeNotSameThe category of tags in the same request must be the same.
400ResourceNotExist%s.
400DeniedForNoneTagCreator%s.
400DeniedForScopeNotEqual%s.
400InvalidParam.ResourceTypeThe specified ResourceType is invalid.
400InvalidParam.TagKeyThe specified TagKey is invalid.
400InvalidParam.TagValueThe specified TagValue is invalid.
400InvalidParam.TagKeyOrValueThe specified TagKey or TagValue is invalid.
400InvalidParam.TagOwnerUidThe specified TagOwnerUid is invalid.
400InvalidParam.TagOwnerBidThe specified TagOwnerBid is invalid.
400MissingParam.TagOwnerUidThe parameter TagOwnerUid is required.
400MissingParam.TagOwnerBidThe parameter TagOwnerBid is required.
400InvalidParameter.RegionIdThe specified RegionId does not exist.
400MissingParam.ResourceIdThe parameter ResourceId is required.
400DeniedForOperateCustomTag%s.
400Duplicate.TagKeyThe param TagKey has duplicate value.
400SizeLimitExceeded.ResourceIdThe maximum size of ResourceId is exceeded.
400SizeLimitExceeded.TagKeyThe maximum size of TagKey is exceeded.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-13The Error code has changedView Change Details