@mbanq/core-sdk-js / commands / EnableDisableConfiguration
Function: EnableDisableConfiguration()
EnableDisableConfiguration(
configId,data):Command<{configId:number;data:UpdateConfigurationRequest; },UpdateConfigurationResponse>
Defined in: src/commands/rest/globalConfiguration.ts:123
Enables or disables a specific global configuration.
This API allows you to enable or disable a configuration by its ID. The configuration's enabled status will be updated according to the provided value.
Parameters
configId
number
The ID of the configuration to update
data
UpdateConfigurationRequest
Returns
Command<{ configId: number; data: UpdateConfigurationRequest; }, UpdateConfigurationResponse>
A Command that when executed returns the update confirmation
Example
// Enable a configuration
const enableCmd = EnableDisableConfiguration(33, { enabled: true });
const result = await enableCmd.execute(config);
console.log(`Configuration ${result.resourceId} updated`);
// Disable a configuration
const disableCmd = EnableDisableConfiguration(33, { enabled: false });
await disableCmd.execute(config);See
https://apidocs.cloud.mbanq.com/reference/enabledisableconfiguration API Documentation