Updated on 2024-01-09 GMT+08:00

Modifying a predefined tag

Function

Modify predefined tags.

Calling Method

For details, see Calling APIs.

URI

PUT /v1.0/predefine_tags

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. TMS is a global service. When calling the Identity and Access Management (IAM) API to obtain a user token, set the scope field to domain. The value of X-Subject-Token in the response header is the user token.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

new_tag

Yes

PredefineTagRequest object

Specifies the modified tag.

old_tag

Yes

PredefineTagRequest object

Specifies the tag before modification.

Table 3 PredefineTagRequest

Parameter

Mandatory

Type

Description

key

Yes

String

Specifies the tag key. The value can contain up to 36 characters including letters, digits, hyphens (-), and underscores (_).

value

Yes

String

Specifies the tag value.The value can contain up to 43 characters including letters, digits, periods (.), hyphens (-), and underscores (_). It can be an empty string.

Response Parameters

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 5 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 7 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 9 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 404

Table 10 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 11 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 405

Table 12 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 13 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 406

Table 14 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 15 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 409

Table 16 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 17 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 410

Table 18 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 19 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 412

Table 20 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 21 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 429

Table 22 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 23 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 500

Table 24 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 25 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 501

Table 26 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 27 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Status code: 503

Table 28 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Response error information.

Table 29 RespErrorMessage

Parameter

Type

Description

error_code

String

Request error code.

error_msg

String

Error message

Example Requests

Modifying a predefined tag

PUT https://{Endpoint}/v1.0/predefined_tags

{
  "new_tag" : {
    "key" : "ENV1",
    "value" : "DEV1"
  },
  "old_tag" : {
    "key" : "ENV2",
    "value" : "DEV2"
  }
}

Example Responses

None

Status Codes

Status Code

Description

204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

406

Not Acceptable

409

Conflict

410

Gone

412

Precondition Failed

429

Too Many Requests

500

Internal Server Error

501

Not Implemented

503

Service Unavailable

Error Codes

See Error Codes.