Queries the tag keys of an Application Load Balancer (ALB) instance.

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 ListTagValues

The operation that you want to perform.

Set the value to ListTagValues.

NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

The start position of the query. If this parameter is left empty, the query starts from the beginning.

MaxResults Integer No 10

The maximum number of entries to return.

ResourceType String No loadbalancer

The type of resource. Valid values:

  • loadbalancer: an Application Load Balancer (ALB) instance
  • acl: a network access control list (ACL)
  • securitypolicy: a security policy
  • servergroup: a server group
ResourceId String No eip-resource-test

The ID of the instance.

TagKey String Yes test

The key of the resource tag.

Response parameters

Parameter Type Example Description
MaxResults Integer 10

The maximum number of entries returned.

NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

The position where the query stopped. If the response does not contain this parameter, all data has been queried.

RequestId String 593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3

The ID of the request.

TagValues Array of String owner

The tags that match all the filter conditions.

TotalCount Integer 10

The maximum number of entries returned.

Valid values: 1 to 100.

Default value: 20. This value indicates that this parameter is not set.

Note This parameter is optional.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTagValues
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=10
&ResourceType=loadbalancer
&ResourceId=eip-resource-test
&TagKey=test
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTagValuesResponse>
    <MaxResults>10</MaxResults>
    <NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
    <RequestId>593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3</RequestId>
    <TagValues>owner</TagValues>
    <TotalCount>10</TotalCount>
</ListTagValuesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "MaxResults" : 10,
  "NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId" : "593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3",
  "TagValues" : "owner",
  "TotalCount" : 10
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound.Acl The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
404 ResourceNotFound.LoadBalancer The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
404 ResourceNotFound.SecurityPolicy The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
404 ResourceNotFound.ServerGroup The specified resource %s is not found. The error message returned because the specified resource %s does not exist.

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