# Connection YAML Reference


> Complete YAML reference for event-stream-connections resources in Rudder CLI.



This guide is the YAML reference for Event Stream connection resources in a Rudder CLI project. For Reverse ETL connections, see [Reverse ETL Connection YAML Reference](https://www.rudderstack.com/docs/rudder-cli/yaml-retl-connections/).

**Announcement**

**Connection support requires Rudder CLI v0.25.0 or later**.

Upgrade if you are using an earlier version.

## Overview

Set `kind` to `event-stream-connections`. The spec body is a **list**. Each entry is one Event Stream source to destination link. Store the files anywhere under the project root.

Each `source` must be `#event-stream-source:…`. A `config` block on this kind is a parse error. Connection mode and other per-source-type settings live on the [destination spec](https://www.rudderstack.com/docs/rudder-cli/yaml-destinations/).

## Connection fields

Each entry in `spec.connections` has these fields:

| Property | Type | <div>Description</div> |
| :----| :-----| :------|
| `id` <br/> Required | String | Local identifier. Must be unique across connection entries in the project. |
| `source` <br/> Required | String | Reference to an Event Stream source in this project — `#event-stream-source:[source.id]`. |
| `destination` <br/> Required | String | Reference to a destination in this project — `#destination:[destination.id]`. |
| `enabled` | Boolean | Whether this connection delivers. Defaults to `true`. Both the source and the destination must also be enabled for data to flow; `validate` warns if they are not. |

Changing `source` or `destination` replaces the connection (delete + create). The backend allows only one live row per source–destination pair. `enabled` is the only field you can update in place.

## Example

```yaml
version: rudder/v1
kind: event-stream-connections
metadata:
  name: app-connections
spec:
  connections:
    - id: android-to-s3
      source: "#event-stream-source:my-android-source"
      destination: "#destination:s3"
      enabled: true
```

## Validation rules

`rudder-cli validate` runs these checks locally. **Error** blocks validate and apply. **Warning** does not.

| Check | Severity |
| :----| :-----|
| `source` and `destination` exist in the project | Error |
| Connection `id` is unique; refs use `#event-stream-source:` and `#destination:` | Error |
| The same source–destination pair appears only once in the project | Error |
| The destination definition supports the source's type | Error |
| The destination `config` includes every field that definition requires for the connecting source type | Error |
| An `enabled` connection has both endpoints enabled | Warning |
| The destination's other project connections are also Event Stream | Error |

The following are **not** checked locally. Apply surfaces the server error: workspace plan gates, permissions, and OAuth or account existence.

Topology rules see only connections in the project. Remote-only connections (created in the dashboard and never imported) are invisible at validate time.

The rule catalog below lists every rule with valid and invalid examples.

<div class="vr-explorer vr-explorer--filtered" data-vr-explorer data-vr-instance="1">
<div class="vr-explorer__toolbar">
<div class="vr-explorer__toolbar-row">
<div class="vr-explorer__search-wrap">
<label class="vr-explorer__search-label" for="vr-rules-search-1">Search rules</label>
<input id="vr-rules-search-1" class="vr-explorer__search" type="search" placeholder="Search rules…" data-vr-search autocomplete="off">
</div>
<div class="vr-explorer__spec-wrap">
Spec version
<div class="vr-explorer__spec-toggle">
<button type="button" class="vr-explorer__spec-btn is-active" data-vr-spec="v1">v1</button>
<button type="button" class="vr-explorer__spec-btn" data-vr-spec="legacy">v0.1</button>
</div>
</div>
</div>
<div class="vr-explorer__toolbar-row vr-explorer__toolbar-row--filters">
<div class="vr-explorer__phase">
Filter by phase
<button type="button" class="vr-explorer__phase-btn is-active" data-vr-phase="all">All</button>
<button type="button" class="vr-explorer__phase-btn" data-vr-phase="syntactic">Syntactic</button>
<button type="button" class="vr-explorer__phase-btn" data-vr-phase="semantic">Semantic</button>
</div>
<p class="vr-explorer__count" data-vr-count data-vr-total="6">Showing <strong>6</strong> of 6 rules</p>
</div>
</div>
<div class="vr-explorer__rules"><div class="vr-rule" id="vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1" data-vr-rule data-phase="semantic" data-spec-version="v1" data-section="filtered-1" data-search="event-stream/connection/enabled-endpoints-valid an enabled event stream connection needs both its endpoints enabled to deliver events semantic">
<div class="vr-rule__head">
<h4 class="vr-rule__title">An enabled Event Stream connection needs both its endpoints enabled to deliver events</h4>
<div class="vr-rule__meta">
semantic
warning</div>
<p class="vr-rule__id">Rule ID: <code>event-stream/connection/enabled-endpoints-valid</code></p>
</div><div class="vr-examples vr-examples--full-border">
<h4 class="vr-examples__heading">Examples</h4><nav>
<div class="nav nav-tabs vr-examples__tabs">
<a class="nav-item nav-link active vr-examples__tab vr-examples__tab--valid" id="nav-vr-tab-vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1-valid" data-toggle="tab" href="#vr-tab-vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1-valid">

✓
Valid (2 examples)

</a>
<a class="nav-item nav-link vr-examples__tab vr-examples__tab--invalid" id="nav-vr-tab-vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1-invalid" data-toggle="tab" href="#vr-tab-vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1-invalid">

✕
Invalid (2 examples)

</a>
</div>
</nav>
<div class="tab-content vr-examples__panels" id="nav-tab-content-vr-tab-vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1">
<div class="tab-pane fade show active vr-examples__panel vr-examples__panel--valid" id="vr-tab-vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1-valid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Enabled connection whose source and destination are both enabled</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;
      enabled: true</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: true
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript
  enabled: true</code></pre></div>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Disabled connection may point at disabled endpoints</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;
      enabled: false</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: false
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript
  enabled: false</code></pre></div>
</div></div></div>
<div class="tab-pane fade vr-examples__panel vr-examples__panel--invalid" id="vr-tab-vr-rule-1-event-stream-connection-enabled-endpoints-valid-v1-invalid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Enabled connection whose source is disabled</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: true
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript
  enabled: false</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/source</code>
connection &#39;js-to-s3&#39; is enabled but its source &#39;my-js-source&#39; is disabled
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Enabled connection whose destination is disabled</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: false
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript
  enabled: true</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/destination</code>
connection &#39;js-to-s3&#39; is enabled but its destination &#39;my-s3-destination&#39; is disabled
</li></ul>
</div></div></div>
</div></div></div>
<div class="vr-rule" id="vr-rule-1-event-stream-connection-semantic-valid-v1" data-vr-rule data-phase="semantic" data-spec-version="v1" data-section="filtered-1" data-search="event-stream/connection/semantic-valid event stream connection endpoints must exist in the project and form a valid, compatible topology semantic">
<div class="vr-rule__head">
<h4 class="vr-rule__title">Event Stream connection endpoints must exist in the project and form a valid, compatible topology</h4>
<div class="vr-rule__meta">
semantic
error</div>
<p class="vr-rule__id">Rule ID: <code>event-stream/connection/semantic-valid</code></p>
</div><div class="vr-examples vr-examples--full-border">
<h4 class="vr-examples__heading">Examples</h4><nav>
<div class="nav nav-tabs vr-examples__tabs">
<a class="nav-item nav-link active vr-examples__tab vr-examples__tab--valid" id="nav-vr-tab-vr-rule-1-event-stream-connection-semantic-valid-v1-valid" data-toggle="tab" href="#vr-tab-vr-rule-1-event-stream-connection-semantic-valid-v1-valid">

✓
Valid

</a>
<a class="nav-item nav-link vr-examples__tab vr-examples__tab--invalid" id="nav-vr-tab-vr-rule-1-event-stream-connection-semantic-valid-v1-invalid" data-toggle="tab" href="#vr-tab-vr-rule-1-event-stream-connection-semantic-valid-v1-invalid">

✕
Invalid (6 examples)

</a>
</div>
</nav>
<div class="tab-content vr-examples__panels" id="nav-tab-content-vr-tab-vr-rule-1-event-stream-connection-semantic-valid-v1">
<div class="tab-pane fade show active vr-examples__panel vr-examples__panel--valid" id="vr-tab-vr-rule-1-event-stream-connection-semantic-valid-v1-valid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Connection whose source and destination exist and are compatible</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: true
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript</code></pre></div>
</div></div></div>
<div class="tab-pane fade vr-examples__panel vr-examples__panel--invalid" id="vr-tab-vr-rule-1-event-stream-connection-semantic-valid-v1-invalid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Connection whose source does not exist in the project</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: ghost-to-s3
      source: &#34;#event-stream-source:ghost-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: true
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/source</code>
event stream source &#39;ghost-source&#39; not found in the project
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Connection whose destination does not exist in the project</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-ghost
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:ghost-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/destination</code>
destination &#39;ghost-destination&#39; not found in the project
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">The same source-destination pair connected twice</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;
    - id: js-to-s3-again
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: true
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0</code>
connected more than once in the project
</li><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/1</code>
connected more than once in the project
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Destination that does not support the source&#39;s type</h4><p class="vr-example__desc">The WEBHOOK definition here supports web and android sources only; a python source connects as a cloud source, so the pairing is rejected.</p><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: python-to-webhook
      source: &#34;#event-stream-source:my-python-source&#34;
      destination: &#34;#destination:my-webhook-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-webhook-destination
spec:
  id: my-webhook-destination
  display_name: Production Webhook
  type: WEBHOOK
  enabled: true
  definition_version: 1
  config:
    webhook_url: &#34;https://example.com/hook&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-python-source
spec:
  id: my-python-source
  name: My Python Source
  type: python</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/destination</code>
does not support source &#39;my-python-source&#39;
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Destination declaring no settings for the source&#39;s type</h4><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-s3-destination
spec:
  id: my-s3-destination
  display_name: Production S3
  type: s3
  enabled: true
  definition_version: 1
  config:
    bucket_name: my-bucket
    role_based_auth: true
    iam_role_arn: &#34;arn:aws:iam::123456789012:role/rudder&#34;
    connection_mode:
      android: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/destination</code>
has no &#39;connection_mode&#39; entry for source type &#39;web&#39;
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Destination config missing a field the source type requires to connect</h4><p class="vr-example__desc">The WEBHOOK definition here requires webhook_url before a web source may connect in cloud mode; the config declares that mode but omits the field.</p><div class="rs-code">
<div class="rs-code__head">
connections.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: js-to-webhook
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-webhook-destination&#34;</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
destination.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: destination
metadata:
  name: my-webhook-destination
spec:
  id: my-webhook-destination
  display_name: Production Webhook
  type: WEBHOOK
  enabled: true
  definition_version: 1
  config:
    connection_mode:
      web: cloud</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
source.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-source
metadata:
  name: my-js-source
spec:
  id: my-js-source
  name: My JavaScript Source
  type: javascript</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
connections.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/destination</code>
config is missing fields required to connect a &#39;web&#39; source
</li></ul>
</div></div></div>
</div></div></div>
<div class="vr-rule" id="vr-rule-1-event-stream-connection-spec-syntax-valid-v1" data-vr-rule data-phase="syntactic" data-spec-version="v1" data-section="filtered-1" data-search="event-stream/connection/spec-syntax-valid event stream connection spec syntax must be valid syntactic">
<div class="vr-rule__head">
<h4 class="vr-rule__title">Event Stream connection spec syntax must be valid</h4>
<div class="vr-rule__meta">
syntactic
error</div>
<p class="vr-rule__id">Rule ID: <code>event-stream/connection/spec-syntax-valid</code></p>
</div><div class="vr-examples vr-examples--full-border">
<h4 class="vr-examples__heading">Examples</h4><nav>
<div class="nav nav-tabs vr-examples__tabs">
<a class="nav-item nav-link active vr-examples__tab vr-examples__tab--valid" id="nav-vr-tab-vr-rule-1-event-stream-connection-spec-syntax-valid-v1-valid" data-toggle="tab" href="#vr-tab-vr-rule-1-event-stream-connection-spec-syntax-valid-v1-valid">

✓
Valid (2 examples)

</a>
<a class="nav-item nav-link vr-examples__tab vr-examples__tab--invalid" id="nav-vr-tab-vr-rule-1-event-stream-connection-spec-syntax-valid-v1-invalid" data-toggle="tab" href="#vr-tab-vr-rule-1-event-stream-connection-spec-syntax-valid-v1-invalid">

✕
Invalid (4 examples)

</a>
</div>
</nav>
<div class="tab-content vr-examples__panels" id="nav-tab-content-vr-tab-vr-rule-1-event-stream-connection-spec-syntax-valid-v1">
<div class="tab-pane fade show active vr-examples__panel vr-examples__panel--valid" id="vr-tab-vr-rule-1-event-stream-connection-spec-syntax-valid-v1-valid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Valid connection linking an Event Stream source to a destination</h4><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: android-to-s3
      source: &#34;#event-stream-source:my-android-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Valid connection list with an explicitly disabled entry</h4><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: android-to-s3
      source: &#34;#event-stream-source:my-android-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;
    - id: js-to-s3
      source: &#34;#event-stream-source:my-js-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;
      enabled: false</code></pre></div>
</div></div></div>
<div class="tab-pane fade vr-examples__panel vr-examples__panel--invalid" id="vr-tab-vr-rule-1-event-stream-connection-spec-syntax-valid-v1-invalid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Connection entry missing required source and destination</h4><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: android-to-s3</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
spec.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/source</code>
&#39;source&#39; is required
</li><li class="vr-diagnostics__item">
spec.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/destination</code>
&#39;destination&#39; is required
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Connection whose source is not a reference</h4><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: android-to-s3
      source: &#34;my-android-source&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
spec.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/source</code>
&#39;source&#39; is invalid: must be of pattern #event-stream-source:&lt;id&gt;
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Connection whose source ref points at a rETL source kind</h4><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: model-to-s3
      source: &#34;#retl-source-sql-model:my-model&#34;
      destination: &#34;#destination:my-s3-destination&#34;</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
spec.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/source</code>
&#39;source&#39; must reference an event stream source (#event-stream-source:&lt;id&gt;), got a &#39;retl-source-sql-model&#39; reference
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Connection whose destination ref points at a source</h4><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: event-stream-connections
metadata:
  name: my-connections
spec:
  connections:
    - id: android-to-s3
      source: &#34;#event-stream-source:my-android-source&#34;
      destination: &#34;#event-stream-source:my-js-source&#34;</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
spec.yaml
<code class="vr-diagnostics__ref">/spec/connections/0/destination</code>
&#39;destination&#39; must reference a destination (#destination:&lt;id&gt;), got a &#39;event-stream-source&#39; reference
</li></ul>
</div></div></div>
</div></div></div>
<div class="vr-rule" id="vr-rule-1-project-duplicate-urn-v1" data-vr-rule data-phase="syntactic" data-spec-version="v1" data-section="filtered-1" data-search="project/duplicate-urn urns must be unique across the project syntactic">
<div class="vr-rule__head">
<h4 class="vr-rule__title">URNs must be unique across the project</h4>
<div class="vr-rule__meta">
syntactic
error</div>
<p class="vr-rule__id">Rule ID: <code>project/duplicate-urn</code></p>
</div><div class="vr-examples vr-examples--full-border">
<h4 class="vr-examples__heading">Examples</h4><nav>
<div class="nav nav-tabs vr-examples__tabs">
<a class="nav-item nav-link active vr-examples__tab vr-examples__tab--valid" id="nav-vr-tab-vr-rule-1-project-duplicate-urn-v1-valid" data-toggle="tab" href="#vr-tab-vr-rule-1-project-duplicate-urn-v1-valid">

✓
Valid

</a>
<a class="nav-item nav-link vr-examples__tab vr-examples__tab--invalid" id="nav-vr-tab-vr-rule-1-project-duplicate-urn-v1-invalid" data-toggle="tab" href="#vr-tab-vr-rule-1-project-duplicate-urn-v1-invalid">

✕
Invalid

</a>
</div>
</nav>
<div class="tab-content vr-examples__panels" id="nav-tab-content-vr-tab-vr-rule-1-project-duplicate-urn-v1">
<div class="tab-pane fade show active vr-examples__panel vr-examples__panel--valid" id="vr-tab-vr-rule-1-project-duplicate-urn-v1-valid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Distinct URNs across files</h4><p class="vr-example__desc">Each spec declares a different resource, so URNs do not collide.</p><div class="rs-code">
<div class="rs-code__head">
a.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: events-a
spec:
  events:
    - id: order_completed
      name: Order Completed</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
b.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: events-b
spec:
  events:
    - id: cart_viewed
      name: Cart Viewed</code></pre></div>
</div></div></div>
<div class="tab-pane fade vr-examples__panel vr-examples__panel--invalid" id="vr-tab-vr-rule-1-project-duplicate-urn-v1-invalid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Same URN declared in two files</h4><p class="vr-example__desc">Both files declare the same event ID, which resolves to one URN. The rule flags each occurrence.</p><div class="rs-code">
<div class="rs-code__head">
a.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: events-a
spec:
  events:
    - id: order_completed
      name: Order Completed</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
b.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: events-b
spec:
  events:
    - id: order_completed
      name: Order Completed (duplicate)</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
a.yaml
<code class="vr-diagnostics__ref">/spec/events/0/id</code>
duplicate URN &#39;event:order_completed&#39;
</li><li class="vr-diagnostics__item">
b.yaml
<code class="vr-diagnostics__ref">/spec/events/0/id</code>
duplicate URN &#39;event:order_completed&#39;
</li></ul>
</div></div></div>
</div></div></div>
<div class="vr-rule" id="vr-rule-1-project-manifest-inline-conflict-v1" data-vr-rule data-phase="syntactic" data-spec-version="v1" data-section="filtered-1" data-search="project/manifest-inline-conflict a (workspace_id, urn) must not be defined in both an import-manifest and inline metadata.import with differing remote_ids syntactic">
<div class="vr-rule__head">
<h4 class="vr-rule__title">A (workspace_id, urn) must not be defined in both an import-manifest and inline metadata.import with differing remote_ids</h4>
<div class="vr-rule__meta">
syntactic
error</div>
<p class="vr-rule__id">Rule ID: <code>project/manifest-inline-conflict</code></p>
</div><div class="vr-examples vr-examples--full-border">
<h4 class="vr-examples__heading">Examples</h4><nav>
<div class="nav nav-tabs vr-examples__tabs">
<a class="nav-item nav-link active vr-examples__tab vr-examples__tab--valid" id="nav-vr-tab-vr-rule-1-project-manifest-inline-conflict-v1-valid" data-toggle="tab" href="#vr-tab-vr-rule-1-project-manifest-inline-conflict-v1-valid">

✓
Valid

</a>
<a class="nav-item nav-link vr-examples__tab vr-examples__tab--invalid" id="nav-vr-tab-vr-rule-1-project-manifest-inline-conflict-v1-invalid" data-toggle="tab" href="#vr-tab-vr-rule-1-project-manifest-inline-conflict-v1-invalid">

✕
Invalid (2 examples)

</a>
</div>
</nav>
<div class="tab-content vr-examples__panels" id="nav-tab-content-vr-tab-vr-rule-1-project-manifest-inline-conflict-v1">
<div class="tab-pane fade show active vr-examples__panel vr-examples__panel--valid" id="vr-tab-vr-rule-1-project-manifest-inline-conflict-v1-valid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Manifest and inline metadata import distinct resources</h4><p class="vr-example__desc">One resource is imported via the manifest, a different one via inline metadata. No URN appears in both, so the project is valid.</p><div class="rs-code">
<div class="rs-code__head">
events.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: events
  import:
    workspaces:
      - workspace_id: &#34;ws-1&#34;
        resources:
          - urn: &#34;event:cart_viewed&#34;
            remote_id: &#34;remote_b&#34;
spec:
  events:
    - id: order_completed
      name: Order Completed
    - id: cart_viewed
      name: Cart Viewed</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
import-manifest.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: import-manifest
metadata:
  name: import-manifest
spec:
  workspaces:
    - workspace_id: &#34;ws-1&#34;
      resources:
        - urn: &#34;event:order_completed&#34;
          remote_id: &#34;remote_a&#34;</code></pre></div>
</div></div></div>
<div class="tab-pane fade vr-examples__panel vr-examples__panel--invalid" id="vr-tab-vr-rule-1-project-manifest-inline-conflict-v1-invalid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Same URN imported by both a manifest and inline metadata</h4><p class="vr-example__desc">The URN event:order_completed is declared in both the manifest and an inline metadata.import block — an ambiguous double import. The rule flags both locations; remove one.</p><div class="rs-code">
<div class="rs-code__head">
events.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: events
  import:
    workspaces:
      - workspace_id: &#34;ws-1&#34;
        resources:
          - urn: &#34;event:order_completed&#34;
            remote_id: &#34;remote_b&#34;
spec:
  events:
    - id: order_completed
      name: Order Completed</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
import-manifest.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: import-manifest
metadata:
  name: import-manifest
spec:
  workspaces:
    - workspace_id: &#34;ws-1&#34;
      resources:
        - urn: &#34;event:order_completed&#34;
          remote_id: &#34;remote_a&#34;</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
import-manifest.yaml
<code class="vr-diagnostics__ref">/spec/workspaces/0/resources/0/urn</code>
URN &#39;event:order_completed&#39; is defined in both an import-manifest and inline metadata
</li><li class="vr-diagnostics__item">
events.yaml
<code class="vr-diagnostics__ref">/metadata/import/workspaces/0/resources/0/urn</code>
URN &#39;event:order_completed&#39; is defined in both an import-manifest and inline metadata
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Manifest URN overlaps a legacy rudder/0.1 inline local_id import</h4><p class="vr-example__desc">The events spec uses the legacy rudder/0.1 format, whose inline imports reference resources by local_id &#43; remote_id. The local_id order_completed resolves to the URN event:order_completed — the same URN the manifest imports. Legacy specs are still subject to the conflict rule, so both locations are flagged; remove the inline metadata entry.</p><div class="rs-code">
<div class="rs-code__head">
events.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/0.1
kind: events
metadata:
  name: events
  import:
    workspaces:
      - workspace_id: &#34;ws-1&#34;
        resources:
          - local_id: order_completed
            remote_id: &#34;remote_b&#34;
spec:
  events:
    - id: order_completed
      name: Order Completed</code></pre></div>
</div><div class="rs-code">
<div class="rs-code__head">
import-manifest.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: import-manifest
metadata:
  name: import-manifest
spec:
  workspaces:
    - workspace_id: &#34;ws-1&#34;
      resources:
        - urn: &#34;event:order_completed&#34;
          remote_id: &#34;remote_a&#34;</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
import-manifest.yaml
<code class="vr-diagnostics__ref">/spec/workspaces/0/resources/0/urn</code>
URN &#39;event:order_completed&#39; is defined in both an import-manifest and inline metadata
</li><li class="vr-diagnostics__item">
events.yaml
<code class="vr-diagnostics__ref">/metadata/import/workspaces/0/resources/0/urn</code>
URN &#39;event:order_completed&#39; is defined in both an import-manifest and inline metadata
</li></ul>
</div></div></div>
</div></div></div>
<div class="vr-rule" id="vr-rule-1-project-metadata-syntax-valid-v1" data-vr-rule data-phase="syntactic" data-spec-version="v1" data-section="filtered-1" data-search="project/metadata-syntax-valid metadata syntax must be valid syntactic">
<div class="vr-rule__head">
<h4 class="vr-rule__title">Metadata syntax must be valid</h4>
<div class="vr-rule__meta">
syntactic
error</div>
<p class="vr-rule__id">Rule ID: <code>project/metadata-syntax-valid</code></p>
</div><div class="vr-examples vr-examples--full-border">
<h4 class="vr-examples__heading">Examples</h4><nav>
<div class="nav nav-tabs vr-examples__tabs">
<a class="nav-item nav-link active vr-examples__tab vr-examples__tab--valid" id="nav-vr-tab-vr-rule-1-project-metadata-syntax-valid-v1-valid" data-toggle="tab" href="#vr-tab-vr-rule-1-project-metadata-syntax-valid-v1-valid">

✓
Valid (2 examples)

</a>
<a class="nav-item nav-link vr-examples__tab vr-examples__tab--invalid" id="nav-vr-tab-vr-rule-1-project-metadata-syntax-valid-v1-invalid" data-toggle="tab" href="#vr-tab-vr-rule-1-project-metadata-syntax-valid-v1-invalid">

✕
Invalid (2 examples)

</a>
</div>
</nav>
<div class="tab-content vr-examples__panels" id="nav-tab-content-vr-tab-vr-rule-1-project-metadata-syntax-valid-v1">
<div class="tab-pane fade show active vr-examples__panel vr-examples__panel--valid" id="vr-tab-vr-rule-1-project-metadata-syntax-valid-v1-valid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Metadata with only the required name</h4><p class="vr-example__desc">Minimal valid metadata: a name only.</p><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: my-events
spec:
  events: []</code></pre></div>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Metadata with a well-formed import block</h4><p class="vr-example__desc">An import block where each workspace declares workspace_id and each resource references a URN in the spec body.</p><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: my-events
  import:
    workspaces:
      - workspace_id: ws-123
        resources:
          - urn: &#34;event:order_completed&#34;
            remote_id: ev-remote-456
spec:
  events:
    - id: order_completed
      name: Order Completed</code></pre></div>
</div></div></div>
<div class="tab-pane fade vr-examples__panel vr-examples__panel--invalid" id="vr-tab-vr-rule-1-project-metadata-syntax-valid-v1-invalid"><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Metadata missing required name</h4><p class="vr-example__desc">Every spec metadata block must declare a name.</p><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  import:
    workspaces:
      - workspace_id: ws-123
spec:
  events: []</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
spec.yaml
<code class="vr-diagnostics__ref">/metadata/name</code>
&#39;name&#39; is required
</li></ul>
</div></div><div class="vr-example__item">
<h4 class="vr-examples__heading vr-examples__heading--example">Import workspace missing required workspace_id</h4><p class="vr-example__desc">Each import workspace entry must declare a workspace_id.</p><div class="rs-code">
<div class="rs-code__head">
spec.yaml
yaml
<button class="rs-code__copy" type="button">

Copy
</button>
</div>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">version: rudder/v1
kind: events
metadata:
  name: my-events
  import:
    workspaces:
      - resources:
          - urn: &#34;event:order_completed&#34;
            remote_id: ev-remote-456
spec:
  events:
    - id: order_completed
      name: Order Completed</code></pre></div>
</div><div class="vr-diagnostics">
<div class="vr-diagnostics__label">Diagnostics</div>
<ul class="vr-diagnostics__list"><li class="vr-diagnostics__item">
spec.yaml
<code class="vr-diagnostics__ref">/metadata/import/workspaces/0/workspace_id</code>
&#39;workspace_id&#39; is required
</li></ul>
</div></div></div>
</div></div></div>
</div>
</div>

## Import existing connections

```bash
rudder-cli import workspace -l <project-directory>
```

Import writes all Event Stream connections into one file, `imported/event-stream/connections.yaml`. Related Event Stream sources land under `imported/event-stream/sources/`. See [How to Import Workspace Resources](https://www.rudderstack.com/docs/rudder-cli/import-resources/).

## See more

- [Manage Connections using Rudder CLI](https://www.rudderstack.com/docs/rudder-cli/connections/) for feature overview, and the [Connections walkthrough](https://www.rudderstack.com/docs/rudder-cli/connections-walkthrough/) for step-by-step setup
- [Destination YAML Reference](https://www.rudderstack.com/docs/rudder-cli/yaml-destinations/) and [Event Stream Source YAML Reference](https://www.rudderstack.com/docs/rudder-cli/yaml-event-stream-sources/)
- [Reverse ETL Connection YAML Reference](https://www.rudderstack.com/docs/rudder-cli/yaml-retl-connections/) for Reverse ETL connections

