Installation
Getting Started
Core Methods
The SDK methods are organized into the following high-level categories:- auth: Handles authentication methods.
- secrets: Manages CRUD operations for secrets.
Auth
The auth component provides methods for authentication:
Universal Auth
Authenticating- clientId(string): The client ID of your Machine Identity.
- clientSecret(string): The client secret of your Machine Identity.
We do not recommend hardcoding your Machine Identity Tokens. Setting them as environment variables would be best.
Secrets
This sub-class handles operations related to secrets:
List Secrets
- environment(string): The environment in which to list secrets (e.g., “dev”).
- projectId(string): The ID of your project.
- secretPath(string, optional): The path to the secrets.
- tagSlugs(array, optional): Tags to filter secrets.
- recursive(bool, optional): Whether to list secrets recursively.
- expandSecretReferences(bool, optional): Whether to expand secret references.
- attachToProcessEnv(bool, optional): Whether to attach secrets to process environment variables.
- skipUniqueValidation(bool, optional): Whether to skip unique validation.
- Secret[]: An array of secret objects.
Create Secret
- secretKey(string): The name of the secret to create.
- secretValue(string): The value of the secret.
- environment(string): The environment in which to create the secret.
- projectId(string): The ID of your project.
- secretPath(string, optional): The path to the secret.
- Secret: The created secret object.
Get Secret
- secretKey(string): The name of the secret to retrieve.
- environment(string): The environment in which to retrieve the secret.
- projectId(string): The ID of your project.
- secretPath(string, optional): The path to the secret.
- Secret: The retrieved secret object.
Update Secret
- secretKey(string): The name of the secret to update.
- newSecretValue(string): The new value of the secret.
- environment(string): The environment in which to update the secret.
- projectId(string): The ID of your project.
- secretPath(string, optional): The path to the secret.
- Secret: The updated secret object.
Delete Secret
- secretKey(string): The name of the secret to delete.
- environment(string): The environment in which to delete the secret.
- projectId(string): The ID of your project.
- secretPath(string, optional): The path to the secret.
- Secret: The deleted secret object.