Description
It deletes ACM configurations automatically with program to reduce operation and maintenance costs with automation.
Note If the specified configuration exists, then it deletes the configuration. If the specified
configuration doesn’t exist, then it returns a successful message.
public static boolean removeConfig(String dataId, String group) throws ConfigException
Request parameters
Parameter | Parameter Type | Description |
---|---|---|
dataId | String | Configuration ID |
group | String | Configuration group |
Returned values
Parameter type | Description |
---|---|
boolean | If the deletion is successful |
Request example
try {
// Initialize the configuration service. Retrieves the following parameters in console with sample code.
ConfigService.init("${endpoint}", "${namespace}", "${accessKey}", "${secretKey}");
// Actively retrieves configuration
boolean isRemoveOk = ConfigService.removeConfig("${dataId}", "${group}");
System.out.println(isRemoveOk);
} catch (ConfigException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Exception
A ConfigException
exception is thrown in case of a configuration read time-out or a network error.