public class S3ObjectStorageClient extends Object implements ObjectStorageClient
| Constructor and Description |
|---|
S3ObjectStorageClient(String clientKey,
String secretKey,
String region,
String bucket) |
S3ObjectStorageClient(String clientKey,
String secretKey,
String bucketName,
String endpoint,
com.amazonaws.services.s3.S3ClientOptions s3ClientOptions) |
| Modifier and Type | Method and Description |
|---|---|
com.amazonaws.services.s3.model.Bucket |
createBucket(String bucket) |
void |
delete(String objectName)
Deletes an object, if present.
|
void |
deleteBucket(String bucket) |
Optional<StorageObject> |
get(String objectName)
Gets the
StorageObject including its body. |
Optional<StorageObject> |
getWithoutBody(String objectName)
Gets the
StorageObject metadata without its body. |
List<StorageObject> |
list() |
List<com.amazonaws.services.s3.model.Bucket> |
listBuckets() |
String |
put(StorageObject storageObject)
Creates or updates a
StorageObject. |
String |
put(String key,
org.jclouds.io.Payload value)
Store a key/payload combination
|
void |
setEndpoint(String endpoint) |
void |
setS3ClientOptions(com.amazonaws.services.s3.S3ClientOptions s3ClientOptions) |
public S3ObjectStorageClient(String clientKey, String secretKey, String region, String bucket)
public List<StorageObject> list()
list in interface ObjectStorageClientpublic void setEndpoint(String endpoint)
public String put(StorageObject storageObject)
ObjectStorageClientStorageObject.put in interface ObjectStorageClientstorageObject - public String put(String key, org.jclouds.io.Payload value)
put in interface ObjectStorageClientkey - corresponds to StorageObject.getName().value - corresponds to StorageObject.getPayload().public Optional<StorageObject> getWithoutBody(String objectName)
ObjectStorageClientStorageObject metadata without its body.getWithoutBody in interface ObjectStorageClientobjectName - corresponds to StorageObject.getName().StorageObject or null, if not found.public Optional<StorageObject> get(String objectName)
ObjectStorageClientStorageObject including its body.get in interface ObjectStorageClientobjectName - corresponds to StorageObject.getName().StorageObject or null, if not found.public void delete(String objectName)
ObjectStorageClientdelete in interface ObjectStorageClientobjectName - corresponds to StorageObject.getName().public com.amazonaws.services.s3.model.Bucket createBucket(String bucket)
public List<com.amazonaws.services.s3.model.Bucket> listBuckets()
public void deleteBucket(String bucket)
public void setS3ClientOptions(com.amazonaws.services.s3.S3ClientOptions s3ClientOptions)
Copyright © 2017. All rights reserved.