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 get the configuration.
    boolean isRemoveOk = ConfigService.removeConfig("${dataId}", "${group}");
    System.out.println(isRemoveOk);
} catch (ConfigException e) {
    // TODO Auto-generated catch block
     e.printStackTrace();
}

异常说明

读取配置超时或网络异常,抛出 ConfigException 异常。