# `Ltix.Deployment`
[🔗](https://github.com/DecoyLex/ltix/blob/main/lib/ltix/deployment.ex#L1)

A specific installation of a tool on a platform, identified by an
immutable `deployment_id` assigned by the platform.

# `t`

```elixir
@type t() :: %Ltix.Deployment{deployment_id: String.t()}
```

# `new`

```elixir
@spec new(String.t() | nil) :: {:ok, t()} | {:error, Exception.t()}
```

Create a new deployment with validation.

## Validation rules

- `deployment_id` — non-empty string
- `deployment_id` — 255 ASCII characters max
- `deployment_id` — ASCII characters only

## Examples

    iex> Ltix.Deployment.new("deploy-001")
    {:ok, %Ltix.Deployment{deployment_id: "deploy-001"}}

    Ltix.Deployment.new("")
    #=> {:error, %Ltix.Errors.Invalid.MissingClaim{claim: "deployment_id"}}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
