# 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:

* [Cybus::Connection](resources/cybus-connection)
* [Cybus::Endpoint](resources/cybus-endpoint)
* [Cybus::Mapping](resources/cybus-mapping)
* [Cybus::Container](resources/cybus-container)
* [Cybus::Link](resources/cybus-link)
* [Cybus::IngressRoute](resources/cybus-ingressroute)
* [Cybus::User](resources/cybus-user)
* [Cybus::Role](resources/cybus-role)
* [Cybus::Volume](resources/cybus-volume)
* [Cybus::File](resources/cybus-file)
* [Cybus::Server](resources/cybus-server)
* [Cybus::Node](resources/cybus-node)

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](../rule-engine).

The following pseudo template outlines the resources section:

{% code lineNumbers="true" %}
```yaml
resources:
    '<resource ID>':
        'type': <resource type>
        'properties': <set of properties>

    '<another resource ID>':
        'type': <resource type>
        'properties': <set of properties>
```
{% endcode %}

## Resource ID

The _resource identifier_ (resource ID) may consist of ascii characters (lower and upper case), numbers, underscore, and period (decimal point), identical to the ServiceID and how the Docker container names may be chosen [\[1\]](#footnotes) (regular expression pattern: `[a-zA-Z0-9][a-zA-Z0-9_.]*`). Each _resource ID_ must be unique within the file. Use the _resource ID_ to reference the resource in other parts of the file.

When referencing resources of other services, the _resource ID_ is prefixed by the service ID of the other service and a double colon `::`, as described at [inter-service referencing](../inter-service-referencing).

## 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:

{% code lineNumbers="true" %}
```yaml
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
```
{% endcode %}

### Footnotes

There is one exception from the Docker analogy: The hyphen character `-` (also called minus) is intentionally not allowed for identifiers within the Connectware, because it is used internally as the separator character between service ID and resource ID e.g. for Docker container resources.
