EndPointBlank.Management.Environments (end_point_blank_elixir v0.11.0)

Copy Markdown View Source

/api/v1/environments: your deployment environments (production, staging, ...), or, through EndPointBlank.Management.for_managed_client/2, a managed client's.

An environment is %{"id", "name", "domain", "is_default", "production", "synced_at", "inserted_at", "updated_at"}. The production environment cannot be changed or deleted ("protected").

Summary

Functions

Creates an environment. attrs: name and domain (required), is_default. Options: idempotency_key:.

Deletes an environment: %{"id", "deleted" => true}. Refused with "has_dependents" while grants or credentials depend on it.

One environment.

One page of environments. Options: limit:, after:.

Every environment, a page at a time. Raises EndPointBlank.Management.Error.

Updates an environment. attrs: name, domain, is_default.

Functions

create(client, attrs, opts \\ [])

Creates an environment. attrs: name and domain (required), is_default. Options: idempotency_key:.

delete(client, id)

Deletes an environment: %{"id", "deleted" => true}. Refused with "has_dependents" while grants or credentials depend on it.

get(client, id)

One environment.

list(client, opts \\ [])

One page of environments. Options: limit:, after:.

stream(client, opts \\ [])

@spec stream(
  EndPointBlank.Management.t(),
  keyword()
) :: Enumerable.t()

Every environment, a page at a time. Raises EndPointBlank.Management.Error.

update(client, id, attrs)

Updates an environment. attrs: name, domain, is_default.