> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hotglue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Linked Entities

> Link connectors, sources, and targets to tenants with the hotglue CLI

Use the `linked-entities` commands to link connectors, sources, and targets to a tenant on a flow. These are the entities that a tenant has connected for a given flow. Use `supported-entities get` first to discover the connection parameters a connector expects before linking it.

# Linked Entities Create

## Description

Links an entity to a tenant on a flow. By default, the command links a v2 connector.

## Samples

Link a v2 connector:

```shell theme={null}
hotglue linked-entities create --env prod.acme.com --flow bTHIweD0W --tenant acme --id shopify
```

Pass the connector configuration as a shell-quoted JSON object:

```shell theme={null}
hotglue linked-entities create \
  --env prod.acme.com \
  --flow bTHIweD0W \
  --tenant acme \
  --id s3 \
  --config '{"bucket":"my-bucket"}'
```

Use `--entity-type` and `--flow-version` to link another entity type:

```shell theme={null}
# v2 source
hotglue linked-entities create --env prod.acme.com --flow bTHIweD0W --tenant acme --id shopify --entity-type source

# v2 target with configuration
hotglue linked-entities create --env prod.acme.com --flow bTHIweD0W --tenant acme --id s3 --entity-type target --config '{"bucket":"my-bucket"}'

# v1 source
hotglue linked-entities create --env prod.acme.com --flow bTHIweD0W --tenant acme --id shopify --entity-type source --flow-version v1

# v1 target
hotglue linked-entities create --env prod.acme.com --flow bTHIweD0W --tenant acme --id s3 --entity-type target --flow-version v1
```

V1 flows support sources and targets, but not connectors.

Return machine-readable output for programmatic use:

```shell theme={null}
hotglue linked-entities create --env prod.acme.com --flow bTHIweD0W --tenant acme --id s3 --json
```

## Parameters

| Option           | Default        | Description                                                    |
| ---------------- | -------------- | -------------------------------------------------------------- |
| `--apikey`, `-k` | Profile config | Personal API Key used to authenticate the request.             |
| `--env`, `-e`    |                | **Required.** Environment containing the flow.                 |
| `--flow`, `-f`   |                | **Required.** Flow to link the entity to.                      |
| `--tenant`, `-u` |                | **Required.** Tenant to link the entity to.                    |
| `--id`           |                | **Required.** ID of an available connector, source, or target. |
| `--config`       | `{}`           | Shell-quoted JSON object containing the entity configuration.  |
| `--entity-type`  | `connector`    | Entity type. Must be `connector`, `source`, or `target`.       |
| `--flow-version` | `v2`           | Flow version. Must be `v1` or `v2`.                            |
| `--json`         | `false`        | Return machine-readable output.                                |
