Purge the cache of spaces cdn with amazon sdk s3 for java version 2

January 31, 2019 485 views

I’m tryind to purge cache during my build process after uploading files to spaces cdn. But can’t do it with amazon sdk java version 2.

I have this article


but can’t understand how to do it with amazon sdk. Should I user CloudFrontClient or something other?

What should I do, I wrote this code, but it fails? ( What shoud i use for distributionId?

def cfc = CloudFrontClient

        def paths = Paths.builder()

        def invalidationBatch = InvalidationBatch.builder()

        def invalidationRequest = CreateInvalidationRequest.builder()

        CreateInvalidationResponse ret = cfc.createInvalidation(
Be the first one to answer this question.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!