in aws-applicationinsights-application/src/main/java/software/amazon/applicationinsights/application/HandlerHelper.java [911:945]
public static boolean appNeedsUpdate(ResourceModel model, DescribeApplicationResponse response) {
// CWEEnable = null from cfn model means its true by default.
Boolean newCWEMonitorEnabled = model.getCWEMonitorEnabled() == null || model.getCWEMonitorEnabled();
Boolean preCWEMonitorEnabled = response.applicationInfo().cweMonitorEnabled() != null && response.applicationInfo().cweMonitorEnabled();
if (newCWEMonitorEnabled != preCWEMonitorEnabled) {
return true;
}
Boolean newOpsCenterEnabled = model.getOpsCenterEnabled() != null && model.getOpsCenterEnabled();
Boolean preOpsCenterEnabled = response.applicationInfo().opsCenterEnabled() != null && response.applicationInfo().opsCenterEnabled();
if (newOpsCenterEnabled != preOpsCenterEnabled) {
return true;
}
String newOpsItemSNSTopicArn = model.getOpsItemSNSTopicArn();
String preOpsItemSNSTopicArn = response.applicationInfo().opsItemSNSTopicArn();
if((newOpsItemSNSTopicArn == null && preOpsItemSNSTopicArn != null) ||
(newOpsItemSNSTopicArn != null && preOpsItemSNSTopicArn == null)) {
return true;
}
if (!((newOpsItemSNSTopicArn == null && preOpsItemSNSTopicArn == null) || newOpsItemSNSTopicArn.equals(preOpsItemSNSTopicArn))) {
return true;
}
Boolean newAutoConfigurationEnable = model.getAutoConfigurationEnabled() != null && model.getAutoConfigurationEnabled();
Boolean preAutoConfigurationEnable = response.applicationInfo().autoConfigEnabled() != null && response.applicationInfo().autoConfigEnabled();
if (newAutoConfigurationEnable != preAutoConfigurationEnable) {
return true;
}
return false;
}