} else if (key.equals("removeSecurityGroup")) {
RemoveSecurityGroupRequest request = gson.fromJson(entry.getValue(), RemoveSecurityGroupRequest.class);
return addRemoveSecurityGroup(instance, request.name, true);
} else if (key.equals("createImage")) {
CreateImageRequest request = gson.fromJson(entry.getValue(), CreateImageRequest.class);
return createImage(instance, request);
} else {
throw new IllegalArgumentException("Unknown action: " + key);
}