private ProgressEvent validateCreateOnlyProperties()

in aws-sns-subscription/src/main/java/software/amazon/sns/subscription/UpdateHandler.java [61:81]


    private ProgressEvent<ResourceModel, CallbackContext> validateCreateOnlyProperties(ResourceModel previousModel, ResourceModel currentModel, ProgressEvent<ResourceModel, CallbackContext> progress) {

        String prevEndpoint = previousModel.getEndpoint();
        String curEndpoint = currentModel.getEndpoint();

        String prevProtocol = previousModel.getProtocol();
        String curProtocol = currentModel.getProtocol();

        String prevTopicArn = previousModel.getTopicArn();
        String curTopicArn = currentModel.getTopicArn();

        if (!arePropertiesEqual(prevEndpoint, curEndpoint)) {
            throw new CfnNotUpdatableException(ResourceModel.TYPE_NAME, currentModel.getEndpoint());
        } else if (!arePropertiesEqual(prevProtocol, curProtocol)) {
            throw new CfnNotUpdatableException(ResourceModel.TYPE_NAME, currentModel.getProtocol());
        } else if (!arePropertiesEqual(prevTopicArn, curTopicArn)) {
            throw new CfnNotUpdatableException(ResourceModel.TYPE_NAME, currentModel.getTopicArn());
        }

        return progress;
    }