v2 bucket CRUD operations for backwards compatibility.
Delegates to the configured InfluxElixir.Client implementation.
Use this module when working with InfluxDB v2 bucket APIs.
Examples
{:ok, conn} = InfluxElixir.Client.Local.start()
:ok = InfluxElixir.Admin.Buckets.create(conn, "my_bucket")
{:ok, buckets} = InfluxElixir.Admin.Buckets.list(conn)
:ok = InfluxElixir.Admin.Buckets.delete(conn, "my_bucket")
Summary
Functions
Creates a bucket in InfluxDB v2.
Deletes a bucket in InfluxDB v2.
Lists all buckets in InfluxDB v2.
Functions
@spec create(InfluxElixir.Client.connection(), binary(), keyword()) :: :ok | {:error, term()}
Creates a bucket in InfluxDB v2.
Parameters
connection- a client connection termname- the bucket name to createopts- optional keyword list (e.g.:org_id,:retention_seconds)
Returns
:okon success{:error, reason}on failure
@spec delete(InfluxElixir.Client.connection(), binary()) :: :ok | {:error, term()}
Deletes a bucket in InfluxDB v2.
Parameters
connection- a client connection termname- the bucket name to delete
Returns
:okon success{:error, reason}on failure
@spec list(InfluxElixir.Client.connection()) :: {:ok, [map()]} | {:error, term()}
Lists all buckets in InfluxDB v2.
Parameters
connection- a client connection term
Returns
{:ok, [map()]}on success{:error, reason}on failure