Cloud Services

ModernOps configuration

Tag definitions
Published On Oct 10, 2024 - 9:12 AM

Tag definitions

This page covers the model and attributes used to define tag definitions in Kyndryl Platform.

Tag definition model

The following example shows the tag definition model:
{ "description": "Tag Description" "tag_key": "TagKey", "version": 1, "tag_aliases": ["List of alias names for the tag_key"], "value_type": "Number/String/Enum", "tag_value_constraint": {"regex":""}/{"range": []}/{"min": 0}/{"max": 100}/{"values": []}, "mandatory": "Always/Never/Conditional", "default_value": "non-prod", "associated_tag_schemas": ["schema_ids"], "conditions": { "providers": ["gcp"], "provider_accounts": ["account2"], "service_type": ["Amazon EC2"], "category": ["Compute"](Note: Future support, not in phase 1) } }

Tag definition attributes

The following table lists the attributes used to define tag definition:
Field
Description/Purpose
Mandatory
Data type
User input or generated
description
An optional description of the tag definition
No
String
User input
tag_key
Unique key for the tag
Yes
String
User input
version
Specifies the version of the tag definition
Yes
Integer
User input
tag_aliases
List of alias names for the tag_key
No
List of Strings
User input
tag_value_constraint
Constraint on tag value
No, see Tag definition value constraints for the detailed permitted value list.
User input
value_type
The data type of tag_value
Yes
String, the following enums are allowed:
  • String
  • Number
  • Enum
User input
default_value
Default value of Tag value
No
Any
User input
associated_tag_schemas
List of all tag schemas this tag is associated with
No
List of Strings
User input
mandatory
Specifies whether the tag_key/tag_key-value is mandatory
Yes
String, the following enums are allowed:
  • "Always"
  • "Conditional"
  • "Never"
User input
conditions
Conditions when mandatory = "Conditional"
No, only when mandatory = "Conditional"
See "Tag definition conditions" on Defining Tag Definitions

Tag definition value constraints

The following table lists the tag value constraints that can be added to your tag definition:
value_type
Purpose
Possible values of tag_value_constraint
String
Defines that the value of the tag should always be a string
You have these options, which are mutually exclusive:
  • Leave it undefined if you do not want to specify a format
  • {“regex”:””} to force it to conform to the regex format that you specify
Number
Defines that the value of the tag should always be a number
You have these options, which are mutually exclusive:
  • Leave it undefined if you do not want to specify a range
  • {"range": ["0:10", "20:30", "-0.5:-0.1"]}
  • {“max”: 100}
  • {“min”: 0}
Enum
Defines that the value of the tag should have any of the values in the list
You have these options, which are mutually exclusive:
  • {“values”: []} to define static values
  • {“values”: [${variable}]} to define dynamic values
Note:
Dynamic values are not currently available.
Do you have two minutes for a quick survey?
Take Survey