All Products
Search
Document Center

Hologres:TagResources

Last Updated:May 21, 2026

Adds tags to one or more 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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/tag HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-beijing

body

object

No

The request body.

category

string

No

The resource type.

Valid values:

  • Custom :

    A custom tag.

  • System :

    A system tag.

Custom

tagOwnerUid

integer

No

The ID of the account that owns the tag.

1062017779051424

resourceIds

array

No

The instance IDs.

string

No

The instance ID.

hgprecn-cn-zpr7886u9008

tags

array<object>

No

A collection of tags to add.

object

No

key

string

No

The tag key.

any_string

value

string

No

The tag value.

any_string

ResourceType

string

No

The instance type. Set the value to instance.

Instance

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

15CEB459-CEE0-5528-87F5-B5A9B9F9B184

Data

boolean

Indicates whether the tagging operation succeeded.

Valid values:

  • true :

    The tagging operation succeeded.

  • false :

    The tagging operation failed.

true

Success

boolean

Indicates if the API call was accepted. This is separate from whether the tagging operation itself succeeded.

Valid values:

  • true :

    The API call was accepted.

  • false :

    The API call failed.

true

ErrorCode

string

The error code.

404

ErrorMessage

string

The error message.

Internal server error.

HttpStatusCode

string

The HTTP status code.

200

Examples

Success response

JSON format

{
  "RequestId": "15CEB459-CEE0-5528-87F5-B5A9B9F9B184",
  "Data": true,
  "Success": true,
  "ErrorCode": "404",
  "ErrorMessage": "Internal server error.",
  "HttpStatusCode": "200"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.