public interface OSS
Open Storage Service is the public massive, secure, low cost and high reliable storage service.
Users could use RESTFul APIs to access the data at anytime and anywhere.
Users could also manage the data and its configuration with the web console.
Based on OSS, user could build apps that need to have massive data access, such asmedia sharing app,
cloud disk app, personal or enterprise data backup apps,etc
OSS interface is the SDK's entry point interface. It wraps the OSS RESTful APIs in sync and async APIs the network request cannot be issued in UI thread.
OSSAsyncTask<ListBucketsResult> asyncListBuckets(ListBucketsRequest request, OSSCompletedCallback<ListBucketsRequest,ListBucketsResult> completedCallback)
request
- completedCallback
- ListBucketsResult listBuckets(ListBucketsRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<PutObjectResult> asyncPutObject(PutObjectRequest request, OSSCompletedCallback<PutObjectRequest,PutObjectResult> completedCallback)
request
- the PutObjectRequest instancecompletedCallback
- PutObjectResult putObject(PutObjectRequest request) throws ClientException, ServiceException
request
- the PutObjectRequest instanceClientException
ServiceException
OSSAsyncTask<GetObjectResult> asyncGetObject(GetObjectRequest request, OSSCompletedCallback<GetObjectRequest,GetObjectResult> completedCallback)
request
- completedCallback
- GetObjectResult getObject(GetObjectRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<DeleteObjectResult> asyncDeleteObject(DeleteObjectRequest request, OSSCompletedCallback<DeleteObjectRequest,DeleteObjectResult> completedCallback)
request
- completedCallback
- DeleteObjectResult deleteObject(DeleteObjectRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<DeleteMultipleObjectResult> asyncDeleteMultipleObject(DeleteMultipleObjectRequest request, OSSCompletedCallback<DeleteMultipleObjectRequest,DeleteMultipleObjectResult> completedCallback)
request
- completedCallback
- DeleteMultipleObjectResult deleteMultipleObject(DeleteMultipleObjectRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<AppendObjectResult> asyncAppendObject(AppendObjectRequest request, OSSCompletedCallback<AppendObjectRequest,AppendObjectResult> completedCallback)
request
- completedCallback
- AppendObjectResult appendObject(AppendObjectRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<HeadObjectResult> asyncHeadObject(HeadObjectRequest request, OSSCompletedCallback<HeadObjectRequest,HeadObjectResult> completedCallback)
request
- completedCallback
- HeadObjectResult headObject(HeadObjectRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<GetObjectMetaResult> asyncGetObjectMeta(GetObjectMetaRequest request, OSSCompletedCallback<GetObjectMetaRequest,GetObjectMetaResult> completedCallback)
request
- completedCallback
- GetObjectMetaResult getObjectMeta(GetObjectMetaRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<CopyObjectResult> asyncCopyObject(CopyObjectRequest request, OSSCompletedCallback<CopyObjectRequest,CopyObjectResult> completedCallback)
request
- completedCallback
- CopyObjectResult copyObject(CopyObjectRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<GetObjectACLResult> asyncGetObjectACL(GetObjectACLRequest request, OSSCompletedCallback<GetObjectACLRequest,GetObjectACLResult> completedCallback)
GetObjectACLResult getObjectACL(GetObjectACLRequest request) throws ClientException, ServiceException
OSSAsyncTask<CreateBucketResult> asyncCreateBucket(CreateBucketRequest request, OSSCompletedCallback<CreateBucketRequest,CreateBucketResult> completedCallback)
request
- completedCallback
- CreateBucketResult createBucket(CreateBucketRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<DeleteBucketResult> asyncDeleteBucket(DeleteBucketRequest request, OSSCompletedCallback<DeleteBucketRequest,DeleteBucketResult> completedCallback)
request
- completedCallback
- DeleteBucketResult deleteBucket(DeleteBucketRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<GetBucketInfoResult> asyncGetBucketInfo(GetBucketInfoRequest request, OSSCompletedCallback<GetBucketInfoRequest,GetBucketInfoResult> completedCallback)
request
- A GetBucketInfoRequest
instance which specifies the bucket
name.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsGetBucketInfoResult getBucketInfo(GetBucketInfoRequest request) throws ClientException, ServiceException
request
- A GetBucketInfoRequest
instance which specifies the bucket
name.GetBucketInfoResult
instance.ClientException
- OSS Client side exception.ServiceException
- OSS Server side exception.OSSAsyncTask<GetBucketACLResult> asyncGetBucketACL(GetBucketACLRequest request, OSSCompletedCallback<GetBucketACLRequest,GetBucketACLResult> completedCallback)
request
- completedCallback
- GetBucketACLResult getBucketACL(GetBucketACLRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
GetBucketRefererResult getBucketReferer(GetBucketRefererRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<PutBucketRefererResult> asyncPutBucketReferer(PutBucketRefererRequest request, OSSCompletedCallback<PutBucketRefererRequest,PutBucketRefererResult> completedCallback)
request
- completedCallback
- PutBucketRefererResult putBucketReferer(PutBucketRefererRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
DeleteBucketLoggingResult deleteBucketLogging(DeleteBucketLoggingRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<DeleteBucketLoggingResult> asyncDeleteBucketLogging(DeleteBucketLoggingRequest request, OSSCompletedCallback<DeleteBucketLoggingRequest,DeleteBucketLoggingResult> completedCallback)
request
- completedCallback
- PutBucketLoggingResult putBucketLogging(PutBucketLoggingRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<PutBucketLoggingResult> asyncPutBucketLogging(PutBucketLoggingRequest request, OSSCompletedCallback<PutBucketLoggingRequest,PutBucketLoggingResult> completedCallback)
request
- completedCallback
- GetBucketLoggingResult getBucketLogging(GetBucketLoggingRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<GetBucketLoggingResult> asyncGetBucketLogging(GetBucketLoggingRequest request, OSSCompletedCallback<GetBucketLoggingRequest,GetBucketLoggingResult> completedCallback)
request
- completedCallback
- OSSAsyncTask<GetBucketRefererResult> asyncGetBucketReferer(GetBucketRefererRequest request, OSSCompletedCallback<GetBucketRefererRequest,GetBucketRefererResult> completedCallback)
request
- completedCallback
- PutBucketLifecycleResult putBucketLifecycle(PutBucketLifecycleRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<PutBucketLifecycleResult> asyncPutBucketLifecycle(PutBucketLifecycleRequest request, OSSCompletedCallback<PutBucketLifecycleRequest,PutBucketLifecycleResult> completedCallback)
request
- completedCallback
- GetBucketLifecycleResult getBucketLifecycle(GetBucketLifecycleRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<GetBucketLifecycleResult> asyncGetBucketLifecycle(GetBucketLifecycleRequest request, OSSCompletedCallback<GetBucketLifecycleRequest,GetBucketLifecycleResult> completedCallback)
request
- completedCallback
- DeleteBucketLifecycleResult deleteBucketLifecycle(DeleteBucketLifecycleRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<DeleteBucketLifecycleResult> asyncDeleteBucketLifecycle(DeleteBucketLifecycleRequest request, OSSCompletedCallback<DeleteBucketLifecycleRequest,DeleteBucketLifecycleResult> completedCallback)
request
- completedCallback
- OSSAsyncTask<ListObjectsResult> asyncListObjects(ListObjectsRequest request, OSSCompletedCallback<ListObjectsRequest,ListObjectsResult> completedCallback)
request
- completedCallback
- ListObjectsResult listObjects(ListObjectsRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<InitiateMultipartUploadResult> asyncInitMultipartUpload(InitiateMultipartUploadRequest request, OSSCompletedCallback<InitiateMultipartUploadRequest,InitiateMultipartUploadResult> completedCallback)
request
- completedCallback
- InitiateMultipartUploadResult initMultipartUpload(InitiateMultipartUploadRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<UploadPartResult> asyncUploadPart(UploadPartRequest request, OSSCompletedCallback<UploadPartRequest,UploadPartResult> completedCallback)
request
- completedCallback
- UploadPartResult uploadPart(UploadPartRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<CompleteMultipartUploadResult> asyncCompleteMultipartUpload(CompleteMultipartUploadRequest request, OSSCompletedCallback<CompleteMultipartUploadRequest,CompleteMultipartUploadResult> completedCallback)
request
- completedCallback
- CompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<AbortMultipartUploadResult> asyncAbortMultipartUpload(AbortMultipartUploadRequest request, OSSCompletedCallback<AbortMultipartUploadRequest,AbortMultipartUploadResult> completedCallback)
request
- completedCallback
- AbortMultipartUploadResult abortMultipartUpload(AbortMultipartUploadRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<ListPartsResult> asyncListParts(ListPartsRequest request, OSSCompletedCallback<ListPartsRequest,ListPartsResult> completedCallback)
request
- completedCallback
- ListPartsResult listParts(ListPartsRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<ListMultipartUploadsResult> asyncListMultipartUploads(ListMultipartUploadsRequest request, OSSCompletedCallback<ListMultipartUploadsRequest,ListMultipartUploadsResult> completedCallback)
request
- ClientException
ServiceException
ListMultipartUploadsResult listMultipartUploads(ListMultipartUploadsRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
void updateCredentialProvider(OSSCredentialProvider credentialProvider)
OSSAsyncTask<CompleteMultipartUploadResult> asyncMultipartUpload(MultipartUploadRequest request, OSSCompletedCallback<MultipartUploadRequest,CompleteMultipartUploadResult> completedCallback)
request
- ClientException
ServiceException
CompleteMultipartUploadResult multipartUpload(MultipartUploadRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<ResumableUploadResult> asyncResumableUpload(ResumableUploadRequest request, OSSCompletedCallback<ResumableUploadRequest,ResumableUploadResult> completedCallback)
request
- ClientException
ServiceException
ResumableUploadResult resumableUpload(ResumableUploadRequest request) throws ClientException, ServiceException
request
- ClientException
ServiceException
OSSAsyncTask<ResumableUploadResult> asyncSequenceUpload(ResumableUploadRequest request, OSSCompletedCallback<ResumableUploadRequest,ResumableUploadResult> completedCallback)
ResumableUploadResult sequenceUpload(ResumableUploadRequest request) throws ClientException, ServiceException
java.lang.String presignConstrainedObjectURL(GeneratePresignedUrlRequest request) throws ClientException
request
- Generates the signed by custom config @see {GeneratePresignedUrlRequest}ClientException
java.lang.String presignConstrainedObjectURL(java.lang.String bucketName, java.lang.String objectKey, long expiredTimeInSeconds) throws ClientException
bucketName
- bucket nameobjectKey
- Object keyexpiredTimeInSeconds
- URL's expiration time in secondsClientException
java.lang.String presignPublicObjectURL(java.lang.String bucketName, java.lang.String objectKey)
bucketName
- bucket nameobjectKey
- Object keyboolean doesObjectExist(java.lang.String bucketName, java.lang.String objectKey) throws ClientException, ServiceException
bucketName
- objectKey
- ClientException
ServiceException
void abortResumableUpload(ResumableUploadRequest request) throws java.io.IOException
request
- java.io.IOException
OSSAsyncTask<TriggerCallbackResult> asyncTriggerCallback(TriggerCallbackRequest request, OSSCompletedCallback<TriggerCallbackRequest,TriggerCallbackResult> completedCallback)
TriggerCallbackResult triggerCallback(TriggerCallbackRequest request) throws ClientException, ServiceException
OSSAsyncTask<ImagePersistResult> asyncImagePersist(ImagePersistRequest request, OSSCompletedCallback<ImagePersistRequest,ImagePersistResult> completedCallback)
ImagePersistResult imagePersist(ImagePersistRequest request) throws ClientException, ServiceException
PutSymlinkResult putSymlink(PutSymlinkRequest request) throws ClientException, ServiceException
request
- A PutSymlinkRequest
instance that specifies the
bucket name, symlink name.ClientException
- OSS Client side exception.ServiceException
- OSS Server side exception.OSSAsyncTask<PutSymlinkResult> asyncPutSymlink(PutSymlinkRequest request, OSSCompletedCallback<PutSymlinkRequest,PutSymlinkResult> completedCallback)
request
- A PutSymlinkRequest
instance that specifies the
bucket name, symlink name.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsOSSAsyncTask
instance.GetSymlinkResult getSymlink(GetSymlinkRequest request) throws ClientException, ServiceException
request
- A GetSymlinkRequest
instance which specifies the bucket
name and symlink name.ClientException
- OSS Client side exception.ServiceException
- OSS Server side exception.OSSAsyncTask<GetSymlinkResult> asyncGetSymlink(GetSymlinkRequest request, OSSCompletedCallback<GetSymlinkRequest,GetSymlinkResult> completedCallback)
request
- A GetSymlinkRequest
instance which specifies the bucket
name and symlink name.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsOSSAsyncTask
instance.RestoreObjectResult restoreObject(RestoreObjectRequest request) throws ClientException, ServiceException
request
- A RestoreObjectRequest
instance that specifies the bucket
name and object key.RestoreObjectResult
instance.ClientException
ServiceException
OSSAsyncTask<RestoreObjectResult> asyncRestoreObject(RestoreObjectRequest request, OSSCompletedCallback<RestoreObjectRequest,RestoreObjectResult> completedCallback)
request
- A RestoreObjectRequest
instance that specifies the bucket
name and object key.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsOSSAsyncTask
instance.OSSAsyncTask<ResumableDownloadResult> asyncResumableDownload(ResumableDownloadRequest request, OSSCompletedCallback<ResumableDownloadRequest,ResumableDownloadResult> completedCallback)
request
- A ResumableDownloadRequest
instance that specifies the bucket
name and object key.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsOSSAsyncTask
instance.ResumableDownloadResult syncResumableDownload(ResumableDownloadRequest request) throws ClientException, ServiceException
request
- A ResumableDownloadRequest
instance that specifies the bucket
name and object key.ClientException
ServiceException
PutObjectTaggingResult putObjectTagging(PutObjectTaggingRequest request) throws ClientException, ServiceException
request
- A PutObjectTaggingRequest
instance which specifies the bucket
name、 object key and tags.PutObjectTaggingResult
instance.ClientException
ServiceException
OSSAsyncTask<PutObjectTaggingResult> asyncPutObjectTagging(PutObjectTaggingRequest request, OSSCompletedCallback<PutObjectTaggingRequest,PutObjectTaggingResult> completedCallback)
request
- A PutObjectTaggingRequest
instance which specifies the bucket
name、 object key and tags.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsOSSAsyncTask
instance.GetObjectTaggingResult getObjectTagging(GetObjectTaggingRequest request) throws ClientException, ServiceException
request
- A GetObjectTaggingRequest
instance which specifies the bucket
name and object key.GetObjectTaggingResult
instance.ClientException
ServiceException
OSSAsyncTask<GetObjectTaggingResult> asyncGetObjectTagging(GetObjectTaggingRequest request, OSSCompletedCallback<GetObjectTaggingRequest,GetObjectTaggingResult> completedCallback)
request
- A GetObjectTaggingRequest
instance that specifies the bucket
name and object key.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsOSSAsyncTask
instance.DeleteObjectTaggingResult deleteObjectTagging(DeleteObjectTaggingRequest request) throws ClientException, ServiceException
request
- A DeleteObjectTaggingRequest
instance which specifies the bucket
name and object key.DeleteObjectTaggingResult
instance.ClientException
ServiceException
OSSAsyncTask<DeleteObjectTaggingResult> asyncDeleteObjectTagging(DeleteObjectTaggingRequest request, OSSCompletedCallback<DeleteObjectTaggingRequest,DeleteObjectTaggingResult> completedCallback)
request
- A DeleteObjectTaggingRequest
instance that specifies the bucket
name and object key.completedCallback
- A OSSCompletedCallback
instance that specifies callback functionsOSSAsyncTask
instance.