public interface IObsClient
Modifier and Type | Method and Description |
---|---|
HeaderResponse |
abortMultipartUpload(AbortMultipartUploadRequest request)
Abort a multipart upload.
|
AppendObjectResult |
appendObject(AppendObjectRequest request)
Perform an appendable upload.
|
void |
close()
Close ObsClient and release connection resources.
|
CompleteMultipartUploadResult |
completeMultipartUpload(CompleteMultipartUploadRequest request)
Combine parts.
|
CopyObjectResult |
copyObject(CopyObjectRequest request)
Copy an object.
|
CopyObjectResult |
copyObject(String sourceBucketName,
String sourceObjectKey,
String destBucketName,
String destObjectKey)
Copy an object.
|
CopyPartResult |
copyPart(CopyPartRequest request)
Copy a part.
|
ObsBucket |
createBucket(CreateBucketRequest request)
Create a bucket.
|
ObsBucket |
createBucket(ObsBucket bucket)
Create a bucket.
|
ObsBucket |
createBucket(String bucketName)
Create a bucket.
|
ObsBucket |
createBucket(String bucketName,
String location)
Create a bucket.
|
PostSignatureResponse |
createPostSignature(PostSignatureRequest request)
Generate parameters for browser-based authorized access.
|
TemporarySignatureResponse |
createTemporarySignature(TemporarySignatureRequest request)
Generate temporarily authorized access parameters.
|
HeaderResponse |
deleteBucket(String bucketName)
Delete a bucket.
|
HeaderResponse |
deleteBucketCors(String bucketName)
Delete the bucket CORS rules.
|
HeaderResponse |
deleteBucketDirectColdAccess(String bucketName)
Delete the direct reading policy for Archive objects in a bucket.
|
HeaderResponse |
deleteBucketEncryption(String bucketName)
Delete bucket encryption configuration.
|
HeaderResponse |
deleteBucketLifecycle(String bucketName)
Delete the bucket lifecycle rules from a bucket.
|
HeaderResponse |
deleteBucketPolicy(String bucketName)
Delete bucket policies.
|
HeaderResponse |
deleteBucketReplication(String bucketName)
Delete the bucket cross-region replication configuration.
|
HeaderResponse |
deleteBucketTagging(String bucketName)
Delete bucket tags.
|
HeaderResponse |
deleteBucketWebsite(String bucketName)
Delete the website hosting configuration of a bucket.
|
DeleteObjectResult |
deleteObject(String bucketName,
String objectKey)
Delete an object.
|
DeleteObjectResult |
deleteObject(String bucketName,
String objectKey,
String versionId)
Delete an object.
|
DeleteObjectsResult |
deleteObjects(DeleteObjectsRequest deleteObjectsRequest)
Delete objects in a batch.
|
ReadAheadResult |
deleteReadAheadObjects(String bucketName,
String prefix)
Delete the read-ahead cache.
|
boolean |
doesObjectExist(GetObjectMetadataRequest request) |
boolean |
doesObjectExist(String buckeName,
String objectKey) |
DownloadFileResult |
downloadFile(DownloadFileRequest downloadFileRequest)
Download a file.
|
AccessControlList |
getBucketAcl(String bucketName)
Obtain a bucket ACL.
|
BucketCors |
getBucketCors(String bucketName)
Obtain the bucket CORS rules.
|
BucketDirectColdAccess |
getBucketDirectColdAccess(String bucketName)
Obtain the direct reading policy for Archive objects in a bucket.
|
BucketEncryption |
getBucketEncryption(String bucketName)
Obtain bucket encryption configuration.
|
LifecycleConfiguration |
getBucketLifecycle(String bucketName)
Obtain the bucket lifecycle rules.
|
String |
getBucketLocation(String bucketName)
Obtain the bucket location.
|
BucketLocationResponse |
getBucketLocationV2(String bucketName)
Obtain the bucket location.
|
BucketLoggingConfiguration |
getBucketLogging(String bucketName)
Obtain the logging settings of a bucket.
|
BucketMetadataInfoResult |
getBucketMetadata(BucketMetadataInfoRequest request)
Obtain bucket metadata.
|
BucketNotificationConfiguration |
getBucketNotification(String bucketName)
Obtain the notification configuration of a bucket.
|
String |
getBucketPolicy(String bucketName)
Obtain bucket policies.
|
BucketPolicyResponse |
getBucketPolicyV2(String bucketName)
Obtain bucket policies.
|
BucketQuota |
getBucketQuota(String bucketName)
Obtain the bucket quota.
|
ReplicationConfiguration |
getBucketReplication(String bucketName)
Obtain the cross-region replication configuration of a bucket.
|
BucketStorageInfo |
getBucketStorageInfo(String bucketName)
Obtain bucket storage information.
|
BucketStoragePolicyConfiguration |
getBucketStoragePolicy(String bucketName)
Obtain the bucket storage class.
|
BucketTagInfo |
getBucketTagging(String bucketName)
Obtain bucket tags.
|
BucketVersioningConfiguration |
getBucketVersioning(String bucketName)
Obtain the versioning status for a bucket.
|
WebsiteConfiguration |
getBucketWebsite(String bucketName)
Obtain the website hosting configuration of a Bucket
|
ObsObject |
getObject(GetObjectRequest request)
Download an object.
|
ObsObject |
getObject(String bucketName,
String objectKey)
Download an object.
|
ObsObject |
getObject(String bucketName,
String objectKey,
String versionId)
Download an object.
|
AccessControlList |
getObjectAcl(String bucketName,
String objectKey)
Obtain an object ACL.
|
AccessControlList |
getObjectAcl(String bucketName,
String objectKey,
String versionId)
Obtain an object ACL.
|
ObjectMetadata |
getObjectMetadata(GetObjectMetadataRequest request)
Obtain object properties.
|
ObjectMetadata |
getObjectMetadata(String bucketName,
String objectKey)
Obtain object properties.
|
ObjectMetadata |
getObjectMetadata(String bucketName,
String objectKey,
String versionId)
Obtain object properties.
|
boolean |
headBucket(String bucketName)
Identify whether a bucket exists.
|
InitiateMultipartUploadResult |
initiateMultipartUpload(InitiateMultipartUploadRequest request)
Initialize a multipart upload.
|
List<ObsBucket> |
listBuckets(ListBucketsRequest request)
Obtain the bucket list.
|
ListBucketsResult |
listBucketsV2(ListBucketsRequest request)
Obtain the bucket list.
|
MultipartUploadListing |
listMultipartUploads(ListMultipartUploadsRequest request)
List incomplete multipart uploads.
|
ObjectListing |
listObjects(ListObjectsRequest request)
List objects in the bucket.
|
ObjectListing |
listObjects(String bucketName)
List objects in the bucket.
|
ListPartsResult |
listParts(ListPartsRequest request)
List uploaded parts.
|
ListVersionsResult |
listVersions(ListVersionsRequest request)
List versioning objects in a bucket.
|
ListVersionsResult |
listVersions(String bucketName)
List versioning objects in a bucket.
|
ListVersionsResult |
listVersions(String bucketName,
long maxKeys)
List versioning objects in a bucket.
|
ListVersionsResult |
listVersions(String bucketName,
String prefix,
String delimiter,
String keyMarker,
String versionIdMarker,
long maxKeys)
List versioning objects in a bucket.
|
PutObjectResult |
putObject(PutObjectRequest request)
Upload an object.
|
PutObjectResult |
putObject(String bucketName,
String objectKey,
File file)
Upload an object.
|
PutObjectResult |
putObject(String bucketName,
String objectKey,
File file,
ObjectMetadata metadata)
Upload an object.
|
PutObjectResult |
putObject(String bucketName,
String objectKey,
InputStream input)
Upload an object.
|
PutObjectResult |
putObject(String bucketName,
String objectKey,
InputStream input,
ObjectMetadata metadata)
Upload an object.
|
UploadProgressStatus |
putObjects(PutObjectsRequest request) |
ReadAheadQueryResult |
queryReadAheadObjectsTask(String bucketName,
String taskId)
Query the progress of a read-ahead task.
|
ReadAheadResult |
readAheadObjects(ReadAheadRequest request)
Read ahead objects.
|
void |
refresh(String accessKey,
String secretKey,
String securityToken)
Refresh the temporary access key.
|
RestoreObjectRequest.RestoreObjectStatus |
restoreObject(RestoreObjectRequest request)
Deprecated.
|
TaskProgressStatus |
restoreObjects(RestoreObjectsRequest request)
Restore Archive objects in a batch.
|
RestoreObjectResult |
restoreObjectV2(RestoreObjectRequest request)
Restore an Archive object.
|
HeaderResponse |
setBucketAcl(String bucketName,
AccessControlList acl)
Set a bucket ACL.
|
HeaderResponse |
setBucketCors(String bucketName,
BucketCors bucketCors)
Configure the bucket CORS.
|
HeaderResponse |
setBucketDirectColdAccess(String bucketName,
BucketDirectColdAccess access)
Set the direct reading policy for Archive objects in a bucket.
|
HeaderResponse |
setBucketEncryption(String bucketName,
BucketEncryption bucketEncryption)
Set bucket encryption.
|
HeaderResponse |
setBucketLifecycle(String bucketName,
LifecycleConfiguration lifecycleConfig)
Set the bucket lifecycle rules.
|
HeaderResponse |
setBucketLogging(String bucketName,
BucketLoggingConfiguration loggingConfiguration)
Configure logging for a bucket.
|
HeaderResponse |
setBucketLoggingConfiguration(String bucketName,
BucketLoggingConfiguration loggingConfiguration,
boolean updateTargetACLifRequired) |
HeaderResponse |
setBucketNotification(String bucketName,
BucketNotificationConfiguration bucketNotificationConfiguration)
Configure bucket notification.
|
HeaderResponse |
setBucketPolicy(String bucketName,
String policy)
Set bucket policies.
|
HeaderResponse |
setBucketQuota(String bucketName,
BucketQuota bucketQuota)
Set the bucket quota.
|
HeaderResponse |
setBucketReplication(String bucketName,
ReplicationConfiguration replicationConfiguration)
Configure cross-region replication for a bucket.
|
HeaderResponse |
setBucketStoragePolicy(String bucketName,
BucketStoragePolicyConfiguration bucketStorage)
Set the bucket storage class.
|
HeaderResponse |
setBucketTagging(String bucketName,
BucketTagInfo bucketTagInfo)
Set bucket tags.
|
HeaderResponse |
setBucketVersioning(String bucketName,
BucketVersioningConfiguration versioningConfiguration)
Set the versioning status for a bucket.
|
HeaderResponse |
setBucketWebsite(String bucketName,
WebsiteConfiguration websiteConfig)
Configure website hosting for a bucket.
|
HeaderResponse |
setObjectAcl(String bucketName,
String objectKey,
AccessControlList acl)
Set an object ACL.
|
HeaderResponse |
setObjectAcl(String bucketName,
String objectKey,
AccessControlList acl,
String versionId)
Set an object ACL.
|
ObjectMetadata |
setObjectMetadata(SetObjectMetadataRequest request)
Set object properties.
|
CompleteMultipartUploadResult |
uploadFile(UploadFileRequest uploadFileRequest)
Upload a file.
|
UploadPartResult |
uploadPart(String bucketName,
String objectKey,
String uploadId,
int partNumber,
File file)
Upload a part.
|
UploadPartResult |
uploadPart(String bucketName,
String objectKey,
String uploadId,
int partNumber,
InputStream input)
Upload a part.
|
UploadPartResult |
uploadPart(UploadPartRequest request)
Upload a part.
|
void refresh(String accessKey, String secretKey, String securityToken)
accessKey
- AK in the temporary access keysecretKey
- SK in the temporary access keysecurityToken
- Security tokenTemporarySignatureResponse createTemporarySignature(TemporarySignatureRequest request)
request
- Parameters in a request for temporarily authorized accessObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsPostSignatureResponse createPostSignature(PostSignatureRequest request) throws ObsException
request
- Request parameters for V4 browser-based authorized accessObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObsBucket createBucket(String bucketName) throws ObsException
Bucket naming rules:
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObsBucket createBucket(String bucketName, String location) throws ObsException
Bucket naming rules:
bucketName
- Bucket namelocation
- Bucket location. This parameter is mandatory unless the endpoint belongs to the default region.ObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObsBucket createBucket(ObsBucket bucket) throws ObsException
Bucket naming rules:
bucket
- Bucket information, including the request parametersObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObsBucket createBucket(CreateBucketRequest request) throws ObsException
Bucket naming rules:
request
- Request parameters for creating a bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsList<ObsBucket> listBuckets(ListBucketsRequest request) throws ObsException
request
- Obtain the request parameters for obtaining the bucket list.ObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsListBucketsResult listBucketsV2(ListBucketsRequest request) throws ObsException
request
- Obtain the request parameters for obtaining the bucket list.ObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucket(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObjectListing listObjects(ListObjectsRequest request) throws ObsException
request
- Request parameters for listing objects in a bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObjectListing listObjects(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsboolean headBucket(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsListVersionsResult listVersions(ListVersionsRequest request) throws ObsException
request
- Request parameters for listing versioning objects in the bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsListVersionsResult listVersions(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsListVersionsResult listVersions(String bucketName, long maxKeys) throws ObsException
bucketName
- Bucket namemaxKeys
- Maximum number of versioning objects to be listedObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsListVersionsResult listVersions(String bucketName, String prefix, String delimiter, String keyMarker, String versionIdMarker, long maxKeys) throws ObsException
bucketName
- Bucket nameprefix
- Object name prefix used for listing versioning objectsdelimiter
- Character for grouping object nameskeyMarker
- Start position for listing versioning objects (sorted by object name)versionIdMarker
- Start position for listing versioning objects (sorted by version ID)maxKeys
- Maximum number of versioning objects to be listedObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketMetadataInfoResult getBucketMetadata(BucketMetadataInfoRequest request) throws ObsException
request
- Request parameters for obtaining bucket metadataObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsAccessControlList getBucketAcl(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketAcl(String bucketName, AccessControlList acl) throws ObsException
bucketName
- Bucket nameacl
- ACLObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsString getBucketLocation(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketLocationResponse getBucketLocationV2(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketStorageInfo getBucketStorageInfo(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketQuota getBucketQuota(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketQuota(String bucketName, BucketQuota bucketQuota) throws ObsException
bucketName
- Bucket namebucketQuota
- Bucket quotaObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketStoragePolicyConfiguration getBucketStoragePolicy(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketStoragePolicy(String bucketName, BucketStoragePolicyConfiguration bucketStorage) throws ObsException
bucketName
- Bucket namebucketStorage
- Bucket storage policyObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketCors(String bucketName, BucketCors bucketCors) throws ObsException
bucketName
- Bucket namebucketCors
- CORS rulesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketCors getBucketCors(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketCors(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketLoggingConfiguration getBucketLogging(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketLoggingConfiguration(String bucketName, BucketLoggingConfiguration loggingConfiguration, boolean updateTargetACLifRequired) throws ObsException
ObsException
HeaderResponse setBucketLogging(String bucketName, BucketLoggingConfiguration loggingConfiguration) throws ObsException
bucketName
- Bucket nameloggingConfiguration
- Logging settingsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketVersioning(String bucketName, BucketVersioningConfiguration versioningConfiguration) throws ObsException
bucketName
- Bucket nameversioningConfiguration
- Versioning status of the bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketVersioningConfiguration getBucketVersioning(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsLifecycleConfiguration getBucketLifecycle(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketLifecycle(String bucketName, LifecycleConfiguration lifecycleConfig) throws ObsException
bucketName
- Bucket namelifecycleConfig
- Bucket lifecycle rulesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketLifecycle(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsString getBucketPolicy(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketPolicyResponse getBucketPolicyV2(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketPolicy(String bucketName, String policy) throws ObsException
bucketName
- Bucket namepolicy
- Bucket policy, in the JSON formatObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketPolicy(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsWebsiteConfiguration getBucketWebsite(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketWebsite(String bucketName, WebsiteConfiguration websiteConfig) throws ObsException
bucketName
- Bucket namewebsiteConfig
- Website hosting configuration of a bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketWebsite(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketTagInfo getBucketTagging(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketTagging(String bucketName, BucketTagInfo bucketTagInfo) throws ObsException
bucketName
- Bucket namebucketTagInfo
- Bucket tagsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketTagging(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketEncryption getBucketEncryption(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketEncryption(String bucketName, BucketEncryption bucketEncryption) throws ObsException
bucketName
- Bucket namebucketEncryption
- Bucket encryption configurationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketEncryption(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketReplication(String bucketName, ReplicationConfiguration replicationConfiguration) throws ObsException
bucketName
- Bucket namereplicationConfiguration
- Cross-region replication configurationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsReplicationConfiguration getBucketReplication(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketReplication(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketNotificationConfiguration getBucketNotification(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketNotification(String bucketName, BucketNotificationConfiguration bucketNotificationConfiguration) throws ObsException
bucketName
- Bucket namebucketNotificationConfiguration
- Bucket notification configurationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsPutObjectResult putObject(String bucketName, String objectKey, InputStream input, ObjectMetadata metadata) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameinput
- Data stream to be uploadedmetadata
- Object propertiesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsPutObjectResult putObject(String bucketName, String objectKey, InputStream input) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameinput
- Data stream to be uploadedObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsPutObjectResult putObject(PutObjectRequest request) throws ObsException
request
- Parameters in an object upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsPutObjectResult putObject(String bucketName, String objectKey, File file) throws ObsException
bucketName
- Bucket nameobjectKey
- Object namefile
- File to be uploadedObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsPutObjectResult putObject(String bucketName, String objectKey, File file, ObjectMetadata metadata) throws ObsException
bucketName
- Bucket nameobjectKey
- Object namefile
- File to be uploadedmetadata
- Object propertiesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsAppendObjectResult appendObject(AppendObjectRequest request) throws ObsException
request
- Parameters in an appendable upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsCompleteMultipartUploadResult uploadFile(UploadFileRequest uploadFileRequest) throws ObsException
uploadFileRequest
- Parameters in a file upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsUploadProgressStatus putObjects(PutObjectsRequest request) throws ObsException
ObsException
boolean doesObjectExist(String buckeName, String objectKey) throws ObsException
ObsException
boolean doesObjectExist(GetObjectMetadataRequest request) throws ObsException
ObsException
DownloadFileResult downloadFile(DownloadFileRequest downloadFileRequest) throws ObsException
downloadFileRequest
- Parameters in a request for downloading a fileObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObsObject getObject(GetObjectRequest request) throws ObsException
request
- Parameters in an object download requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObsObject getObject(String bucketName, String objectKey, String versionId) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameversionId
- Object version IDObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObsObject getObject(String bucketName, String objectKey) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObjectMetadata getObjectMetadata(GetObjectMetadataRequest request) throws ObsException
request
- Parameters in a request for obtaining the properties of an objectObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObjectMetadata getObjectMetadata(String bucketName, String objectKey, String versionId) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameversionId
- Object version IDObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObjectMetadata getObjectMetadata(String bucketName, String objectKey) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsObjectMetadata setObjectMetadata(SetObjectMetadataRequest request) throws ObsException
request
- Parameters in the request for obtaining object propertiesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated RestoreObjectRequest.RestoreObjectStatus restoreObject(RestoreObjectRequest request) throws ObsException
request
- Parameters in a request for restoring an Archive objectObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsRestoreObjectResult restoreObjectV2(RestoreObjectRequest request) throws ObsException
request
- Request parameters for restoring an Archive objectObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsTaskProgressStatus restoreObjects(RestoreObjectsRequest request) throws ObsException
request
- Request parameters for restoring Archive objects in a batchObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsDeleteObjectResult deleteObject(String bucketName, String objectKey, String versionId) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameversionId
- Object version IDObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsDeleteObjectResult deleteObject(String bucketName, String objectKey) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsDeleteObjectsResult deleteObjects(DeleteObjectsRequest deleteObjectsRequest) throws ObsException
deleteObjectsRequest
- Parameters in an object batch deletion requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsAccessControlList getObjectAcl(String bucketName, String objectKey, String versionId) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameversionId
- Object version IDObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsAccessControlList getObjectAcl(String bucketName, String objectKey) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setObjectAcl(String bucketName, String objectKey, AccessControlList acl, String versionId) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameacl
- ACLversionId
- Object version IDObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setObjectAcl(String bucketName, String objectKey, AccessControlList acl) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameacl
- ACLObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsCopyObjectResult copyObject(CopyObjectRequest request) throws ObsException
request
- Parameters in a request for copying an objectObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsCopyObjectResult copyObject(String sourceBucketName, String sourceObjectKey, String destBucketName, String destObjectKey) throws ObsException
sourceBucketName
- Source bucket namesourceObjectKey
- Source object namedestBucketName
- Destination bucket namedestObjectKey
- Destination object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsInitiateMultipartUploadResult initiateMultipartUpload(InitiateMultipartUploadRequest request) throws ObsException
request
- Parameters in a request for initializing a multipart uploadObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse abortMultipartUpload(AbortMultipartUploadRequest request) throws ObsException
request
- Parameters in a request for aborting a multipart uploadObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsUploadPartResult uploadPart(String bucketName, String objectKey, String uploadId, int partNumber, InputStream input) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameuploadId
- Multipart upload IDpartNumber
- Part numberinput
- Data stream to be uploadedObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsUploadPartResult uploadPart(String bucketName, String objectKey, String uploadId, int partNumber, File file) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameuploadId
- Multipart upload IDpartNumber
- Part numberfile
- File to be uploadedObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsUploadPartResult uploadPart(UploadPartRequest request) throws ObsException
request
- Parameters in a part upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsCopyPartResult copyPart(CopyPartRequest request) throws ObsException
request
- Parameters in the request for copying a partObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsCompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest request) throws ObsException
request
- Parameters in a request for combining partsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsListPartsResult listParts(ListPartsRequest request) throws ObsException
request
- Parameters in a request for listing uploaded partsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsMultipartUploadListing listMultipartUploads(ListMultipartUploadsRequest request) throws ObsException
request
- Parameters in a request for listing multipart uploadsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsReadAheadResult readAheadObjects(ReadAheadRequest request) throws ObsException
request
- Request parameters for reading ahead objectsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsReadAheadResult deleteReadAheadObjects(String bucketName, String prefix) throws ObsException
bucketName
- Bucket nameprefix
- Name prefix of objects to be read aheadObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsReadAheadQueryResult queryReadAheadObjectsTask(String bucketName, String taskId) throws ObsException
bucketName
- Bucket nametaskId
- ID of the read-ahead taskObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse setBucketDirectColdAccess(String bucketName, BucketDirectColdAccess access) throws ObsException
bucketName
- Bucket nameaccess
- Direct reading policyObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsBucketDirectColdAccess getBucketDirectColdAccess(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsHeaderResponse deleteBucketDirectColdAccess(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failsvoid close() throws IOException
IOException
- ObsClient close exceptionCopyright © 2019. All rights reserved.