public class ObsClient extends com.obs.services.internal.ObsService implements Closeable, IObsClient, IFSClient
Constructor and Description |
---|
ObsClient(IObsCredentialsProvider provider,
ObsConfiguration config) |
ObsClient(IObsCredentialsProvider provider,
String endPoint) |
ObsClient(ObsConfiguration config)
Constructor
|
ObsClient(String endPoint)
Constructor
|
ObsClient(String accessKey,
String secretKey,
ObsConfiguration config)
Constructor
|
ObsClient(String accessKey,
String secretKey,
String endPoint)
Constructor
|
ObsClient(String accessKey,
String secretKey,
String securityToken,
ObsConfiguration config)
Constructor
|
ObsClient(String accessKey,
String secretKey,
String securityToken,
String endPoint)
Constructor
|
Modifier and Type | Method and Description |
---|---|
HeaderResponse |
abortMultipartUpload(AbortMultipartUploadRequest request)
Abort a multipart upload.
|
ObsFSFile |
appendFile(WriteFileRequest request)
Append data to a file.
|
AppendObjectResult |
appendObject(AppendObjectRequest request)
Perform an appendable upload.
|
String |
base64Md5(InputStream is) |
String |
base64Md5(InputStream is,
long length,
long offset) |
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(S3Bucket bucket)
Deprecated.
|
ObsBucket |
createBucket(String bucketName)
Create a bucket.
|
ObsBucket |
createBucket(String bucketName,
String location)
Create a bucket.
|
TemporarySignatureResponse |
createGetTemporarySignature(String bucketName,
String objectKey,
String prefix,
Date expiryDate,
Map<String,String> headers,
Map<String,Object> queryParams)
Generate temporary authorization parameters for GET requests based on the object name prefix and validity period.
|
TemporarySignatureResponse |
createGetTemporarySignature(String bucketName,
String objectKey,
String prefix,
long expires,
Map<String,String> headers,
Map<String,Object> queryParams)
Generate temporary authorization parameters for GET requests based on the object name prefix and validity period.
|
PostSignatureResponse |
createPostSignature(long expires,
String bucketName,
String objectKey)
Generate parameters for browser-based authorized access.
|
PostSignatureResponse |
createPostSignature(PostSignatureRequest request)
Generate parameters for browser-based authorized access.
|
PostSignatureResponse |
createPostSignature(String acl,
String contentType,
long expires,
String bucketName,
String objectKey)
Generate parameters for browser-based authorized access.
|
String |
createSignedUrl(HttpMethodEnum method,
String bucketName,
String objectKey,
SpecialParamEnum specialParam,
Date expiryTime,
Map<String,String> headers,
Map<String,Object> queryParams)
Deprecated.
|
String |
createSignedUrl(HttpMethodEnum method,
String bucketName,
String objectKey,
SpecialParamEnum specialParam,
long expires,
Map<String,String> headers,
Map<String,Object> queryParams)
Deprecated.
|
TemporarySignatureResponse |
createTemporarySignature(TemporarySignatureRequest request)
Generate temporarily authorized access parameters.
|
V4PostSignatureResponse |
createV4PostSignature(long expires,
String bucketName,
String objectKey)
Deprecated.
|
V4PostSignatureResponse |
createV4PostSignature(String acl,
String contentType,
long expires,
String bucketName,
String objectKey)
Deprecated.
|
V4PostSignatureResponse |
createV4PostSignature(V4PostSignatureRequest request)
Deprecated.
|
V4TemporarySignatureResponse |
createV4TemporarySignature(V4TemporarySignatureRequest request)
Deprecated.
|
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 |
deleteBucketLifecycleConfiguration(String bucketName)
Deprecated.
|
HeaderResponse |
deleteBucketPolicy(String bucketName)
Delete bucket policies.
|
HeaderResponse |
deleteBucketReplication(String bucketName)
Delete the bucket cross-region replication configuration.
|
HeaderResponse |
deleteBucketReplicationConfiguration(String bucketName)
Deprecated.
|
HeaderResponse |
deleteBucketTagging(String bucketName)
Delete bucket tags.
|
HeaderResponse |
deleteBucketWebsite(String bucketName)
Delete the website hosting configuration of a bucket.
|
HeaderResponse |
deleteBucketWebsiteConfiguration(String bucketName)
Deprecated.
|
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.
|
DropFileResult |
dropFile(DropFileRequest request)
Delete a file.
|
TaskProgressStatus |
dropFolder(DropFolderRequest request)
Delete a folder.
|
protected void |
finalize() |
ObsFSAttribute |
getAttribute(GetAttributeRequest request)
Obtain file or folder properties.
|
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.
|
GetBucketFSStatusResult |
getBucketFSStatus(GetBucketFSStatusRequest request)
Check whether the file gateway feature is enabled for the bucket.
|
LifecycleConfiguration |
getBucketLifecycle(String bucketName)
Obtain the bucket lifecycle rules.
|
LifecycleConfiguration |
getBucketLifecycleConfiguration(String bucketName)
Deprecated.
|
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.
|
BucketLoggingConfiguration |
getBucketLoggingConfiguration(String bucketName)
Deprecated.
|
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.
|
ReplicationConfiguration |
getBucketReplicationConfiguration(String bucketName)
Deprecated.
|
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
|
WebsiteConfiguration |
getBucketWebsiteConfiguration(String bucketName)
Deprecated.
|
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<S3Bucket> |
listBuckets()
Deprecated.
|
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.
|
ListVersionsResult |
listVersions(String bucketName,
String prefix,
String delimiter,
String keyMarker,
String versionIdMarker,
long maxKeys,
String nextVersionIdMarker)
Deprecated.
|
ObsFSBucket |
newBucket(NewBucketRequest request)
Create a bucket.
|
ObsFSFile |
newFile(NewFileRequest request)
Create a file.
|
ObsFSFolder |
newFolder(NewFolderRequest request)
Create a folder.
|
OptionsInfoResult |
optionsBucket(String bucketName,
OptionsInfoRequest optionInfo)
Deprecated.
|
OptionsInfoResult |
optionsObject(String bucketName,
String objectKey,
OptionsInfoRequest optionInfo)
Deprecated.
|
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.
|
ReadFileResult |
readFile(ReadFileRequest request)
Obtain the file content.
|
void |
refresh(String accessKey,
String secretKey,
String securityToken)
Refresh the temporary access key.
|
RenameResult |
renameFile(RenameRequest request)
Rename a file.
|
RenameResult |
renameFolder(RenameRequest request)
Rename a folder.
|
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 |
setBucketAcl(String bucketName,
String cannedACL,
AccessControlList acl)
Deprecated.
|
HeaderResponse |
setBucketCors(String bucketName,
BucketCors bucketCors)
Configure the bucket CORS.
|
HeaderResponse |
setBucketCors(String bucketName,
S3BucketCors s3BucketCors)
Deprecated.
|
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 |
setBucketFSStatus(SetBucketFSStatusRequest request)
Specify whether to enable the file gateway feature for the bucket.
|
HeaderResponse |
setBucketLifecycle(String bucketName,
LifecycleConfiguration lifecycleConfig)
Set the bucket lifecycle rules.
|
HeaderResponse |
setBucketLifecycleConfiguration(String bucketName,
LifecycleConfiguration lifecycleConfig)
Deprecated.
|
HeaderResponse |
setBucketLogging(String bucketName,
BucketLoggingConfiguration loggingConfiguration)
Configure logging for a bucket.
|
HeaderResponse |
setBucketLoggingConfiguration(String bucketName,
BucketLoggingConfiguration loggingConfiguration)
Deprecated.
|
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 |
setBucketReplicationConfiguration(String bucketName,
ReplicationConfiguration replicationConfiguration)
Deprecated.
|
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 |
setBucketVersioning(String bucketName,
String status)
Deprecated.
|
HeaderResponse |
setBucketWebsite(String bucketName,
WebsiteConfiguration websiteConfig)
Configure website hosting for a bucket.
|
HeaderResponse |
setBucketWebsiteConfiguration(String bucketName,
WebsiteConfiguration websiteConfig)
Deprecated.
|
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.
|
HeaderResponse |
setObjectAcl(String bucketName,
String objectKey,
String cannedACL,
AccessControlList acl,
String versionId)
Deprecated.
|
ObjectMetadata |
setObjectMetadata(SetObjectMetadataRequest request)
Set object properties.
|
TruncateFileResult |
truncateFile(TruncateFileRequest request)
Truncate a file.
|
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.
|
ObsFSFile |
writeFile(WriteFileRequest request)
Write data to a file.
|
_createPostSignature, _createTemporarySignature, abortMultipartUploadImpl, appendObjectImpl, completeMultipartUploadImpl, copyObjectImpl, copyPartImpl, createBucketImpl, createFetchJobImpl, createRequestBody, createV4TemporarySignature, deleteBucketCorsImpl, deleteBucketDirectColdAccessImpl, deleteBucketEncryptionImpl, deleteBucketImpl, deleteBucketLifecycleConfigurationImpl, deleteBucketPolicyImpl, deleteBucketReplicationConfigurationImpl, deleteBucketTaggingImpl, deleteBucketWebsiteConfigurationImpl, deleteDisPolicyImpl, deleteExtensionPolicyImpl, deleteObjectImpl, deleteObjectsImpl, DeleteReadAheadObjectsImpl, doesObjectExistImpl, getApiVersion, getBucketAclImpl, getBucketCorsImpl, getBucketDirectColdAccessImpl, getBucketEncryptionImpl, getBucketLifecycleConfigurationImpl, getBucketLocationImpl, getBucketLoggingConfigurationImpl, getBucketMetadataImpl, getBucketNotificationConfigurationImpl, getBucketPolicyImpl, getBucketQuotaImpl, getBucketReplicationConfigurationImpl, getBucketStorageInfoImpl, getBucketStoragePolicyImpl, getBucketTaggingImpl, getBucketVersioningImpl, getBucketWebsiteConfigurationImpl, getCredential, getDisPolicyImpl, getObjectAclImpl, getObjectImpl, getObjectImpl, getObjectMetadataImpl, headBucketImpl, initiateMultipartUploadImpl, initThreadPool, listAllBucketsImpl, listMultipartUploadsImpl, listObjectsImpl, listPartsImpl, listVersionsImpl, optionsImpl, putDisPolicyImpl, putObjectImpl, queryExtensionPolicyImpl, queryFetchJobImpl, queryReadAheadObjectsTaskImpl, readAheadObjectsImpl, recordBulkTaskStatus, renameObjectImpl, restoreObjectImpl, restoreObjectV2Impl, setBucketAclImpl, setBucketCorsImpl, setBucketDirectColdAccessImpl, setBucketEncryptionImpl, setBucketFSStatusImpl, setBucketLifecycleConfigurationImpl, setBucketLoggingConfigurationImpl, setBucketNotificationImpl, setBucketPolicyImpl, setBucketQuotaImpl, setBucketReplicationConfigurationImpl, setBucketStorageImpl, setBucketTaggingImpl, setBucketVersioningImpl, setBucketWebsiteConfigurationImpl, setExtensionPolicyImpl, setObjectAclImpl, setObjectMetadataImpl, truncateFileImpl, uploadPartImpl, verifyResponseContentType, verifyResponseContentTypeForJson, writeFileImpl
addRequestHeadersToConnection, addRequestParametersToUrlPath, addRequestParametersToUrlPath, authorizeHttpRequest, convertHeadersToMap, getApiVersionCache, getEndpoint, getFileSystemDelimiter, getHttpPort, getHttpsOnly, getHttpsPort, getIConvertor, getIHeaders, getProviderCredentials, getRestHeaderPrefix, getRestMetadataPrefix, getXmlResponseSaxParser, initHttpClient, isAuthTypeNegotiation, isCname, isKeepAlive, isPathStyle, performRequest, performRequest, performRequest, performRequestAsync, performRequestAsync, performRequestAsync, performRequesttWithoutSignatureAsync, performRequestWithoutSignature, performRestDelete, performRestDelete, performRestDelete, performRestDelete, performRestForApiVersion, performRestGet, performRestGet, performRestGetForListBuckets, performRestHead, performRestOptions, performRestPost, performRestPost, performRestPut, performRestPut, renameMetadataKeys, retryRequest, setProviderCredentials, setupConnection, setupConnection, setupConnection, shutdown, shutdownImpl, sleepOnInternalError
public ObsClient(String endPoint)
endPoint
- OBS endpointpublic ObsClient(ObsConfiguration config)
config
- Configuration parameters of ObsClientpublic ObsClient(String accessKey, String secretKey, String endPoint)
accessKey
- AK in the access keysecretKey
- SK in the access keyendPoint
- OBS endpointpublic ObsClient(String accessKey, String secretKey, ObsConfiguration config)
accessKey
- AK in the access keysecretKey
- SK in the access keyconfig
- Configuration parameters of ObsClientpublic ObsClient(String accessKey, String secretKey, String securityToken, String endPoint)
accessKey
- AK in the temporary access keysecretKey
- SK in the temporary access keysecurityToken
- Security tokenendPoint
- OBS endpointpublic ObsClient(String accessKey, String secretKey, String securityToken, ObsConfiguration config)
accessKey
- AK in the temporary access keysecretKey
- SK in the temporary access keysecurityToken
- Security tokenconfig
- Configuration parameters of ObsClientpublic ObsClient(IObsCredentialsProvider provider, String endPoint)
public ObsClient(IObsCredentialsProvider provider, ObsConfiguration config)
public void refresh(String accessKey, String secretKey, String securityToken)
IObsClient
refresh
in interface IObsClient
accessKey
- AK in the temporary access keysecretKey
- SK in the temporary access keysecurityToken
- Security token@Deprecated public String createSignedUrl(HttpMethodEnum method, String bucketName, String objectKey, SpecialParamEnum specialParam, Date expiryTime, Map<String,String> headers, Map<String,Object> queryParams) throws ObsException
method
- HTTP request methodbucketName
- Bucket nameobjectKey
- Object namespecialParam
- Special operatorexpiryTime
- Time when the temporary authentication expiresheaders
- Header informationqueryParams
- Query parameter informationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public String createSignedUrl(HttpMethodEnum method, String bucketName, String objectKey, SpecialParamEnum specialParam, long expires, Map<String,String> headers, Map<String,Object> queryParams)
method
- HTTP request methodbucketName
- Bucket nameobjectKey
- Object namespecialParam
- Special operatorexpires
- Time when the temporary authentication expires. The unit is second and the default value is 300.headers
- Header informationqueryParams
- Query parameter informationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public V4TemporarySignatureResponse createV4TemporarySignature(V4TemporarySignatureRequest request)
@Deprecated public V4PostSignatureResponse createV4PostSignature(String acl, String contentType, long expires, String bucketName, String objectKey) throws ObsException
ObsException
@Deprecated public V4PostSignatureResponse createV4PostSignature(long expires, String bucketName, String objectKey) throws ObsException
ObsException
@Deprecated public V4PostSignatureResponse createV4PostSignature(V4PostSignatureRequest request) throws ObsException
ObsException
public TemporarySignatureResponse createTemporarySignature(TemporarySignatureRequest request)
IObsClient
createTemporarySignature
in interface IObsClient
request
- Parameters in a request for temporarily authorized accesspublic TemporarySignatureResponse createGetTemporarySignature(String bucketName, String objectKey, String prefix, Date expiryDate, Map<String,String> headers, Map<String,Object> queryParams)
bucketName
- Bucket nameobjectKey
- Object nameprefix
- Object name prefixexpiryDate
- Expiration date (ISO 8601 UTC)headers
- Header informationqueryParams
- Query parameter informationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic TemporarySignatureResponse createGetTemporarySignature(String bucketName, String objectKey, String prefix, long expires, Map<String,String> headers, Map<String,Object> queryParams)
bucketName
- Bucket nameobjectKey
- Object nameprefix
- Object name prefixexpires
- Validity period (seconds)headers
- Header informationqueryParams
- Query parameter informationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic PostSignatureResponse createPostSignature(String acl, String contentType, long expires, String bucketName, String objectKey) throws ObsException
acl
- Object ACLcontentType
- MIME type of the objectexpires
- Validity period (in seconds)bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic PostSignatureResponse createPostSignature(long expires, String bucketName, String objectKey) throws ObsException
expires
- Validity period (in seconds)bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic PostSignatureResponse createPostSignature(PostSignatureRequest request) throws ObsException
IObsClient
createPostSignature
in interface IObsClient
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 failspublic ObsBucket createBucket(String bucketName) throws ObsException
IObsClient
Bucket naming rules:
createBucket
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsBucket createBucket(String bucketName, String location) throws ObsException
IObsClient
Bucket naming rules:
createBucket
in interface IObsClient
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 failspublic ObsBucket createBucket(ObsBucket bucket) throws ObsException
IObsClient
Bucket naming rules:
createBucket
in interface IObsClient
bucket
- Bucket information, including the request parametersObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsBucket createBucket(CreateBucketRequest request) throws ObsException
IObsClient
Bucket naming rules:
createBucket
in interface IObsClient
request
- Request parameters for creating a bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public ObsBucket createBucket(S3Bucket bucket) throws ObsException
ObsException
@Deprecated public List<S3Bucket> listBuckets() throws ObsException
ObsException
public List<ObsBucket> listBuckets(ListBucketsRequest request) throws ObsException
IObsClient
listBuckets
in interface IObsClient
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 failspublic ListBucketsResult listBucketsV2(ListBucketsRequest request) throws ObsException
IObsClient
listBucketsV2
in interface IObsClient
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 failspublic HeaderResponse deleteBucket(String bucketName) throws ObsException
IObsClient
deleteBucket
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObjectListing listObjects(ListObjectsRequest request) throws ObsException
IObsClient
listObjects
in interface IObsClient
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 failspublic ObjectListing listObjects(String bucketName) throws ObsException
IObsClient
listObjects
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic boolean headBucket(String bucketName) throws ObsException
IObsClient
headBucket
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public ListVersionsResult listVersions(String bucketName, String prefix, String delimiter, String keyMarker, String versionIdMarker, long maxKeys, String nextVersionIdMarker) 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 listednextVersionIdMarker
- Deprecated fieldObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ListVersionsResult listVersions(ListVersionsRequest request) throws ObsException
IObsClient
listVersions
in interface IObsClient
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 failspublic ListVersionsResult listVersions(String bucketName) throws ObsException
IObsClient
listVersions
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ListVersionsResult listVersions(String bucketName, long maxKeys) throws ObsException
IObsClient
listVersions
in interface IObsClient
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 failspublic ListVersionsResult listVersions(String bucketName, String prefix, String delimiter, String keyMarker, String versionIdMarker, long maxKeys) throws ObsException
IObsClient
listVersions
in interface IObsClient
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 failspublic BucketMetadataInfoResult getBucketMetadata(BucketMetadataInfoRequest request) throws ObsException
IObsClient
getBucketMetadata
in interface IObsClient
request
- Request parameters for obtaining bucket metadataObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic AccessControlList getBucketAcl(String bucketName) throws ObsException
IObsClient
getBucketAcl
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse setBucketAcl(String bucketName, String cannedACL, AccessControlList acl) throws ObsException
bucketName
- Bucket namecannedACL
- Pre-defined access control policyacl
- ACL ("acl" and "cannedACL" cannot be used together.)ObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketAcl(String bucketName, AccessControlList acl) throws ObsException
IObsClient
setBucketAcl
in interface IObsClient
bucketName
- Bucket nameacl
- ACLObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic String getBucketLocation(String bucketName) throws ObsException
IObsClient
getBucketLocation
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketLocationResponse getBucketLocationV2(String bucketName) throws ObsException
IObsClient
getBucketLocationV2
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketStorageInfo getBucketStorageInfo(String bucketName) throws ObsException
IObsClient
getBucketStorageInfo
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketQuota getBucketQuota(String bucketName) throws ObsException
IObsClient
getBucketQuota
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketQuota(String bucketName, BucketQuota bucketQuota) throws ObsException
IObsClient
setBucketQuota
in interface IObsClient
bucketName
- Bucket namebucketQuota
- Bucket quotaObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketStoragePolicyConfiguration getBucketStoragePolicy(String bucketName) throws ObsException
IObsClient
getBucketStoragePolicy
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketStoragePolicy(String bucketName, BucketStoragePolicyConfiguration bucketStorage) throws ObsException
IObsClient
setBucketStoragePolicy
in interface IObsClient
bucketName
- Bucket namebucketStorage
- Bucket storage policyObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketCors(String bucketName, BucketCors bucketCors) throws ObsException
IObsClient
setBucketCors
in interface IObsClient
bucketName
- Bucket namebucketCors
- CORS rulesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse setBucketCors(String bucketName, S3BucketCors s3BucketCors) throws ObsException
ObsException
public BucketCors getBucketCors(String bucketName) throws ObsException
IObsClient
getBucketCors
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse deleteBucketCors(String bucketName) throws ObsException
IObsClient
deleteBucketCors
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public OptionsInfoResult optionsBucket(String bucketName, OptionsInfoRequest optionInfo) throws ObsException
bucketName
- Bucket nameoptionInfo
- Parameters in a bucket preflight requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public OptionsInfoResult optionsObject(String bucketName, String objectKey, OptionsInfoRequest optionInfo) throws ObsException
bucketName
- Bucket nameobjectKey
- Object nameoptionInfo
- Parameters in an object preflight requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws ObsException
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketLoggingConfiguration getBucketLogging(String bucketName) throws ObsException
IObsClient
getBucketLogging
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketLoggingConfiguration(String bucketName, BucketLoggingConfiguration loggingConfiguration, boolean updateTargetACLifRequired) throws ObsException
setBucketLoggingConfiguration
in interface IObsClient
ObsException
@Deprecated public HeaderResponse setBucketLoggingConfiguration(String bucketName, BucketLoggingConfiguration loggingConfiguration) throws ObsException
ObsException
public HeaderResponse setBucketLogging(String bucketName, BucketLoggingConfiguration loggingConfiguration) throws ObsException
IObsClient
setBucketLogging
in interface IObsClient
bucketName
- Bucket nameloggingConfiguration
- Logging settingsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse setBucketVersioning(String bucketName, String status) throws ObsException
ObsException
public HeaderResponse setBucketVersioning(String bucketName, BucketVersioningConfiguration versioningConfiguration) throws ObsException
IObsClient
setBucketVersioning
in interface IObsClient
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 failspublic BucketVersioningConfiguration getBucketVersioning(String bucketName) throws ObsException
IObsClient
getBucketVersioning
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public LifecycleConfiguration getBucketLifecycleConfiguration(String bucketName) throws ObsException
ObsException
public LifecycleConfiguration getBucketLifecycle(String bucketName) throws ObsException
IObsClient
getBucketLifecycle
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse setBucketLifecycleConfiguration(String bucketName, LifecycleConfiguration lifecycleConfig) throws ObsException
ObsException
public HeaderResponse setBucketLifecycle(String bucketName, LifecycleConfiguration lifecycleConfig) throws ObsException
IObsClient
setBucketLifecycle
in interface IObsClient
bucketName
- Bucket namelifecycleConfig
- Bucket lifecycle rulesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse deleteBucketLifecycleConfiguration(String bucketName) throws ObsException
ObsException
public HeaderResponse deleteBucketLifecycle(String bucketName) throws ObsException
IObsClient
deleteBucketLifecycle
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic String getBucketPolicy(String bucketName) throws ObsException
IObsClient
getBucketPolicy
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketPolicyResponse getBucketPolicyV2(String bucketName) throws ObsException
IObsClient
getBucketPolicyV2
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketPolicy(String bucketName, String policy) throws ObsException
IObsClient
setBucketPolicy
in interface IObsClient
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 failspublic HeaderResponse deleteBucketPolicy(String bucketName) throws ObsException
IObsClient
deleteBucketPolicy
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public WebsiteConfiguration getBucketWebsiteConfiguration(String bucketName) throws ObsException
ObsException
public WebsiteConfiguration getBucketWebsite(String bucketName) throws ObsException
IObsClient
getBucketWebsite
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse setBucketWebsiteConfiguration(String bucketName, WebsiteConfiguration websiteConfig) throws ObsException
ObsException
public HeaderResponse setBucketWebsite(String bucketName, WebsiteConfiguration websiteConfig) throws ObsException
IObsClient
setBucketWebsite
in interface IObsClient
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 fails@Deprecated public HeaderResponse deleteBucketWebsiteConfiguration(String bucketName) throws ObsException
ObsException
public HeaderResponse deleteBucketWebsite(String bucketName) throws ObsException
IObsClient
deleteBucketWebsite
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketTagInfo getBucketTagging(String bucketName) throws ObsException
IObsClient
getBucketTagging
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketTagging(String bucketName, BucketTagInfo bucketTagInfo) throws ObsException
IObsClient
setBucketTagging
in interface IObsClient
bucketName
- Bucket namebucketTagInfo
- Bucket tagsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse deleteBucketTagging(String bucketName) throws ObsException
IObsClient
deleteBucketTagging
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketEncryption getBucketEncryption(String bucketName) throws ObsException
IObsClient
getBucketEncryption
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketEncryption(String bucketName, BucketEncryption bucketEncryption) throws ObsException
IObsClient
setBucketEncryption
in interface IObsClient
bucketName
- Bucket namebucketEncryption
- Bucket encryption configurationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse deleteBucketEncryption(String bucketName) throws ObsException
IObsClient
deleteBucketEncryption
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse setBucketReplicationConfiguration(String bucketName, ReplicationConfiguration replicationConfiguration) throws ObsException
ObsException
public HeaderResponse setBucketReplication(String bucketName, ReplicationConfiguration replicationConfiguration) throws ObsException
IObsClient
setBucketReplication
in interface IObsClient
bucketName
- Bucket namereplicationConfiguration
- Cross-region replication configurationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public ReplicationConfiguration getBucketReplicationConfiguration(String bucketName) throws ObsException
ObsException
public ReplicationConfiguration getBucketReplication(String bucketName) throws ObsException
IObsClient
getBucketReplication
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse deleteBucketReplicationConfiguration(String bucketName) throws ObsException
ObsException
public HeaderResponse deleteBucketReplication(String bucketName) throws ObsException
IObsClient
deleteBucketReplication
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketNotificationConfiguration getBucketNotification(String bucketName) throws ObsException
IObsClient
getBucketNotification
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketNotification(String bucketName, BucketNotificationConfiguration bucketNotificationConfiguration) throws ObsException
IObsClient
setBucketNotification
in interface IObsClient
bucketName
- Bucket namebucketNotificationConfiguration
- Bucket notification configurationObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic PutObjectResult putObject(String bucketName, String objectKey, InputStream input, ObjectMetadata metadata) throws ObsException
IObsClient
putObject
in interface IObsClient
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 failspublic PutObjectResult putObject(String bucketName, String objectKey, InputStream input) throws ObsException
IObsClient
putObject
in interface IObsClient
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 failspublic PutObjectResult putObject(PutObjectRequest request) throws ObsException
IObsClient
putObject
in interface IObsClient
request
- Parameters in an object upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic PutObjectResult putObject(String bucketName, String objectKey, File file) throws ObsException
IObsClient
putObject
in interface IObsClient
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 failspublic PutObjectResult putObject(String bucketName, String objectKey, File file, ObjectMetadata metadata) throws ObsException
IObsClient
putObject
in interface IObsClient
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 failspublic AppendObjectResult appendObject(AppendObjectRequest request) throws ObsException
IObsClient
appendObject
in interface IObsClient
request
- Parameters in an appendable upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic CompleteMultipartUploadResult uploadFile(UploadFileRequest uploadFileRequest) throws ObsException
IObsClient
uploadFile
in interface IObsClient
uploadFileRequest
- Parameters in a file upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic DownloadFileResult downloadFile(DownloadFileRequest downloadFileRequest) throws ObsException
IObsClient
downloadFile
in interface IObsClient
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 failspublic ObsObject getObject(GetObjectRequest request) throws ObsException
IObsClient
getObject
in interface IObsClient
request
- Parameters in an object download requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsObject getObject(String bucketName, String objectKey, String versionId) throws ObsException
IObsClient
getObject
in interface IObsClient
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 failspublic ObsObject getObject(String bucketName, String objectKey) throws ObsException
IObsClient
getObject
in interface IObsClient
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObjectMetadata getObjectMetadata(GetObjectMetadataRequest request) throws ObsException
IObsClient
getObjectMetadata
in interface IObsClient
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 failspublic ObjectMetadata setObjectMetadata(SetObjectMetadataRequest request) throws ObsException
IObsClient
setObjectMetadata
in interface IObsClient
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 failspublic ObjectMetadata getObjectMetadata(String bucketName, String objectKey, String versionId) throws ObsException
IObsClient
getObjectMetadata
in interface IObsClient
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 failspublic ObjectMetadata getObjectMetadata(String bucketName, String objectKey) throws ObsException
IObsClient
getObjectMetadata
in interface IObsClient
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public RestoreObjectRequest.RestoreObjectStatus restoreObject(RestoreObjectRequest request) throws ObsException
IObsClient
restoreObject
in interface IObsClient
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 failspublic RestoreObjectResult restoreObjectV2(RestoreObjectRequest request) throws ObsException
IObsClient
restoreObjectV2
in interface IObsClient
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 failspublic TaskProgressStatus restoreObjects(RestoreObjectsRequest request) throws ObsException
IObsClient
restoreObjects
in interface IObsClient
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 failspublic UploadProgressStatus putObjects(PutObjectsRequest request) throws ObsException
putObjects
in interface IObsClient
ObsException
public TaskProgressStatus dropFolder(DropFolderRequest request) throws ObsException
IFSClient
dropFolder
in interface IFSClient
request
- Request parameters for deleting a folderObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic DeleteObjectResult deleteObject(String bucketName, String objectKey, String versionId) throws ObsException
IObsClient
deleteObject
in interface IObsClient
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 failspublic DeleteObjectResult deleteObject(String bucketName, String objectKey) throws ObsException
IObsClient
deleteObject
in interface IObsClient
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic DeleteObjectsResult deleteObjects(DeleteObjectsRequest deleteObjectsRequest) throws ObsException
IObsClient
deleteObjects
in interface IObsClient
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 failspublic AccessControlList getObjectAcl(String bucketName, String objectKey, String versionId) throws ObsException
IObsClient
getObjectAcl
in interface IObsClient
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 failspublic AccessControlList getObjectAcl(String bucketName, String objectKey) throws ObsException
IObsClient
getObjectAcl
in interface IObsClient
bucketName
- Bucket nameobjectKey
- Object nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails@Deprecated public HeaderResponse setObjectAcl(String bucketName, String objectKey, String cannedACL, AccessControlList acl, String versionId) throws ObsException
bucketName
- Bucket nameobjectKey
- Object namecannedACL
- Pre-defined access control policyacl
- ACL ("acl" and "cannedACL" cannot be used together.)versionId
- Object version IDObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setObjectAcl(String bucketName, String objectKey, AccessControlList acl, String versionId) throws ObsException
IObsClient
setObjectAcl
in interface IObsClient
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 failspublic HeaderResponse setObjectAcl(String bucketName, String objectKey, AccessControlList acl) throws ObsException
IObsClient
setObjectAcl
in interface IObsClient
bucketName
- Bucket nameobjectKey
- Object nameacl
- ACLObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic CopyObjectResult copyObject(CopyObjectRequest request) throws ObsException
IObsClient
copyObject
in interface IObsClient
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 failspublic CopyObjectResult copyObject(String sourceBucketName, String sourceObjectKey, String destBucketName, String destObjectKey) throws ObsException
IObsClient
copyObject
in interface IObsClient
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 failspublic InitiateMultipartUploadResult initiateMultipartUpload(InitiateMultipartUploadRequest request) throws ObsException
IObsClient
initiateMultipartUpload
in interface IObsClient
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 failspublic HeaderResponse abortMultipartUpload(AbortMultipartUploadRequest request) throws ObsException
IObsClient
abortMultipartUpload
in interface IObsClient
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 failspublic UploadPartResult uploadPart(String bucketName, String objectKey, String uploadId, int partNumber, InputStream input) throws ObsException
IObsClient
uploadPart
in interface IObsClient
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 failspublic UploadPartResult uploadPart(String bucketName, String objectKey, String uploadId, int partNumber, File file) throws ObsException
IObsClient
uploadPart
in interface IObsClient
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 failspublic UploadPartResult uploadPart(UploadPartRequest request) throws ObsException
IObsClient
uploadPart
in interface IObsClient
request
- Parameters in a part upload requestObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic CopyPartResult copyPart(CopyPartRequest request) throws ObsException
IObsClient
copyPart
in interface IObsClient
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 failspublic CompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest request) throws ObsException
IObsClient
completeMultipartUpload
in interface IObsClient
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 failspublic ListPartsResult listParts(ListPartsRequest request) throws ObsException
IObsClient
listParts
in interface IObsClient
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 failspublic MultipartUploadListing listMultipartUploads(ListMultipartUploadsRequest request) throws ObsException
IObsClient
listMultipartUploads
in interface IObsClient
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 failspublic ObsFSBucket newBucket(NewBucketRequest request) throws ObsException
IFSClient
newBucket
in interface IFSClient
request
- Request parameters for creating a bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsFSFile newFile(NewFileRequest request) throws ObsException
IFSClient
newFile
in interface IFSClient
request
- Request parameters for creating a fileObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsFSFolder newFolder(NewFolderRequest request) throws ObsException
IFSClient
newFolder
in interface IFSClient
request
- Request parameters for creating a folderObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsFSAttribute getAttribute(GetAttributeRequest request) throws ObsException
IFSClient
getAttribute
in interface IFSClient
request
- Request parameters for obtaining filer or folder propertiesObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ReadFileResult readFile(ReadFileRequest request) throws ObsException
IFSClient
readFile
in interface IFSClient
request
- Request parameters for obtaining the file contentObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsFSFile writeFile(WriteFileRequest request) throws ObsException
IFSClient
writeFile
in interface IFSClient
request
- Request parameters for writing data to a fileObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ObsFSFile appendFile(WriteFileRequest request) throws ObsException
IFSClient
appendFile
in interface IFSClient
request
- Request parameters for writing data to a fileObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic RenameResult renameFile(RenameRequest request) throws ObsException
IFSClient
renameFile
in interface IFSClient
request
- Request parameters for renaming a fileObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic RenameResult renameFolder(RenameRequest request) throws ObsException
IFSClient
renameFolder
in interface IFSClient
request
- Request parameters for renaming a folderObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic TruncateFileResult truncateFile(TruncateFileRequest request) throws ObsException
IFSClient
truncateFile
in interface IFSClient
request
- Request parameters for truncating a fileObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse setBucketFSStatus(SetBucketFSStatusRequest request) throws ObsException
IFSClient
setBucketFSStatus
in interface IFSClient
request
- Request parameters for specifying whether to enable the file gateway feature for the bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic GetBucketFSStatusResult getBucketFSStatus(GetBucketFSStatusRequest request) throws ObsException
IFSClient
getBucketFSStatus
in interface IFSClient
request
- Request parameters for checking whether the file gateway feature is enabled for the bucketObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic DropFileResult dropFile(DropFileRequest request) throws ObsException
IFSClient
dropFile
in interface IFSClient
request
- Request parameters for deleting a fileObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ReadAheadResult readAheadObjects(ReadAheadRequest request) throws ObsException
IObsClient
readAheadObjects
in interface IObsClient
request
- Request parameters for reading ahead objectsObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic ReadAheadResult deleteReadAheadObjects(String bucketName, String prefix) throws ObsException
IObsClient
deleteReadAheadObjects
in interface IObsClient
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 failspublic ReadAheadQueryResult queryReadAheadObjectsTask(String bucketName, String taskId) throws ObsException
IObsClient
queryReadAheadObjectsTask
in interface IObsClient
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 failspublic HeaderResponse setBucketDirectColdAccess(String bucketName, BucketDirectColdAccess access) throws ObsException
IObsClient
setBucketDirectColdAccess
in interface IObsClient
bucketName
- Bucket nameaccess
- Direct reading policyObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic BucketDirectColdAccess getBucketDirectColdAccess(String bucketName) throws ObsException
IObsClient
getBucketDirectColdAccess
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic HeaderResponse deleteBucketDirectColdAccess(String bucketName) throws ObsException
IObsClient
deleteBucketDirectColdAccess
in interface IObsClient
bucketName
- Bucket nameObsException
- OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS failspublic boolean doesObjectExist(String buckeName, String objectKey) throws ObsException
doesObjectExist
in interface IObsClient
ObsException
public boolean doesObjectExist(GetObjectMetadataRequest request) throws ObsException
doesObjectExist
in interface IObsClient
ObsException
public void close() throws IOException
IObsClient
close
in interface IFSClient
close
in interface IObsClient
close
in interface Closeable
close
in interface AutoCloseable
IOException
- ObsClient close exceptionpublic String base64Md5(InputStream is, long length, long offset) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmException
IOException
public String base64Md5(InputStream is) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmException
IOException
Copyright © 2019. All rights reserved.