Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Functions → Update Variable
AI-generatedOverview
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
- Updating an API key environment variable for a function to rotate credentials securely.
- 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.