Adding Tags to a Cluster

Function

This API is used to add tags to a cluster. A cluster can have a maximum of 10 tags.

URI

POST /v1.0/{project_id}/css-cluster/{cluster_id}/tags
Table 1 Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

cluster_id

Yes

String

ID of the cluster to which a tag is to be added

Request

Table 2 tag field description

Parameter

Mandatory

Type

Description

key

Yes

String

Tag key. The value can contain up to 36 characters.

value

Yes

String

Tag value. The value contains up to 43 characters.

If value is not empty, delete tags by key/value. If value is empty, delete tags by key.

Response

None

Example

Status Code

Table 3 describes status codes.

Table 3 Status code

Status Code

Encoding

Description

400

BadRequest

Invalid request.

Do not retry the request before modification.

404

NotFound

The requested resource cannot be found.

Do not retry the request before modification.

204

OK

The request is processed successfully.