// Use Provider API
ApiMetadata apiMetadata = context.unwrap().getProviderMetadata().getApiMetadata();
Object object = null;
if (apiMetadata instanceof S3ApiMetadata) {
S3Client api = context.unwrapApi(S3Client.class);
object = api.headObject(containerName, blobName);
} else if (apiMetadata instanceof SwiftApiMetadata) {
SwiftClient api = context.unwrapApi(SwiftClient.class);
object = api.getObjectInfo(containerName, blobName);
} else if (apiMetadata instanceof AzureBlobApiMetadata) {
RestContext<AzureBlobClient, ?> providerContext = context.unwrap();
object = providerContext.getApi().getBlobProperties(containerName, blobName);
} else if (apiMetadata instanceof AtmosApiMetadata) {
AtmosClient api = context.unwrapApi(AtmosClient.class);
object = api.headFile(containerName + "/" + blobName);
}
if (object != null) {
System.out.println(object);
}