edit-icon download-icon

Delete configuration

Last Updated: Apr 17, 2018

## 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 name Parameter type Description
dataId String Configuration ID
group String Configuration group

Response parameters

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();
}

Exceptions

In case of reading configuration timeout or network issues, ConfigException exception is thrown.

Thank you! We've received your feedback.