aws-memorydb-acl/src/main/java/software/amazon/memorydb/acl/UpdateHandler.java [104:164]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                        proxyInvocation, model, logger))
                .progress();
        } else {
            return progress;
        }
    }

    private ProgressEvent<ResourceModel, CallbackContext> updateTags(
        AmazonWebServicesClientProxy proxy,
        ProgressEvent<ResourceModel, CallbackContext> progress,
        ResourceHandlerRequest<ResourceModel> request,
        ProxyClient<MemoryDbClient> proxyClient
    ) {
        if (!request.getPreviousResourceTags().equals(request.getDesiredResourceTags())) {
            return progress
                .then(o ->
                    handleExceptions(() -> {
                        handleTagging(proxy, proxyClient,  request.getDesiredResourceTags(), progress.getResourceModel());
                        return ProgressEvent.progress(o.getResourceModel(), o.getCallbackContext());
                    })
                );
        } else {
            return progress;
        }
    }

    private void handleTagging(AmazonWebServicesClientProxy proxy, ProxyClient<MemoryDbClient> client,
        final Map<String, String> tags, final ResourceModel model) {
        final Set<Tag> newTags = tags == null ? Collections.emptySet() : new HashSet<>(Translator.translateTags(tags));
        final Set<Tag> existingTags = new HashSet<>();

        //Fix for unpopulated arn on resource model
        setModelArn(proxy, client, model);
        if (!StringUtils.isNullOrEmpty(model.getArn())) {
            existingTags.addAll(
                Translator.translateTags(
                    proxy.injectCredentialsAndInvokeV2(
                        Translator.translateToListTagsRequest(model),
                        client.client()::listTags).tagList()));
        }

        final List<Tag> tagsToRemove = existingTags.stream()
            .filter(tag -> !newTags.contains(tag))
            .collect(Collectors.toList());
        final List<Tag> tagsToAdd = newTags.stream()
            .filter(tag -> !existingTags.contains(tag))
            .collect(Collectors.toList());

        if (!CollectionUtils.isNullOrEmpty(tagsToRemove)) {
            proxy.injectCredentialsAndInvokeV2(
                Translator.translateToUntagResourceRequest(model.getArn(), tagsToRemove),
                client.client()::untagResource);
        }
        if (!CollectionUtils.isNullOrEmpty(tagsToAdd)) {
            proxy.injectCredentialsAndInvokeV2(
                Translator.translateToTagResourceRequest(model.getArn(), tagsToAdd),
                client.client()::tagResource);
        }
    }

    private boolean hasChangeOnCoreModel(final ResourceModel r1, final ResourceModel r2){
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-memorydb-user/src/main/java/software/amazon/memorydb/user/UpdateHandler.java [52:114]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                        proxyInvocation, model, logger))
                .progress();
        } else {
            return progress;
        }

    }

    private ProgressEvent<ResourceModel, CallbackContext> updateTags(
        AmazonWebServicesClientProxy proxy,
        ProgressEvent<ResourceModel, CallbackContext> progress,
        ResourceHandlerRequest<ResourceModel> request,
        ProxyClient<MemoryDbClient> proxyClient
    ) {
        if (!request.getPreviousResourceTags().equals(request.getDesiredResourceTags())) {
            return progress
                .then(o ->
                    handleExceptions(() -> {
                        handleTagging(proxy, proxyClient,  request.getDesiredResourceTags(), progress.getResourceModel());
                        return ProgressEvent.progress(o.getResourceModel(), o.getCallbackContext());
                    })
                );
        } else {
            return progress;
        }
    }

    private void handleTagging(AmazonWebServicesClientProxy proxy, ProxyClient<MemoryDbClient> client,
        final Map<String, String> tags, final ResourceModel model) {

        final Set<Tag> newTags = tags == null ? Collections.emptySet() : new HashSet<>(Translator.translateTags(tags));
        final Set<Tag> existingTags = new HashSet<>();

        //Fix for unpopulated arn on resource model
        setModelArn(proxy, client, model);
        if (!StringUtils.isNullOrEmpty(model.getArn())) {
            existingTags.addAll(
                Translator.translateTags(
                    proxy.injectCredentialsAndInvokeV2(
                        Translator.translateToListTagsRequest(model),
                        client.client()::listTags).tagList()));
        }

        final List<Tag> tagsToRemove = existingTags.stream()
            .filter(tag -> !newTags.contains(tag))
            .collect(Collectors.toList());
        final List<Tag> tagsToAdd = newTags.stream()
            .filter(tag -> !existingTags.contains(tag))
            .collect(Collectors.toList());

        if (!CollectionUtils.isNullOrEmpty(tagsToRemove)) {
            proxy.injectCredentialsAndInvokeV2(
                Translator.translateToUntagResourceRequest(model.getArn(), tagsToRemove),
                client.client()::untagResource);
        }
        if (!CollectionUtils.isNullOrEmpty(tagsToAdd)) {
            proxy.injectCredentialsAndInvokeV2(
                Translator.translateToTagResourceRequest(model.getArn(), tagsToAdd),
                client.client()::tagResource);
        }
    }

    private boolean hasChangeOnCoreModel(final ResourceModel r1, final ResourceModel r2){
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



