Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Functions → Update Variable

AI-generated

Overview

This node interacts with the Appwrite API to update an environment variable within a specified function. It is useful for managing environment variables dynamically in Appwrite functions, such as updating API keys or configuration values without redeploying the function. For example, you can update a database connection string or an API token used by a function.

Use Case Examples

  1. Updating an API key environment variable for a function to rotate credentials securely.
  2. Changing a configuration value for a function to modify its behavior without code changes.

Properties

Name Meaning
Function ID The ID of the function where the environment variable exists.
Variable ID The ID of the environment variable to update.
Key The key name of the environment variable to update.
Value The new value for the environment variable. If left empty, the current value is retained.

Output

JSON

  • variableId - The ID of the updated environment variable.
  • key - The key name of the updated environment variable.
  • value - The new value of the updated environment variable.

Dependencies

  • Appwrite API key credential for authentication

Troubleshooting

  • Ensure the Function ID and Variable ID are correct and exist in the Appwrite project to avoid 'not found' errors.
  • Verify that the API key credential has sufficient permissions to update function environment variables.
  • If the value is left empty, the variable's value remains unchanged; ensure this is intended behavior to avoid confusion.

Discussion