What are Tag Group Bindings?
Tag group bindings control which types of entities can be tagged with tags from a specific group. For example, you might want “Departments” tags to apply to both users and documents, but “Sensitivity” tags to only apply to documents.Binding Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier |
tagGroupId | string | The tag group being bound |
modelType | TagAssociationModelTypeEnum | What type of model can use this group |
modelId | string | Specific model ID (optional, for fine-grained control) |
Model Types
TheTagAssociationModelTypeEnum defines what can be bound:
| Model Type | Description |
|---|---|
resource | Resource instances |
resource_type | Specific resource types |
subject | Users, agents, services |
role | Roles |
permission | Permissions |
Creating Bindings
Bind to All Resources
Allow any resource to use tags from this group:Bind to Specific Resource Type
Only documents can have sensitivity tags:Bind to Subjects
Users can be tagged with departments:Common Binding Patterns
Department Tags for Users and Documents
Sensitivity Only for Documents
Skills for Users Only
Labor Classes for Workers and Jobs
Validation
When you try to assign a tag, Bedrock validates:- The tag group has a binding for the target’s model type
- If
modelIdis specified, the target matches that specific model - The
maxAppliedPerTargetconstraint is not exceeded
Querying Bindings
Use Cases
Access Control by Department
Bind departments to both users and documents, then use in permissions:Compliance Classification
Only certain resource types need compliance tags:Best Practices
Be intentional about bindings
Be intentional about bindings
Don’t bind tag groups to everything. Only bind to model types where the tags make sense.
Use resource_type for fine-grained control
Use resource_type for fine-grained control
When only certain resource types should have a tag group, bind to specific types rather than all resources.
Document your bindings
Document your bindings
Keep a record of which tag groups are bound to which models for your team’s reference.
Consider access control implications
Consider access control implications
If you’re using tags for access control, ensure both subjects and resources have the necessary bindings.
Next Steps
Tag-Based Access
Learn how to use tags in permission conditions