{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Create Organization Tag Constraint",
  "description": "Define a structural tag constraint for your organization. Tag constraints control which tags can be set on resources at each level of the hierarchy.",
  "type": "object",
  "required": ["key", "scope"],
  "properties": {
    "key": {
      "type": "string",
      "title": "Tag Key",
      "description": "The tag key name. Must start with a letter. Keys starting with MD_ are reserved.",
      "minLength": 1,
      "maxLength": 512,
      "examples": ["TEAM", "DOMAIN", "TIER"]
    },
    "scope": {
      "type": "string",
      "x-gql-type": "tag_constraint_scope",
      "title": "Scope",
      "description": "The resource level where this tag is set. Values cascade to child resources.",
      "enum": ["ORGANIZATION", "PROJECT", "ENVIRONMENT", "COMPONENT", "INSTANCE"]
    },
    "required": {
      "type": "boolean",
      "title": "Required",
      "description": "Whether this tag must be set when creating a resource at the specified scope.",
      "default": true
    }
  }
}
