Source:
<code>public void setSetting() { ConfigurationClient configurationClient = createSyncConfigurationClient(); ConfigurationSetting result = configurationClient .setSetting("prodDBConnection", "db_connection"); System.out.printf("Key: %s, Value: %s", result.key(), result.value()); result = configurationClient.setSetting("prodDBConnection", "updated_db_connection"); System.out.printf("Key: %s, Value: %s", result.key(), result.value()); END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String ConfigurationSetting resultSetting = configurationClient .setSetting(new ConfigurationSetting().key("prodDBConnection").label("westUS").value("db_connection")); System.out.printf("Key: %s, Value: %s", resultSetting.key(), resultSetting.value()); resultSetting = configurationClient .setSetting(new ConfigurationSetting() .key("prodDBConnection").label("westUS").value("updated_db_connection")); System.out.printf("Key: %s, Value: %s", resultSetting.key(), resultSetting.value()); END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting Response<ConfigurationSetting> responseSetting = configurationClient .setSettingWithResponse(new ConfigurationSetting().key("prodDBConnection").label("westUS") .value("db_connection"), new Context(key2, value2)); <START> System.out.printf("Key: %s, Value: %s", responseSetting.getValue().key(), responseSetting.getValue().value()); <END> responseSetting = configurationClient .setSettingWithResponse(new ConfigurationSetting().key("prodDBConnection").label("westUS") .value("updated_db_connection"), new Context(key2, value2)); System.out.printf("Key: %s, Value: %s", responseSetting.getValue().key(), responseSetting.getValue().value()); END: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context }</code><technical_language>getKey() getValue()</technical_language>

Target:
public void setSetting() { ConfigurationClient configurationClient = createSyncConfigurationClient(); ConfigurationSetting result = configurationClient .setSetting("prodDBConnection", "db_connection"); System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); result = configurationClient.setSetting("prodDBConnection", "updated_db_connection"); System.out.printf("Key: %s, Value: %s", result.getKey(), result.getValue()); END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String ConfigurationSetting resultSetting = configurationClient .setSetting( new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS").setValue("db_connection")); System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); resultSetting = configurationClient .setSetting(new ConfigurationSetting() .setKey("prodDBConnection").setLabel("westUS").setValue("updated_db_connection")); System.out.printf("Key: %s, Value: %s", resultSetting.getKey(), resultSetting.getValue()); END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting Response<ConfigurationSetting> responseSetting = configurationClient .setSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") .setValue("db_connection"), new Context(key2, value2)); System.out .printf("Key: %s, Value: %s", responseSetting.getValue().getKey(), responseSetting.getValue().getValue()); responseSetting = configurationClient .setSettingWithResponse(new ConfigurationSetting().setKey("prodDBConnection").setLabel("westUS") .setValue("updated_db_connection"), new Context(key2, value2)); System.out .printf("Key: %s, Value: %s", responseSetting.getValue().getKey(), responseSetting.getValue().getValue()); END: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context }