Scaleway Key Manager
@sntxrr/scaleway-key-managerv2026.07.19.2
01README
Manage a Scaleway Key Manager (KMS) key — sync metadata, create, delete, rotate, list keys in a region, and encrypt/decrypt data, via the Key Manager API with X-Auth-Token auth. Plaintext is handled as sensitive and never logged or stored.
02Models
@sntxrr/scaleway-key-managerv2026.07.19.2scaleway_key_manager.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| secretKey | string | Scaleway API secret key. Wire with ${{ vault.get(scaleway, SCW_SECRET_KEY) }}. |
| projectId | string | Scaleway Project ID that owns the key. |
| region | string | Region, e.g. fr-par, nl-ams, pl-waw. |
| keyId? | string | ID of the Key Manager key this model manages. Optional — `create` |
| endpoint? | string | Override the API host. Defaults to https://api.scaleway.com. |
fn sync()
Fetch the key's current metadata (GetKey).
fn create(name: string, description?: string, usageSymmetricEncryption: string, tags?: array, unprotected: boolean)
Provision a new key (CreateKey) and snapshot its metadata.
| Argument | Type | Description |
|---|---|---|
| name | string | Name of the new key. |
| description? | string | Human-readable description of the key. |
| usageSymmetricEncryption | string | Symmetric-encryption algorithm for the key, e.g. aes_256_gcm. |
| tags? | array | Tags to attach to the new key. |
| unprotected | boolean | Whether the key can be deleted without first disabling protection. |
fn delete()
Deprovision the key (DeleteKey).
fn encrypt(plaintext: string, associatedData?: string)
Encrypt base64 plaintext with the key (Encrypt); snapshots only the ciphertext.
| Argument | Type | Description |
|---|---|---|
| plaintext | string | Base64-encoded plaintext to encrypt. SENSITIVE: never logged or stored. |
| associatedData? | string | Optional base64-encoded additional authenticated data (AAD). Not secret. |
fn decrypt(ciphertext: string, associatedData?: string)
Decrypt ciphertext with the key (Decrypt); returns plaintext in a sensitive field.
| Argument | Type | Description |
|---|---|---|
| ciphertext | string | Ciphertext previously returned by encrypt. Not secret. |
| associatedData? | string | Optional base64-encoded additional authenticated data (AAD) used at encrypt time. |
fn rotate()
Rotate the key's material (RotateKey) and re-snapshot it.
fn protect()
Enable deletion protection on the key (ProtectKey). A protected key
fn unprotect()
Disable deletion protection on the key (UnprotectKey), allowing it to
fn list()
Discover all keys in the region (factory).
Resources
key(infinite)— Snapshot of the Key Manager key's metadata (no secrets)
cipher(infinite)— Result of an encrypt call — ciphertext only (non-secret)
plaintext(infinite)— Result of a decrypt call — recovered plaintext in a sensitive field
03Previous Versions
2026.07.19.1
Modified 1 models
2026.07.18.1
04Stats
A
100 / 100
Downloads
0
Archive size
12.6 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
Repository
https://github.com/sntxrr/swamp-scaleway05Platforms
06Labels