How to update a Config at the cluster or tenant level

I have a Config defined as

type MyConfig mixes Config, Singleton {
  enabled: boolean
}

Is there a way to set this config at the cluster level or tenant level?

The main api is MyConfig.setConfigValue(). You can check this api by c3ShowType(Config). From type Singleton you want the API inst() which is like get() for singletons

In relevant part:

/**
* Sets configuration field value at provided path in this Config object. Note will not set secret value.
* If `embeddedFileName` parameter is provided then config value will be stored in the
* @see clearConfigValue
*/
@action(authz='always')
setConfigValue: member function(path: !string,
              value: !?any,
              override: string enum ConfigOverride,
              embeddedFileName: string)

ConfigOverride.User, Tag, Tenant, Cluster all exist

So, to tie it all together:

MyConfig.inst().setConfigValue("enabled", true, ConfigOverride.CLUSTER, null);
MyConfig.inst().setConfigValue("enabled", true, ConfigOverride.TENANT, null);