Updated on 2024-04-16 GMT+08:00

Modifying Predefined Tags

Function

This API is used for modifying predefined tags.

URI

PUT /v1.0/predefine_tags

Request

  • Parameter description
    Table 1 Parameters

    Name

    Mandatory

    Type

    Description

    old_tag

    Yes

    Object

    Specifies the tag to be modified.

    For details, see Table 2.

    new_tag

    Yes

    Object

    Specifies the tag that has been modified.

    For details, see Table 3.

  • old_tag field description
    Table 2 Fields

    Name

    Mandatory

    Type

    Description

    key

    Yes

    String

    Specifies the key.

    A tag key can contain up to 36 characters. Only A-Z, a-z, 0-9, hyphens (-), underscores (_), and Unicode characters (\u4E00-\u9FFF) are allowed.

    value

    Yes

    String

    Specifies the value.

    A tag value can contain up to 43 characters and can be an empty string. Only A-Z, a-z, 0-9, periods (.), hyphens (-), underscores (_), and Unicode characters (\u4E00-\u9FFF) are allowed.

  • new_tag field description
    Table 3 Fields

    Name

    Mandatory

    Type

    Description

    key

    Yes

    String

    Specifies the key.

    A tag key can contain up to 36 characters. Only A-Z, a-z, 0-9, hyphens (-), underscores (_), and Unicode characters (\u4E00-\u9FFF) are allowed.

    value

    Yes

    String

    Specifies the value.

    A tag value can contain up to 43 characters and can be an empty string. Only A-Z, a-z, 0-9, periods (.), hyphens (-), underscores (_), and Unicode characters (\u4E00-\u9FFF) are allowed.

  • Example request
    PUT https://{TMS endpoint}/v1.0/predefined_tags
    {
        "new_tag": {
            "key": "ENV1",
            "value": "DEV1"
        },
        "old_tag": {
            "key": "ENV2",
            "value": "DEV2"
        }
    }

Example Response

Status code: 200

Successful operation

Status Codes

See Status Codes.

Error Codes

See Error Codes.