# attachmentKey

Canonical: https://docs.shumoku.dev/en/library/api/attachmentKey
Language: en

@shumoku/core · 0.4.0 · function

# attachmentKey

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/models/types.ts#L526)

Stable merge / suppression key for an attachment. \`access\` is keyed per protocol (SNMP and SSH are distinct slots); \`metrics-binding\` is keyed per metrics source (two metrics sources can each bind one element — but ONE binding per (source, element) is the invariant; extend with a role segment if per-metric-role binding is ever needed, don't overload the slot); every other kind keys by its \`kind\`. The resolver merges attachments by this key (highest-priority contribution wins per key) and the human suppresses by it (\`suppressedAttachments\`). One definition so merge and suppression never disagree on what "the same attachment slot" means.

```
attachmentKey(a: Attachment): string
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `a` | `Attachment` | No additional description. | `—` |

## Returns

```
string
```

[`libs/@shumoku/core/src/models/types.ts:526`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/models/types.ts#L526)
