Expressions
The Structurizr DSL supports a number of expressions for use when including or excluding elements/relationships on views (except dynamic views). Expressions should be surrounded in quotes if they contain whitespace; for example:
include "element.tag==Tag 1"
(correct)include element.tag=="Tag 1"
(incorrect)
Element expressions
-><identifier|expression>
: the specified element(s) plus afferent couplings<identifier|expression>->
: the specified element(s) plus efferent couplings-><identifier|expression>->
: the specified element(s) plus afferent and efferent couplingselement.type==<type>
: elements of the specified type (Person
,SoftwareSystem
,Container
,Component
,DeploymentNode
,InfrastructureNode
,SoftwareSystemInstance
,ContainerInstance
,Custom
)element.parent==<identifier>
: elements with the specified parentelement.tag==<tag>[,tag]
: all elements that have all of the specified tagselement.tag!=<tag>[,tag]
: all elements that do not have all of the specified tagselement==-><identifier>
: the specified element plus afferent couplingselement==<identifier>->
: the specified element plus efferent couplingselement==-><identifier>->
: the specified element plus afferent and efferent couplings
Relationship expressions
*->*
: all relationships<identifier>->*
: all relationships with the specified source element*-><identifier>
: all relationships with the specified destination elementrelationship==*
: all relationshipsrelationship==*->*
: all relationshipsrelationship.tag==<tag>[,tag]
: all relationships that have all of the specified tagsrelationship.tag!=<tag>[,tag]
: all relationships that do not have all of the specified tagsrelationship.source==<identifier>
: all relationships with the specified source elementrelationship.destination==<identifier>
: all relationships with the specified destination elementrelationship==<identifier>->*
: all relationships with the specified source elementrelationship==*-><identifier>
: all relationships with the specified destination elementrelationship==<identifier>-><identifier>
: all relationships between the two specified elements