}
@Override
protected UpdateEnvironmentResult executeInternal(
UpdateEnvironmentContext context) throws Exception {
UpdateEnvironmentRequest req = new UpdateEnvironmentRequest();
if (null != context.environmentDescription)
req.setDescription(context.environmentDescription);
if (null != context.environmentId)
req.setEnvironmentId(context.environmentId);
if (null != context.optionSettings)
req.setOptionSettings(Arrays.asList(context.optionSettings));
if (context.useLatestVersionLabel) {
req.setVersionLabel(context.latestVersionLabel);
} else if (isNotBlank(context.versionLabel)) {
info("Calling update-environment, and using versionLabel: " + context.versionLabel);
req.setVersionLabel(context.versionLabel);
} else if (isNotBlank(context.templateName)) {
info("Calling update-environment, and using templateName: " + context.templateName);
req.setTemplateName(context.templateName);
}
return service.updateEnvironment(req);
}