# Registries (/docs/typescript-sdk/registries)

> For AI agents: the complete documentation index is at https://www.daytona.com/llms.txt.

## RegistriesService [#registriesservice]

Service for managing the project's container-registry credentials.

### Constructors [#constructors]

#### Constructor [#constructor]

```ts
new RegistriesService(token: Internal, init: never): RegistriesService;
```

Built by the SDK: get it from the client.

**Parameters**:

- `token` _Internal_
- `init` _never_

**Returns**:

- `RegistriesService`

### Methods [#methods]

#### delete() [#delete]

```ts
delete(host: string): Promise<void>;
```

Deletes the credential for `host`.

**Parameters**:

- `host` _string_

**Returns**:

- `Promise<void>`

#### get() [#get]

```ts
get(host: string): Promise<Registry>;
```

Gets one registry credential's metadata (never its password). Daytona
Cloud does not serve this read yet: until it does, it throws
`NotFoundError` even for a credential that exists; use `list()` or
`iter()` there.

**Parameters**:

- `host` _string_

**Returns**:

- `Promise<Registry>`

#### iter() [#iter]

```ts
iter(options: ListRegistriesOptions = {}): AsyncIterable<Registry>;
```

**Parameters**:

- `options` _ListRegistriesOptions = \{\}_

**Returns**:

- `AsyncIterable<Registry>`

#### list() [#list]

```ts
list(options: ListRegistriesOptions = {}): Promise<ListResult<Registry>>;
```

Lists one page of registry credential metadata (never passwords).

**Parameters**:

- `options` _ListRegistriesOptions = \{\}_

**Returns**:

- `Promise<ListResult<Registry>>`

#### set() [#set]

```ts
set(host: string, options: SetRegistryOptions): Promise<Registry>;
```

Creates or replaces the credential for `host` and returns its metadata.

**Parameters**:

- `host` _string_
- `options` _SetRegistryOptions_

**Returns**:

- `Promise<Registry>`

***

## ListRegistriesOptions [#listregistriesoptions]

**Properties**:

- `cursor?` _string_
- `limit?` _number_

***

## Registry [#registry]

A project registry credential's metadata; the password is write-only and never returned.

**Properties**:

- `host` _string_ - The normalized registry host (Docker Hub aliases read `index.docker.io`).
- `kind` _RegistryKind_
- `rawKind` _string_
- `username` _string_
- `description?` _string_
- `createdAt` _string_
- `updatedAt` _string_

***

## SetRegistryKind [#setregistrykind]

```ts
type SetRegistryKind = Exclude<RegistryKind, 'unknown'>
```

The kinds `registries.set()` takes; for `ecr_role` the username is the IAM role ARN the platform assumes.

***

## SetRegistryOptions [#setregistryoptions]

Options for creating or replacing a registry credential. The API replaces
the whole credential, so each call states all of it, with one request.

**Properties**:

- `username` _string_
- `kind` _SetRegistryKind_ - `basic` for a plain username and password. For `ecr_role`, `username` is the IAM role ARN and no password is needed.
- `password?` _string_ - Write-only, never returned. Required for every kind but `ecr_role`.
- `description?` _string_ - Omitted leaves the credential without a description.
