EnterpriseVariable.UpdateVariableAsync
Description
Updates the specified Enterprise Variable details inside the connected AI Command Center
Signature [C#]
Task UpdateVariableAsync(EnterpriseVariable eVar);
Properties
Input
| Parameter | Type | Required / default | Description |
|---|---|---|---|
eVar | EnterpriseVariable | Required | Enterprise Variable details to update |
Remarks
Use UpdateVariableAsync API to update enterprise variables inside the connected AI Command Center.
Example
C#
public async Task UpdateEnterpriseVariable()
{
IControlRoomContext context = LoginControlRoom();
try
{
string updateValue = "510";
EnterpriseVariable eVar = new EnterpriseVariable()
{
ID = 1,
Value = updateValue
};
await context.EnterpriseVariables.UpdateVariableAsync(eVar);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}
See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.