|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.AbstractBceClient
com.baidubce.services.bos.BosClient
public class BosClient
Provides the client for accessing the Baidu Object Service.
Field Summary | |
---|---|
static String |
STORAGE_CLASS_COLD
Cold access BOS storage class |
static String |
STORAGE_CLASS_STANDARD
Standard BOS storage class |
static String |
STORAGE_CLASS_STANDARD_IA
Infrequent access BOS storage class |
Fields inherited from class com.baidubce.AbstractBceClient |
---|
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX |
Constructor Summary | |
---|---|
BosClient()
Constructs a new client to invoke service methods on Bos. |
|
BosClient(BosClientConfiguration clientConfiguration)
Constructs a new Bos client using the client configuration to access Bos. |
Method Summary | |
---|---|
void |
abortMultipartUpload(AbortMultipartUploadRequest request)
Aborts a multipart upload. |
void |
abortMultipartUpload(String bucketName,
String key,
String uploadId)
Aborts a multipart upload. |
AppendObjectResponse |
appendObject(AppendObjectRequest request)
Uploads a new object to the specified Bos bucket. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
byte[] value)
Uploads the specified bytes to Bos under the specified bucket and key name. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
byte[] value,
ObjectMetadata metadata)
Uploads the appendable bytes and object metadata to Bos under the specified bucket and key name. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
File file)
Uploads the specified appendable file to Bos under the specified bucket and key name. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
File file,
ObjectMetadata metadata)
Uploads the specified appendable file to Bos under the specified bucket and key name. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
InputStream input)
Uploads the appendable input stream to Bos under the specified bucket and key name. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
InputStream input,
ObjectMetadata metadata)
Uploads the appendable input stream and object metadata to Bos under the specified bucket and key name. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
String value)
Uploads the specified string to Bos under the specified bucket and key name. |
AppendObjectResponse |
appendObject(String bucketName,
String key,
String value,
ObjectMetadata metadata)
Uploads the specified string and object metadata to Bos under the specified bucket and key name. |
CompleteMultipartUploadResponse |
completeMultipartUpload(CompleteMultipartUploadRequest request)
Completes a multipart upload by assembling previously uploaded parts. |
CompleteMultipartUploadResponse |
completeMultipartUpload(String bucketName,
String key,
String uploadId,
List<PartETag> partETags)
Completes a multipart upload by assembling previously uploaded parts. |
CompleteMultipartUploadResponse |
completeMultipartUpload(String bucketName,
String key,
String uploadId,
List<PartETag> partETags,
ObjectMetadata metadata)
Completes a multipart upload by assembling previously uploaded parts. |
CopyObjectResponse |
copyObject(CopyObjectRequest request)
Copies a source object to a new destination in Bos. |
CopyObjectResponse |
copyObject(String sourceBucketName,
String sourceKey,
String destinationBucketName,
String destinationKey)
Copies a source object to a new destination in Bos. |
CreateBucketResponse |
createBucket(CreateBucketRequest request)
Creates a new Bos bucket with the specified name. |
CreateBucketResponse |
createBucket(String bucketName)
Creates a new Bos bucket with the specified name. |
void |
deleteBucket(DeleteBucketRequest request)
Deletes the specified bucket. |
void |
deleteBucket(String bucketName)
Deletes the specified bucket. |
void |
deleteBucketCors(DeleteBucketCorsRequest request)
Delete the CORS for the specified Bos bucket. |
void |
deleteBucketLifecycle(DeleteBucketLifecycleRequest request)
Delete the Lifecycle for the specified Bos bucket. |
void |
deleteBucketLogging(DeleteBucketLoggingRequest request)
Delete the Logging for the specified Bos bucket. |
DeleteMultipleObjectsResponse |
deleteMultipleObjects(DeleteMultipleObjectsRequest request)
Deletes the multiple specified objects in the specified bucket. |
void |
deleteObject(DeleteObjectRequest request)
Deletes the specified object in the specified bucket. |
void |
deleteObject(String bucketName,
String key)
Deletes the specified object in the specified bucket. |
void |
deleteObjectAcl(DeleteObjectAclRequest request)
Delete Object Acl for specified object in the specified bucket. |
boolean |
doesBucketExist(DoesBucketExistRequest request)
Checks if the specified bucket exists. |
boolean |
doesBucketExist(String bucketName)
Checks if the specified bucket exists. |
FetchObjectResponse |
fetchObject(FetchObjectRequest request)
Fetches a source object to a new destination in Bos. |
FetchObjectResponse |
fetchObject(String bucketName,
String key,
String sourceUrl)
Fetches a source object to a new destination in Bos. |
FetchObjectResponse |
fetchObject(String bucketName,
String key,
String sourceUrl,
String mode)
Fetches a source object to a new destination in Bos. |
URL |
generatePresignedUrl(GeneratePresignedUrlRequest request)
Returns a pre-signed URL for accessing a Bos resource. |
URL |
generatePresignedUrl(String bucketName,
String key,
int expirationInSeconds)
Returns a pre-signed URL for accessing a Bos resource. |
URL |
generatePresignedUrl(String bucketName,
String key,
int expirationInSeconds,
HttpMethodName method)
Returns a pre-signed URL for accessing a Bos resource. |
User |
getBosAccountOwner()
Gets the current owner of the Bos account that the authenticated sender of the request is using. |
User |
getBosAccountOwner(GetBosAccountOwnerRequest request)
Gets the current owner of the Bos account that the authenticated sender of the request is using. |
GetBucketAclResponse |
getBucketAcl(GetBucketAclRequest request)
Gets the ACL for the specified Bos bucket. |
GetBucketAclResponse |
getBucketAcl(String bucketName)
Gets the ACL for the specified Bos bucket. |
GetBucketCorsResponse |
getBucketCros(GetBucketCorsRequest request)
Gets the CORS for the specified Bos bucket. |
GetBucketLifecycleResponse |
getBucketLifecycle(GetBucketLifecycleRequest request)
Gets Lifecycle for the specified Bos bucket. |
GetBucketLocationResponse |
getBucketLocation(GetBucketLocationRequest request)
Gets the Location for the specified Bos bucket. |
GetBucketLocationResponse |
getBucketLocation(String bucketName)
Gets the Location for the specified Bos bucket. |
GetBucketLoggingResponse |
getBucketLogging(GetBucketLoggingRequest request)
Gets the Logging for the specified Bos bucket. |
BosObject |
getObject(GetObjectRequest request)
Gets the object stored in Bos under the specified bucket and key. |
ObjectMetadata |
getObject(GetObjectRequest request,
File destinationFile)
Gets the object metadata for the object stored in Bos under the specified bucket and key, and saves the object contents to the specified file. |
BosObject |
getObject(String bucketName,
String key)
Gets the object stored in Bos under the specified bucket and key. |
ObjectMetadata |
getObject(String bucketName,
String key,
File destinationFile)
Gets the object metadata for the object stored in Bos under the specified bucket and key, and saves the object contents to the specified file. |
GetObjectAclResponse |
getObjectAcl(GetObjectAclRequest request)
Get Object Acl for specified object in the specified bucket. |
byte[] |
getObjectContent(GetObjectRequest request)
Gets the object content stored in Bos under the specified bucket and key. |
byte[] |
getObjectContent(String bucketName,
String key)
Gets the object content stored in Bos under the specified bucket and key. |
ObjectMetadata |
getObjectMetadata(GetObjectMetadataRequest request)
Gets the metadata for the specified Bos object without actually fetching the object itself. |
ObjectMetadata |
getObjectMetadata(String bucketName,
String key)
Gets the metadata for the specified Bos object without actually fetching the object itself. |
InitiateMultipartUploadResponse |
initiateMultipartUpload(InitiateMultipartUploadRequest request)
Initiates a multipart upload and returns an InitiateMultipartUploadResponse which contains an upload ID. |
InitiateMultipartUploadResponse |
initiateMultipartUpload(String bucketName,
String key)
Initiates a multipart upload and returns an InitiateMultipartUploadResponse which contains an upload ID. |
ListBucketsResponse |
listBuckets()
Returns a list of all Bos buckets that the authenticated sender of the request owns. |
ListBucketsResponse |
listBuckets(ListBucketsRequest request)
Returns a list of all Bos buckets that the authenticated sender of the request owns. |
ListMultipartUploadsResponse |
listMultipartUploads(ListMultipartUploadsRequest request)
Lists in-progress multipart uploads. |
ListMultipartUploadsResponse |
listMultipartUploads(String bucketName)
Lists in-progress multipart uploads. |
ListObjectsResponse |
listNextBatchOfObjects(ListObjectsResponse previousResponse)
Provides an easy way to continue a truncated object listing and retrieve the next page of results. |
ListObjectsResponse |
listObjects(ListObjectsRequest request)
Returns ListObjectsResponse containing a list of summary information about the objects in the specified buckets. |
ListObjectsResponse |
listObjects(String bucketName)
Returns ListObjectsResponse containing a list of summary information about the objects in the specified buckets. |
ListObjectsResponse |
listObjects(String bucketName,
String prefix)
Returns ListObjectsResponse containing a list of summary information about the objects in the specified buckets. |
ListPartsResponse |
listParts(ListPartsRequest request)
Lists the parts that have been uploaded for a specific multipart upload. |
ListPartsResponse |
listParts(String bucketName,
String key,
String uploadId)
Lists the parts that have been uploaded for a specific multipart upload. |
PutObjectResponse |
putObject(PutObjectRequest request)
Uploads a new object to the specified Bos bucket. |
PutObjectResponse |
putObject(String bucketName,
String key,
byte[] value)
Uploads the specified bytes to Bos under the specified bucket and key name. |
PutObjectResponse |
putObject(String bucketName,
String key,
byte[] value,
ObjectMetadata metadata)
Uploads the specified bytes and object metadata to Bos under the specified bucket and key name. |
PutObjectResponse |
putObject(String bucketName,
String key,
File file)
Uploads the specified file to Bos under the specified bucket and key name. |
PutObjectResponse |
putObject(String bucketName,
String key,
File file,
ObjectMetadata metadata)
Uploads the specified file and object metadata to Bos under the specified bucket and key name. |
PutObjectResponse |
putObject(String bucketName,
String key,
InputStream input)
Uploads the specified input stream to Bos under the specified bucket and key name. |
PutObjectResponse |
putObject(String bucketName,
String key,
InputStream input,
ObjectMetadata metadata)
Uploads the specified input stream and object metadata to Bos under the specified bucket and key name. |
PutObjectResponse |
putObject(String bucketName,
String key,
String value)
Uploads the specified string to Bos under the specified bucket and key name. |
PutObjectResponse |
putObject(String bucketName,
String key,
String value,
ObjectMetadata metadata)
Uploads the specified string and object metadata to Bos under the specified bucket and key name. |
void |
setBucketAcl(SetBucketAclRequest request)
Sets the Acl for the specified Bos bucket. |
void |
setBucketAcl(String bucketName,
CannedAccessControlList acl)
Sets the CannedAccessControlList for the specified Bos bucket using one of the pre-configured CannedAccessControlLists . |
void |
setBucketAcl(String bucketName,
String jsonAcl)
Sets the json style of bucket acl for the specified Bos bucket using one of the pre-configured CannedAccessControlLists . |
void |
setBucketBucketLifecycle(SetBucketLifecycleRequest request)
Sets the Lifecycle for the specified Bos bucket. |
void |
setBucketCors(SetBucketCorsRequest request)
Sets the CORS for the specified Bos bucket. |
void |
setBucketLogging(SetBucketLoggingRequest request)
Sets the Logging for the specified Bos bucket. |
void |
setObjectAcl(SetObjectAclRequest request)
Set Object Acl for specified object in the specified bucket. |
void |
setObjectAcl(String bucketName,
String objectKey,
CannedAccessControlList acl)
Set Object Acl for specified object in the specified bucket. |
void |
setObjectAcl(String bucketName,
String objectKey,
String jsonObjectAcl)
Set Object Acl for specified object in the specified bucket. |
UploadPartResponse |
uploadPart(UploadPartRequest request)
Uploads a part in a multipart upload. |
UploadPartCopyResponse |
uploadPartCopy(UploadPartCopyRequest request)
Uploads a copy part in a multipart upload. |
Methods inherited from class com.baidubce.AbstractBceClient |
---|
getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String STORAGE_CLASS_STANDARD
public static final String STORAGE_CLASS_STANDARD_IA
public static final String STORAGE_CLASS_COLD
Constructor Detail |
---|
public BosClient()
public BosClient(BosClientConfiguration clientConfiguration)
clientConfiguration
- The bos client configuration options controlling how this client
connects to Bos (e.g. proxy settings, retry counts, etc).Method Detail |
---|
public User getBosAccountOwner()
The caller must authenticate with a valid BCE Access Key ID that is registered with Bos.
public User getBosAccountOwner(GetBosAccountOwnerRequest request)
The caller must authenticate with a valid BCE Access Key ID that is registered with Bos.
request
- This request containing the credentials for getting the account of the authenticated sender.
public ListBucketsResponse listBuckets()
Users must authenticate with a valid BCE Access Key ID that is registered with Bos. Anonymous requests cannot list buckets, and users cannot list buckets that they did not create.
public ListBucketsResponse listBuckets(ListBucketsRequest request)
Users must authenticate with a valid BCE Access Key ID that is registered with Bos. Anonymous requests cannot list buckets, and users cannot list buckets that they did not create.
request
- The request containing all of the options related to the listing of buckets.
public CreateBucketResponse createBucket(String bucketName)
bucketName
- The name of the bucket to create.
All buckets in Bos share a single namespace; ensure the bucket is given a unique name.
public CreateBucketResponse createBucket(CreateBucketRequest request)
request
- The request object containing all options for creating a Bos bucket.
public boolean doesBucketExist(String bucketName)
If invalid security credentials are used to execute this method, the client is not able to distinguish between bucket permission errors and invalid credential errors, and this method could return an incorrect result.
bucketName
- The name of the bucket to check.
true
if the specified bucket exists in Bos;
the value false
if there is no bucket in Bos with that name.public boolean doesBucketExist(DoesBucketExistRequest request)
If invalid security credentials are used to execute this method, the client is not able to distinguish between bucket permission errors and invalid credential errors, and this method could return an incorrect result.
request
- The request object containing all options for checking a Bos bucket.
true
if the specified bucket exists in Bos;
the value false
if there is no bucket in Bos with that name.public GetBucketAclResponse getBucketAcl(String bucketName)
Each bucket and object in Bos has an ACL that defines its access control policy. When a request is made, Bos authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, Bos returns an error.
bucketName
- The name of the bucket whose ACL is being retrieved.
GetBuckeetAclResponse
for the specified Bos bucket.public GetBucketAclResponse getBucketAcl(GetBucketAclRequest request)
Each bucket and object in Bos has an ACL that defines its access control policy. When a request is made, Bos authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, Bos returns an error.
request
- The request containing the name of the bucket whose ACL is being retrieved.
GetBuckeetAclResponse
for the specified Bos bucket.public GetBucketLocationResponse getBucketLocation(String bucketName)
Each bucket and object in Bos has an Location that defines its location
bucketName
- The name of the bucket whose Location is being retrieved.
GetBuckeetLocationResponse
for the specified Bos bucket.public GetBucketLocationResponse getBucketLocation(GetBucketLocationRequest request)
Each bucket and object in Bos has an Location that defines its location
request
- The request containing the name of the bucket whose Location is being retrieved.
GetBuckeetLocationResponse
for the specified Bos bucket.public void setBucketAcl(String bucketName, String jsonAcl)
CannedAccessControlLists
.
A json style of bucket acl
provides a quick way to configure an object or bucket with commonly used
access control policies.
bucketName
- The name of the bucket whose ACL is being set.jsonAcl
- The pre-configured CannedAccessControlLists
to set for the specified bucket.public void setBucketAcl(String bucketName, CannedAccessControlList acl)
CannedAccessControlLists
.
A CannedAccessControlList
provides a quick way to configure an object or bucket with commonly used
access control policies.
bucketName
- The name of the bucket whose ACL is being set.acl
- The pre-configured CannedAccessControlLists
to set for the specified bucket.public void setBucketAcl(SetBucketAclRequest request)
request
- The request object containing the bucket to modify and the ACL to set.public void setBucketLogging(SetBucketLoggingRequest request)
request
- The request object containing the Logging to set into specified bucket.public GetBucketLoggingResponse getBucketLogging(GetBucketLoggingRequest request)
request
- The request object containing the specified bucket to get bucket logging.public void deleteBucketLogging(DeleteBucketLoggingRequest request)
request
- The request object containing the specified bucket to delete bucket logging.public void setBucketCors(SetBucketCorsRequest request)
request
- The request object containing the CORS to set into specified bucket.public GetBucketCorsResponse getBucketCros(GetBucketCorsRequest request)
request
- The request object containing the specified bucket to get bucket CORS.public void deleteBucketCors(DeleteBucketCorsRequest request)
request
- The request object containing the specified bucket to delete bucket CORS.public void setBucketBucketLifecycle(SetBucketLifecycleRequest request)
request
- The request object containing the Lifecycle to set into specified bucket.public GetBucketLifecycleResponse getBucketLifecycle(GetBucketLifecycleRequest request)
request
- The request object containing the specified bucket to get bucket Lifecycle.public void deleteBucketLifecycle(DeleteBucketLifecycleRequest request)
request
- The request object containing the specified bucket to delete bucket Lifecycle.public void deleteBucket(String bucketName)
Only the owner of a bucket can delete it, regardless of the bucket's access control policy.
bucketName
- The name of the bucket to delete.public void deleteBucket(DeleteBucketRequest request)
Only the owner of a bucket can delete it, regardless of the bucket's access control policy.
request
- The request object containing all options for deleting a Bos bucket.public URL generatePresignedUrl(String bucketName, String key, int expirationInSeconds)
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the desired object is stored.expirationInSeconds
- The expiration after which the returned pre-signed URL will expire.
public URL generatePresignedUrl(String bucketName, String key, int expirationInSeconds, HttpMethodName method)
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the desired object is stored.expirationInSeconds
- The expiration after which the returned pre-signed URL will expire.method
- The HTTP method verb to use for this URL
public URL generatePresignedUrl(GeneratePresignedUrlRequest request)
request
- The request object containing all the options for generating a
pre-signed URL (bucket name, key, expiration date, etc).
public ListObjectsResponse listObjects(String bucketName)
bucketName
- The name of the Bos bucket to list.
public ListObjectsResponse listObjects(String bucketName, String prefix)
bucketName
- The name of the Bos bucket to list.prefix
- An optional parameter restricting the response to keys beginning with the specified prefix.
Use prefixes to separate a bucket into different sets of keys, similar to how a file system
organizes files into directories.
public ListObjectsResponse listObjects(ListObjectsRequest request)
request
- The request object containing all options for listing the objects in a specified bucket.
public ListObjectsResponse listNextBatchOfObjects(ListObjectsResponse previousResponse)
previousResponse
- The previous truncated ListObjectsResponse
. If a non-truncated
ListObjectsResponse
is passed in, an empty ListObjectsResponse
is returned without ever contacting Bos.
ListObjectsResponse
results, beginning immediately
after the last result in the specified previous ListObjectsResponse
.public BosObject getObject(String bucketName, String key)
bucketName
- The name of the bucket containing the desired object.key
- The key under which the desired object is stored.
public ObjectMetadata getObject(String bucketName, String key, File destinationFile)
null
if the specified constraints weren't met.
bucketName
- The name of the bucket containing the desired object.key
- The key under which the desired object is stored.destinationFile
- Indicates the file (which might already exist)
where to save the object content being downloading from Bos.
null
if constraints were specified but not met.public BosObject getObject(GetObjectRequest request)
request
- The request object containing all the options on how to download the object.
public ObjectMetadata getObject(GetObjectRequest request, File destinationFile)
null
if the specified constraints weren't met.
request
- The request object containing all the options on how to download the Bos object content.destinationFile
- Indicates the file (which might already exist) where to save the object
content being downloading from Bos.
null
if constraints were specified but not met.public byte[] getObjectContent(String bucketName, String key)
bucketName
- The name of the bucket containing the desired object.key
- The key under which the desired object is stored.
public byte[] getObjectContent(GetObjectRequest request)
request
- The request object containing all the options on how to download the Bos object content.
public ObjectMetadata getObjectMetadata(String bucketName, String key)
The object metadata contains information such as content type, content disposition, etc., as well as custom user metadata that can be associated with an object in Bos.
bucketName
- The name of the bucket containing the object's whose metadata is being retrieved.key
- The key of the object whose metadata is being retrieved.
public ObjectMetadata getObjectMetadata(GetObjectMetadataRequest request)
The object metadata contains information such as content type, content disposition, etc., as well as custom user metadata that can be associated with an object in Bos.
request
- The request object specifying the bucket, key whose metadata is being retrieved.
public PutObjectResponse putObject(String bucketName, String key, File file)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.file
- The file containing the data to be uploaded to Bos.
public PutObjectResponse putObject(String bucketName, String key, File file, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.file
- The file containing the data to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public PutObjectResponse putObject(String bucketName, String key, String value)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The string containing the value to be uploaded to Bos.
public PutObjectResponse putObject(String bucketName, String key, String value, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The string containing the value to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public PutObjectResponse putObject(String bucketName, String key, byte[] value)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The bytes containing the value to be uploaded to Bos.
public PutObjectResponse putObject(String bucketName, String key, byte[] value, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The bytes containing the value to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public PutObjectResponse putObject(String bucketName, String key, InputStream input)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.input
- The input stream containing the value to be uploaded to Bos.
public PutObjectResponse putObject(String bucketName, String key, InputStream input, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.input
- The input stream containing the value to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public PutObjectResponse putObject(PutObjectRequest request)
PutObjectRequest
contains all the
details of the request, including the bucket to upload to, the key the object will be uploaded under,
and the file or input stream containing the data to upload.
request
- The request object containing all the parameters to upload a new object to Bos.
public CopyObjectResponse copyObject(String sourceBucketName, String sourceKey, String destinationBucketName, String destinationKey)
sourceBucketName
- The name of the bucket containing the source object to copy.sourceKey
- The key in the source bucket under which the source object is stored.destinationBucketName
- The name of the bucket in which the new object will be created.
This can be the same name as the source bucket's.destinationKey
- The key in the destination bucket under which the new object will be created.
public CopyObjectResponse copyObject(CopyObjectRequest request)
request
- The request object containing all the options for copying an Bos object.
public FetchObjectResponse fetchObject(String bucketName, String key, String sourceUrl)
bucketName
- The name of the bucket in which the new object will be created.key
- The key in the destination bucket under which the new object will be created.sourceUrl
- The url full path for fetching.
public FetchObjectResponse fetchObject(String bucketName, String key, String sourceUrl, String mode)
bucketName
- The name of the bucket in which the new object will be created.key
- The key in the destination bucket under which the new object will be created.sourceUrl
- The url full path for fetching.mode
- The mode path for fetching.
public FetchObjectResponse fetchObject(FetchObjectRequest request)
request
- The request object containing all the options for fetching url to a Bos object.
public void deleteObject(String bucketName, String key)
bucketName
- The name of the Bos bucket containing the object to delete.key
- The key of the object to delete.public void deleteObject(DeleteObjectRequest request)
request
- The request object containing all options for deleting a Bos object.public DeleteMultipleObjectsResponse deleteMultipleObjects(DeleteMultipleObjectsRequest request)
request
- The request object containing all options for deleting a Bos multiple objects.public void setObjectAcl(String bucketName, String objectKey, String jsonObjectAcl)
bucketName
- objectKey
- jsonObjectAcl
- The json format of specified object.public void setObjectAcl(String bucketName, String objectKey, CannedAccessControlList acl)
bucketName
- objectKey
- acl
- The CannedAccessControlList of specified object.public void setObjectAcl(SetObjectAclRequest request)
request
- The request object containing all options for setting a Bos object acl.public GetObjectAclResponse getObjectAcl(GetObjectAclRequest request)
request
- The request object containing all options for getting a Bos object acl.public void deleteObjectAcl(DeleteObjectAclRequest request)
request
- The request object containing all options for deleting a Bos object acl.public InitiateMultipartUploadResponse initiateMultipartUpload(String bucketName, String key)
bucketName
- The name of the Bos bucket containing the object to initiate.key
- The key of the object to initiate.
public InitiateMultipartUploadResponse initiateMultipartUpload(InitiateMultipartUploadRequest request)
request
- The InitiateMultipartUploadRequest object that specifies all the parameters of this operation.
public UploadPartResponse uploadPart(UploadPartRequest request)
request
- The UploadPartRequest object that specifies all the parameters of this operation.
public UploadPartCopyResponse uploadPartCopy(UploadPartCopyRequest request)
request
- The UploadPartCopyRequest object that specifies all the parameters of this operation.
public ListPartsResponse listParts(String bucketName, String key, String uploadId)
bucketName
- The name of the bucket containing the multipart upload whose parts are being listed.key
- The key of the associated multipart upload whose parts are being listed.uploadId
- The ID of the multipart upload whose parts are being listed.
public ListPartsResponse listParts(ListPartsRequest request)
request
- The ListPartsRequest object that specifies all the parameters of this operation.
public CompleteMultipartUploadResponse completeMultipartUpload(String bucketName, String key, String uploadId, List<PartETag> partETags)
bucketName
- The name of the bucket containing the multipart upload to complete.key
- The key of the multipart upload to complete.uploadId
- The ID of the multipart upload to complete.partETags
- The list of part numbers and ETags to use when completing the multipart upload.
public CompleteMultipartUploadResponse completeMultipartUpload(String bucketName, String key, String uploadId, List<PartETag> partETags, ObjectMetadata metadata)
bucketName
- The name of the bucket containing the multipart upload to complete.key
- The key of the multipart upload to complete.uploadId
- The ID of the multipart upload to complete.partETags
- The list of part numbers and ETags to use when completing the multipart upload.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public CompleteMultipartUploadResponse completeMultipartUpload(CompleteMultipartUploadRequest request)
request
- The CompleteMultipartUploadRequest object that specifies all the parameters of this operation.
public void abortMultipartUpload(String bucketName, String key, String uploadId)
bucketName
- The name of the bucket containing the multipart upload to abort.key
- The key of the multipart upload to abort.uploadId
- The ID of the multipart upload to abort.public void abortMultipartUpload(AbortMultipartUploadRequest request)
request
- The AbortMultipartUploadRequest object that specifies all the parameters of this operation.public ListMultipartUploadsResponse listMultipartUploads(String bucketName)
bucketName
- The name of the bucket containing the uploads to list.
public ListMultipartUploadsResponse listMultipartUploads(ListMultipartUploadsRequest request)
request
- The ListMultipartUploadsRequest object that specifies all the parameters of this operation.
public AppendObjectResponse appendObject(String bucketName, String key, File file)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.file
- The appendable file containing the data to be uploaded to Bos.
public AppendObjectResponse appendObject(String bucketName, String key, File file, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.file
- The file containing the data to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public AppendObjectResponse appendObject(String bucketName, String key, String value)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The string containing the value to be uploaded to Bos.
public AppendObjectResponse appendObject(String bucketName, String key, String value, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The string containing the value to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public AppendObjectResponse appendObject(String bucketName, String key, byte[] value)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The bytes containing the value to be uploaded to Bos.
public AppendObjectResponse appendObject(String bucketName, String key, byte[] value, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.value
- The bytes containing the value to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public AppendObjectResponse appendObject(String bucketName, String key, InputStream input)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.input
- The input stream containing the value to be uploaded to Bos.
public AppendObjectResponse appendObject(String bucketName, String key, InputStream input, ObjectMetadata metadata)
bucketName
- The name of an existing bucket, to which you have Write permission.key
- The key under which to store the specified file.input
- The input stream containing the value to be uploaded to Bos.metadata
- Additional metadata instructing Bos how to handle the uploaded data
(e.g. custom user metadata, hooks for specifying content type, etc.).
public AppendObjectResponse appendObject(AppendObjectRequest request)
AppendObjectRequest
contains all the
details of the request, including the bucket to upload to, the key the object will be uploaded under,
and the file or input stream containing the data to upload.
request
- The request object containing all the parameters to upload a new appendable object to Bos.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |