Search code examples
javajcloudsopenstack-swiftibm-cloud-infrastructure

Updating only metadata of an object in SoftLayer using jclouds API


I want to update only the metadata of an object stored in SoftLayer using the jclouds API. The object already exists so don't want to upload it again.


Solution

  • Use a server-side copy to update metadata:

    blobStore.copyBlob(containerName, blobName, containerName, blobName, CopyOptions.builder()
            .contentMetadata(...)
            .userMetadata(...)
            .build());