Update
client.vals.environmentVariables.update(stringkey, EnvironmentVariableUpdateParams { val_id, value, description } params, RequestOptionsoptions?): EnvironmentVariableUpdateResponse { createdAt, description, key, updatedAt }
/v2/vals/{val_id}/environment_variables/{key}
Update a environment variable scoped to this project.
Parameters
key: string
Returns
import ValTown from "npm:@valtown/sdk";
const client = new ValTown();
const environmentVariable = await client.vals.environmentVariables.update('key', {
val_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
value: 'value',
});
console.log(environmentVariable.createdAt);
{
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"key": "key",
"updatedAt": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"key": "key",
"updatedAt": "2019-12-27T18:11:19.117Z"
}