// Create Container
BlobStore blobStore = context.getBlobStore();
blobStore.createContainerInLocation(null, containerName);
String blobName = "test";
ByteSource payload = ByteSource.wrap("testdata".getBytes(Charsets.UTF_8));
// List Container Metadata
for (StorageMetadata resourceMd : blobStore.list()) {
if (containerName.equals(resourceMd.getName())) {
System.out.println(resourceMd);
}
}
// Add Blob
Blob blob = blobStore.blobBuilder(blobName)
.payload(payload)
.contentLength(payload.size())
.build();
blobStore.putBlob(containerName, blob);
// Use Provider API
ApiMetadata apiMetadata = context.unwrap().getProviderMetadata().getApiMetadata();