Help Center/ ModelArts/ API Reference/ Resource Tag Management/ Obtaining Tags of a Resource Pool
Updated on 2025-11-19 GMT+08:00

Obtaining Tags of a Resource Pool

Function

This API is used to obtain the tag information of a specified resource pool. This API is used when you need to view, manage, or collect statistics on resource pool tags. Before using this API, ensure that the resource pool exists and you have the required permission. After the API is called, the system returns the tag information of the specified resource pool, including the tag key and tag value. If the resource pool does not exist, you do not have the access permission, or the resource pool is not configured with tags, the API will return an error message.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/pools/{pool_name}/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: User project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

pool_name

Yes

String

Definition: Resource pool name. The value is the name value in the metadata field of the resource pool details.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 204

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of PoolTag objects

Definition: Resource tag list.

Table 3 PoolTag

Parameter

Type

Description

key

String

Definition: Tag of the resource type.

Range: N/A

values

Array of strings

Definition: Tag value of the resource type.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

https://{endpoint}/v1/{project_id}/pools/a55eba18-1ebf-4e9a-8229-d2d3b593a3dc/tags

Example Responses

Status code: 204

Tags.

{
  "tags" : [ {
    "key" : "dev",
    "values" : [ "dev1" ]
  } ]
}

Status Codes

Status Code

Description

204

Tags.

400

Invalid parameter.

401

Authentication failed.

403

Insufficient permission.

404

Resource not found

Error Codes

See Error Codes.