Skip to manual
gluon

GOL language

Segment

A Segment is a named slice of the ontology. Deployments give segments to audiences.

Model author or developer

Where it goes

Contoso keeps core-party in security/segments/core-party.yaml. The loader reads every YAML file under the package root, so folders are a convention you can change. Name it in lowercase kebab-case. The name must be unique among the package's Segment resources.

Fields

The keys under spec. Nested shapes follow SegmentSpec in the GOL JSON Schema.

FieldPresenceShape
includeRequiredarray
excludeOptionalarray
requiresOptionalarray
crossSegmentLinksOptionalenum: hide, stub
defaultPoliciesOptionalarray

Syntax and rules

The examples are fragments. Put them in a package next to the resources they reference. A ... stands for a CEL expression you write yourself.

10.4 Segment

The unit of permissioning and deployment. A segment is a named slice of the ontology.

GOL · YAML
kind: Segment
metadata: { name: procurement-emea, title: Procurement EMEA }
spec:
  include:
    - { domain: procurement }
    - { domain: party, names: [Supplier, Organization] }
    - { labels: { tier: core } }
  exclude:
    - { ref: "procurement.Contract#negotiatedRate" }
  requires: ["segment:core-party"] # closure: a segment must contain or require every type its links touch
  crossSegmentLinks: stub # how a link to an unseen type is shown: hide | stub ("1 restricted object")
  defaultPolicies: ["policy:contracts-by-region"]

Closure is validated: a link whose far end is in no included or required segment is error GLN-E521 under hide and warning GLN-W523 under stub. Links with status: proposed do not count, because they are never deployed.

Check your package

Shell
gluon validate examples/contoso
gluon test examples/contoso

validate reports each problem with a GLN code and its place in the file. test runs the package's Test resources. See the language guide and the diagnostics.

Contoso's core-party Segment in the designer's YAML pane, with its validation status.
Contoso's core-party Segment in the designer's YAML pane, with its validation status.