Resources
The resources section consists of the key name resources
, and then an arbitrary long list of different resources. The following types of resources are available:
Additionally, you can use the Rule Engine to create data transformation rules, to customize data handling and processing. These rules are defined within the resources section of your service commissioning files. For more information, see Rule Engine.
The following pseudo template outlines the resources section:
resources:
'<resource ID>':
'type': <resource type>
'properties': <set of properties>
'<another resource ID>':
'type': <resource type>
'properties': <set of properties>
Resource ID
Resource IDs are identifiers in Connectware that uniquely identify each resource within a file. These IDs enable proper resource referencing throughout your configuration.
Each resource ID must be unique within its file, serving as the primary reference point for that resource throughout your configuration.
When you need to reference resources from other services, the resource ID must include the source service's ID followed by a double colon (::
) as a prefix. For example: serviceA::resourceB
For more details, see Inter-Service Referencing.
Resource ID Requirements
Follow these requirements when setting up resource IDs:
Allowed characters:
ASCII letters (both lowercase and uppercase)
Numbers
Underscore (
_
)Period (
.
)
Pattern: Resource IDs must match the regular expression (
[a-zA-Z0-9][a-zA-Z0-9_.]*
).Restrictions: Hyphens (
-
) are not permitted in resource IDs as they serve as special separators between service IDs and usernames in Connectware's Docker container resource management.
Resource Type
The resource type identifies the type of resource that you are declaring. For example, Cybus::Container declares a Cybus compliant Docker container. See above for the list of available resource types.
Resource Properties
Resource properties are additional options that can be specified for a resource.
If a resource doesn’t require that properties be declared, omit the properties section of that resource.
Property values can be literal strings, lists of strings, booleans, parameter references (!ref
), pseudo references, or value substitutions (!sub
) by variables or return values of functions, or the merge (only shallow merging: !merge
) of the values from some other property in the parameters or definitions section, together with more values added here.
The following example shows you how to declare different property value types:
properties:
string: OneStringValue
string: A longer string value
number: 123
literalList:
- "[first]-string-value with a special characters"
- "[second]-string-value with a special characters"
boolean: true
referenceForOneValue: !ref myInternalResourceName
substitutedString: !sub 'Some ${param}'
joinedWithOtherProperties:
!merge
otherProperty:
oneMoreValue: 123
Last updated
Was this helpful?