FlyMachineClient.Secrets (fly_machine_client v0.1.0)
Module for managing secrets on Fly.io machines.
Summary
Functions
Creates a new secret for an app.
Destroys (deletes) a secret from an app.
Generates a new secret for an app.
Lists all secrets for a given app.
Functions
@spec create_secret( String.t(), String.t(), String.t(), String.t() | charlist(), FlyMachineClient.options() ) :: FlyMachineClient.response()
Creates a new secret for an app.
Parameters
- app_name: The name of the app to create the secret for
- secret_label: The label/name for the secret
- secret_type: The type of secret
- value: The secret value as a binary string or charlist
- opts: Optional list of options
Returns
on success (201 Created) {:error, error} on failure (400 Bad Request)
@spec destroy_secret(String.t(), String.t(), FlyMachineClient.options()) :: FlyMachineClient.response()
Destroys (deletes) a secret from an app.
Parameters
- app_name: The name of the app to delete the secret from
- secret_label: The label/name of the secret to delete
- opts: Optional list of options
Returns
on success (200 OK) {:error, error} on failure
@spec generate_secret(String.t(), String.t(), String.t(), FlyMachineClient.options()) :: FlyMachineClient.response()
Generates a new secret for an app.
Parameters
- app_name: The name of the app to generate the secret for
- secret_label: The label/name for the secret
- secret_type: The type of secret
- opts: Optional list of options
Returns
on success (201 Created) {:error, error} on failure (400 Bad Request)
@spec list_secrets(String.t(), FlyMachineClient.options()) :: FlyMachineClient.response()
Lists all secrets for a given app.
Parameters
- app_name: The name of the app to list secrets for
- opts: Optional list of options
Returns
on success where secrets is a list of secret data {:error, error} on failure