Queries the tag values 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 token that is used for the next query. Valid values:

  • If this is your first query or no next query is to be sent, ignore this parameter.
  • If a next query is to be sent, set the value to the value of NextToken that is returned from the last call.
MaxResults Integer No 20

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

ResourceType String No loadbalancer

The type of the resource. Valid values:

  • loadbalancer: an 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 resource.

TagKey String Yes test

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

Response parameters

Parameter Type Example Description
MaxResults Integer 20

The number of entries returned per page.

NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

The token that is used for the next query. Valid values:

  • If NextToken is empty, it indicates that no next query is to be sent.
  • If a value of NextToken is returned, the value is the token that is used for the next query.
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 number of entries returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTagValues
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=20
&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>20</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" : 20,
  "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.