ListTagResources

Updated at:
Copy as MD

Queries the tags bound to specified resources.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

epg:ListTagResources

list

*EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}

*EgressProxyGateway

acs:epg:{#regionId}:{#accountId}:egressproxygateway/{#EgressProxyGatewayId}

*EgressProxyIpPool

acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#EgressProxyIpPoolId}

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ResourceType

string

Yes

The resource type. Valid values:

  • EgressProxyGateway: Egress proxy gateway instance.

  • EgressProxyIpPool: Egress proxy IP address pool.

  • EgressProxyConfiguration: Egress configuration.

  • EgressProxyRuleGroup: Egress rule group.

Valid values:

  • EgressProxyConfiguration :

    Egress configuration.

  • EgressProxyIpPool :

    Egress proxy IP address pool.

  • EgressProxyGateway :

    Egress proxy gateway instance.

  • EgressProxyRuleGroup :

    Egress rule group.

EgressProxyGateway

ResourceId

array

No

The list of resource IDs. You can specify up to 50 resource IDs in a single call. You must specify at least one of ResourceId and Tag.

string

No

The resource ID.

epg-gw80bb6a94f835db****

Tag

array<object>

No

The list of tags. You can specify up to 20 tags in a single call. You must specify at least one of ResourceId and Tag.

object

No

The tag.

Key

string

No

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

testKey

Value

string

No

The tag value. The value can be up to 256 characters in length and cannot contain http:// or https://.

testValue

NextToken

string

No

The pagination token. Valid values:

  • Leave this parameter empty for the first query or when no next query is required.

  • If a next query is required, set the value to the NextToken value returned from the previous API call.

FFmyTO70tTpLG6I3FmYAXG****

MaxResults

integer

No

The maximum number of entries to return per page during paging in a paged query. Valid values: 1 to 1000. Default value: 20.

10

Response elements

Element

Type

Description

Example

object

Schema of Response

NextToken

string

The pagination token. Valid values:

  • If NextToken is empty, no next query is required.

  • If NextToken is returned, the value indicates the token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

C79118A9-CA6D-5359-B53E-111BE8A03DCF

TagResources

array<object>

The list of tagged resources.

object

ResourceId

string

The resource ID.

epg-gw80bb6a94f835db****

ResourceType

string

The resource type. Valid values:

  • EgressProxyGateway: Egress proxy gateway instance.

  • EgressProxyIpPool: Egress proxy IP address pool.

  • EgressProxyConfiguration: Egress configuration.

  • EgressProxyRuleGroup: Egress rule group.

Valid values:

  • EgressProxyConfiguration :

    Egress configuration.

  • EgressProxyIpPool :

    Egress proxy IP address pool.

  • EgressProxyGateway :

    Egress proxy gateway instance.

  • EgressProxyRuleGroup :

    Egress rule group.

EgressProxyGateway

TagKey

string

The tag key.

testKey

TagValue

string

The tag value.

testValue

MaxResults

integer

The maximum number of entries returned in the current request.

10

Examples

Success response

JSON format

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "C79118A9-CA6D-5359-B53E-111BE8A03DCF",
  "TagResources": [
    {
      "ResourceId": "epg-gw80bb6a94f835db****",
      "ResourceType": "EgressProxyGateway",
      "TagKey": "testKey",
      "TagValue": "testValue"
    }
  ],
  "MaxResults": 10
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParam.TagsOrResourceIds The param of %s is missing.
400 DuplicatedParam.ResourceId The param of %s is duplicated.
400 MissingParam.TagKey The param of %s is missing. The required parameter tag key is missing.
400 DuplicatedParam.TagKey The param of %s is duplicated. The tag key parameter contains duplicate values.
404 ResourceNotFound.EgressProxyGateway The specified resource of %s is not found. The specified egress proxy gateway resource does not exist.
404 ResourceNotFound.EgressProxyIpPool The specified resource of %s is not found. The specified egress proxy IP address pool resource does not exist.
404 ResourceNotFound.EgressProxyConfiguration The specified resource of %s is not found. The specified egress proxy configuration resource does not exist.
404 ResourceNotFound.EgressProxyRuleGroup The specified resource of %s is not found. The specified egress proxy rule group resource does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.