public class OSSClient extends Object implements OSS
Constructor and Description |
---|
OSSClient(String endpoint,
CredentialsProvider credsProvider)
Deprecated.
|
OSSClient(String endpoint,
CredentialsProvider credsProvider,
ClientConfiguration config)
Uses the specified
CredentialsProvider , client configuration and
OSS endpoint to create a new OSSClient instance. |
OSSClient(String accessKeyId,
String secretAccessKey)
Deprecated.
|
OSSClient(String endpoint,
String accessKeyId,
String secretAccessKey)
Deprecated.
|
OSSClient(String endpoint,
String accessKeyId,
String secretAccessKey,
ClientConfiguration config)
Deprecated.
|
OSSClient(String endpoint,
String accessKeyId,
String secretAccessKey,
String securityToken)
Deprecated.
|
OSSClient(String endpoint,
String accessKeyId,
String secretAccessKey,
String securityToken,
ClientConfiguration config)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
VoidResult |
abortBucketWorm(GenericRequest genericRequest)
Abort the bucket worm configuration
|
VoidResult |
abortBucketWorm(String bucketName)
Abort the bucket worm configuration
|
VoidResult |
abortMultipartUpload(AbortMultipartUploadRequest request)
Abort a multiple parts upload.
|
AddBucketCnameResult |
addBucketCname(AddBucketCnameRequest addBucketCnameRequest)
Adds a Cname for the
Bucket instance. |
VoidResult |
addBucketReplication(AddBucketReplicationRequest addBucketReplicationRequest)
Adds a
Bucket 's cross-region replication rule. |
AppendObjectResult |
appendObject(AppendObjectRequest appendObjectRequest)
Append the data to the appendable object specified in
AppendObjectRequest . |
AsyncProcessObjectResult |
asyncProcessObject(AsyncProcessObjectRequest asyncProcessObjectRequest)
Apply async process on the specified image file.
|
String |
calculatePostSignature(String postPolicy)
Calculates the signature based on the policy and access key secret.
|
VoidResult |
closeMetaQuery(String bucketName)
Close metadata management from the OSS Server
|
VoidResult |
completeBucketWorm(CompleteBucketWormRequest completeBucketWormRequest)
Complete the bucket worm configuration
|
VoidResult |
completeBucketWorm(String bucketName,
String wormId)
Complete the bucket worm configuration
|
CompleteMultipartUploadResult |
completeMultipartUpload(CompleteMultipartUploadRequest request)
Complete a multiple parts upload.
|
CopyObjectResult |
copyObject(CopyObjectRequest copyObjectRequest)
Copies an existing file in OSS from source bucket to the target bucket.
|
CopyObjectResult |
copyObject(String sourceBucketName,
String sourceKey,
String destinationBucketName,
String destinationKey)
Copies an existing file in OSS from source bucket to the target bucket.
|
CreateAccessPointResult |
createAccessPoint(CreateAccessPointRequest createAccessPointRequest)
Create access point
|
Bucket |
createBucket(CreateBucketRequest createBucketRequest)
Creates a
Bucket instance with specified CreateBucketRequest
information. |
Bucket |
createBucket(String bucketName)
Creates
Bucket instance. |
CreateBucketCnameTokenResult |
createBucketCnameToken(CreateBucketCnameTokenRequest createBucketCnameTokenRequest)
Creates a cname token for the
Bucket instance. |
CreateBucketDataRedundancyTransitionResult |
createBucketDataRedundancyTransition(CreateBucketDataRedundancyTransitionRequest createBucketDataRedundancyTransitionRequest)
Create the data redundancy transition on the
Bucket instance. |
CreateBucketDataRedundancyTransitionResult |
createBucketDataRedundancyTransition(String bucketName)
create bucket data redundancy transition task
default targetType is ZRS
|
CreateBucketDataRedundancyTransitionResult |
createBucketDataRedundancyTransition(String bucketName,
DataRedundancyType targetType)
create bucket data redundancy transition task
|
CreateBucketDataRedundancyTransitionResult |
createBucketDataRedundancyTransition(String bucketName,
String targetType)
create bucket data redundancy transition task
|
VoidResult |
createBucketVpcip(CreateBucketVpcipRequest createBucketVpcipRequest)
Bind a Vpcip to a bucket.
|
VoidResult |
createDirectory(CreateDirectoryRequest createDirectoryRequest)
Creates a directory to the Bucket
|
VoidResult |
createDirectory(String bucketName,
String dirName)
Creates a directory to the Bucket
|
CreateLiveChannelResult |
createLiveChannel(CreateLiveChannelRequest createLiveChannelRequest)
Creates a live streaming channel.
|
SelectObjectMetadata |
createSelectObjectMetadata(CreateSelectObjectMetadataRequest createSelectObjectMetadataRequest)
Create select object metadata(create metadata if not exists or overwrite flag set in
CreateSelectObjectMetadataRequest ) |
VoidResult |
createSymlink(CreateSymlinkRequest createSymlinkRequest)
Creates a symbol link to a target file under the bucket---this is not
supported for archive class bucket.
|
VoidResult |
createSymlink(String bucketName,
String symLink,
String targetObject)
Creates a symlink link to a target file under the bucket---this is not
supported for archive class bucket.
|
VoidResult |
createUdf(CreateUdfRequest createUdfRequest)
Creates UDF
|
VoidResult |
createUdfApplication(CreateUdfApplicationRequest createUdfApplicationRequest) |
CreateVpcipResult |
createVpcip(CreateVpcipRequest createVpcipRequest)
Creates a vpcip tunnel
Vpcip . |
VoidResult |
deleteAccessPoint(DeleteAccessPointRequest deleteAccessPointRequest)
Delete access point from the OSS Server
|
VoidResult |
deleteAccessPointPolicy(DeleteAccessPointPolicyRequest deleteAccessPointPolicyRequest)
Delete access point policy from the OSS Server
|
VoidResult |
deleteBucket(GenericRequest genericRequest)
Deletes the
Bucket instance. |
VoidResult |
deleteBucket(String bucketName)
Deletes the
Bucket instance. |
VoidResult |
deleteBucketCallbackPolicy(GenericRequest genericRequest)
Delete callback policy of the
Bucket instance. |
VoidResult |
deleteBucketCname(DeleteBucketCnameRequest deleteBucketCnameRequest)
Deletes one
Bucket 's specific Cname specified by the parameter
domain. |
VoidResult |
deleteBucketCname(String bucketName,
String domain)
Deletes one
Bucket 's Cname specified by the parameter domain. |
VoidResult |
deleteBucketCORSRules(GenericRequest genericRequest)
Deletes all CORS rules under the bucket.
|
VoidResult |
deleteBucketCORSRules(String bucketName)
Deletes all CORS rules under the bucket.
|
VoidResult |
deleteBucketDataRedundancyTransition(DeleteBucketDataRedundancyTransitionRequest deleteBucketDataRedundancyTransitionRequest)
delete bucket data redundancy transition task
|
VoidResult |
deleteBucketDataRedundancyTransition(String bucketName,
String taskId)
delete bucket data redundancy transition task
|
VoidResult |
deleteBucketEncryption(GenericRequest genericRequest)
Deletes the server-side encryption configuration from the bucket.
|
VoidResult |
deleteBucketEncryption(String bucketName)
Deletes the server-side encryption configuration from the bucket.
|
VoidResult |
deleteBucketImage(String bucketName)
Deletes the image processing attributes on the specific
Bucket . |
VoidResult |
deleteBucketImage(String bucketName,
GenericRequest genericRequest)
Deletes the image processing attributes on the specific
Bucket . |
VoidResult |
deleteBucketInventoryConfiguration(DeleteBucketInventoryConfigurationRequest deleteBucketInventoryConfigurationRequest)
Deletes an inventory configuration of the bucket.
|
VoidResult |
deleteBucketInventoryConfiguration(String bucketName,
String inventoryId)
Deletes an inventory configuration of the bucket.
|
VoidResult |
deleteBucketLifecycle(GenericRequest genericRequest)
Deletes all the
Bucket 's Lifecycle rules. |
VoidResult |
deleteBucketLifecycle(String bucketName)
Deletes all the
Bucket 's Lifecycle rules. |
VoidResult |
deleteBucketLogging(GenericRequest genericRequest)
Disables the logging on
Bucket . |
VoidResult |
deleteBucketLogging(String bucketName)
Disables the logging on
Bucket . |
VoidResult |
deleteBucketPolicy(GenericRequest genericRequest)
Delete policy of the
Bucket instance. |
VoidResult |
deleteBucketPolicy(String bucketName)
Delete policy of the
Bucket instance. |
VoidResult |
deleteBucketPublicAccessBlock(String bucketName)
Delete bucketPublicAccessBlock from the OSS Server
|
VoidResult |
deleteBucketQosInfo(GenericRequest genericRequest)
Deletes the bucket qos info.
|
VoidResult |
deleteBucketQosInfo(String bucketName)
Deletes the bucket qos info.
|
VoidResult |
deleteBucketReplication(DeleteBucketReplicationRequest deleteBucketReplicationRequest)
Deletes the specified
Bucket 's cross region replication rule. |
VoidResult |
deleteBucketReplication(String bucketName,
String replicationRuleID)
Deletes the specified
Bucket 's cross region replication rule. |
VoidResult |
deleteBucketTagging(GenericRequest genericRequest)
Clears all the tags of the
Bucket instance. |
VoidResult |
deleteBucketTagging(String bucketName)
Clears all the tags of the
Bucket instance。 |
VoidResult |
deleteBucketTransferAcceleration(String bucketName)
Delete transferAcceleration configuration from the OSS Server
|
VoidResult |
deleteBucketVpcip(DeleteBucketVpcipRequest deleteBucketVpcipRequest)
Deletes the
VpcPolicy instance that has binded to the bucket. |
VoidResult |
deleteBucketWebsite(GenericRequest genericRequest)
Deletes the
Bucket 's static website configuration, which means
disabling the static website on the bucket. |
VoidResult |
deleteBucketWebsite(String bucketName)
Deletes the
Bucket 's static website configuration, which means
disabling the static website on the bucket. |
DeleteDirectoryResult |
deleteDirectory(DeleteDirectoryRequest deleteDirectoryRequest)
Delete a directory
|
DeleteDirectoryResult |
deleteDirectory(String bucketName,
String dirName)
Delete a directory
|
DeleteDirectoryResult |
deleteDirectory(String bucketName,
String dirName,
boolean deleteRecursive,
String nextDeleteToken)
Delete a directory
|
VoidResult |
deleteImageStyle(String bucketName,
String styleName)
Deletes a style named by parameter styleName under
Bucket |
VoidResult |
deleteImageStyle(String bucketName,
String styleName,
GenericRequest genericRequest)
Deletes a style named by parameter styleName under
Bucket |
VoidResult |
deleteLiveChannel(LiveChannelGenericRequest liveChannelGenericRequest)
Deletes the Live Channel。
After the deletion, the media files are still kept.
|
VoidResult |
deleteLiveChannel(String bucketName,
String liveChannel)
Deletes the Live Channel.
|
VoidResult |
deleteObject(GenericRequest genericRequest)
Deletes the specified
OSSObject by the GenericRequest
instance. |
VoidResult |
deleteObject(String bucketName,
String key)
Deletes the specified
OSSObject by bucket name and object key. |
DeleteObjectsResult |
deleteObjects(DeleteObjectsRequest deleteObjectsRequest)
Batch deletes the specified files under a specific bucket.
|
VoidResult |
deleteObjectTagging(GenericRequest genericRequest)
Clears all the tags of the OSS object.
|
VoidResult |
deleteObjectTagging(String bucketName,
String key)
Clears all the tags of the OSS object.
|
VoidResult |
deletePublicAccessBlock()
Delete publicAccessBlock from the OSS Server
|
VoidResult |
deleteUdf(UdfGenericRequest genericRequest) |
VoidResult |
deleteUdfApplication(UdfGenericRequest genericRequest) |
VoidResult |
deleteUdfImage(UdfGenericRequest genericRequest) |
VoidResult |
deleteVersion(DeleteVersionRequest deleteVersionRequest)
Deletes a specific version of an object in the specified bucket.
|
VoidResult |
deleteVersion(String bucketName,
String key,
String versionId)
Deletes a specific version of the specified object in the specified
bucket.
|
DeleteVersionsResult |
deleteVersions(DeleteVersionsRequest deleteVersionsRequest)
Batch deletes the specified object versions under a specific bucket.
|
VoidResult |
deleteVpcip(DeleteVpcipRequest deleteVpcipRequest)
Deletes the
Vpcip instance. |
DescribeRegionsResult |
describeRegions(DescribeRegionsRequest describeRegionsRequest)
Describe regions from the OSS Server
|
boolean |
doesBucketExist(GenericRequest genericRequest)
Checks if the
Bucket exists。 |
boolean |
doesBucketExist(String bucketName)
Checks the
Bucket exists . |
boolean |
doesObjectExist(GenericRequest genericRequest)
|
boolean |
doesObjectExist(GenericRequest genericRequest,
boolean isOnlyInOSS)
|
boolean |
doesObjectExist(HeadObjectRequest headObjectRequest)
Deprecated.
|
boolean |
doesObjectExist(String bucketName,
String key)
|
boolean |
doesObjectExist(String bucketName,
String key,
boolean isOnlyInOSS)
|
DoMetaQueryResult |
doMetaQuery(DoMetaQueryRequest doMetaQueryRequest)
Query files that meet the specified criteria from the OSS Server
|
DownloadFileResult |
downloadFile(DownloadFileRequest downloadFileRequest)
File download
Very similar with file upload, this method will split the OSS object into
parts and download them in parallel by a thread pool, though by default
the thread pool only has one thread.
|
VoidResult |
extendBucketWorm(ExtendBucketWormRequest extendBucketWormRequest)
Extend the bucket worm configuration
|
VoidResult |
extendBucketWorm(String bucketName,
String wormId,
int retentionPeriodInDays)
Extend the bucket worm configuration
|
String |
generatePostPolicy(Date expiration,
PolicyConditions conds)
Generates the post policy form field in JSON format.
|
URL |
generatePresignedUrl(GeneratePresignedUrlRequest request)
Generates a signed url for accessing the
OSSObject with a
specific HTTP method. |
URL |
generatePresignedUrl(String bucketName,
String key,
Date expiration)
Generates a signed url for accessing the
OSSObject with HTTP GET
method. |
URL |
generatePresignedUrl(String bucketName,
String key,
Date expiration,
HttpMethod method)
Generates a signed url for accessing the
OSSObject with a
specific HTTP method. |
String |
generateRtmpUri(GenerateRtmpUriRequest generateRtmpUriRequest)
Generates a RTMP pushing streaming address in the Live Channel.
|
String |
generateRtmpUri(String bucketName,
String liveChannelName,
String PlaylistName,
long expires)
Generates a RTMP pushing streaming address in the Live Channel.
|
VoidResult |
generateVodPlaylist(GenerateVodPlaylistRequest generateVodPlaylistRequest)
Generates a VOD playlist (*.m3u8 file) for the *.ts files with specified
time range under the Live Channel.
|
VoidResult |
generateVodPlaylist(String bucketName,
String liveChannelName,
String PlaylistName,
long startTime,
long endTime)
Generates a VOD playlist (*.m3u8 file) for the *.ts files with specified
time range under the Live Channel.
|
GetAccessPointResult |
getAccessPoint(GetAccessPointRequest getAccessPointRequest)
Get access point from the OSS Server
|
GetAccessPointPolicyResult |
getAccessPointPolicy(GetAccessPointPolicyRequest getAccessPointPolicyRequest)
Get access point policy from the OSS Server
|
GetAsyncFetchTaskResult |
getAsyncFetchTask(GetAsyncFetchTaskRequest getAsyncFetchTaskRequest)
Gets the async fetch task information.
|
GetAsyncFetchTaskResult |
getAsyncFetchTask(String bucketName,
String taskId)
Gets the async fetch task information.
|
AccessMonitor |
getBucketAccessMonitor(String bucketName)
Get BucketAccessMonitor configuration from the OSS Server
|
AccessControlList |
getBucketAcl(GenericRequest genericRequest)
Gets the Access Control List(ACL) of the
Bucket instance. |
AccessControlList |
getBucketAcl(String bucketName)
Returns the Access control List (ACL) of the
Bucket instance. |
GetBucketArchiveDirectReadResult |
getBucketArchiveDirectRead(String bucketName)
get archive direct Reading
|
GetBucketCallbackPolicyResult |
getBucketCallbackPolicy(GenericRequest genericRequest)
Gets callback policy of the
Bucket instance. |
List<CnameConfiguration> |
getBucketCname(GenericRequest genericRequest)
Gets the
Bucket 's Cnames. |
List<CnameConfiguration> |
getBucketCname(String bucketName)
Gets the
Bucket 's Cnames. |
GetBucketCnameTokenResult |
getBucketCnameToken(GetBucketCnameTokenRequest getBucketCnameTokenRequest)
Gets a cname token for the
Bucket instance. |
CORSConfiguration |
getBucketCORS(GenericRequest genericRequest)
Get CORS configuration from the bucket.
|
List<SetBucketCORSRequest.CORSRule> |
getBucketCORSRules(GenericRequest genericRequest)
Lists all CORS rules from the bucket.
|
List<SetBucketCORSRequest.CORSRule> |
getBucketCORSRules(String bucketName)
Lists all CORS rules from the bucket.
|
GetBucketDataRedundancyTransitionResult |
getBucketDataRedundancyTransition(GetBucketDataRedundancyTransitionRequest getBucketDataRedundancyTransitionRequest)
get bucket data redundancy transition task info
|
GetBucketDataRedundancyTransitionResult |
getBucketDataRedundancyTransition(String bucketName,
String taskId)
get bucket data redundancy transition task info
|
ServerSideEncryptionConfiguration |
getBucketEncryption(GenericRequest genericRequest)
Returns the server-side encryption configuration of a bucket.
|
ServerSideEncryptionConfiguration |
getBucketEncryption(String bucketName)
Returns the server-side encryption configuration of a bucket.
|
GetBucketHttpsConfigResult |
getBucketHttpsConfig(String bucketName)
View the TLS version settings of the bucket.
|
GetBucketImageResult |
getBucketImage(String bucketName)
Gets the image processing attributes on the specific
Bucket . |
GetBucketImageResult |
getBucketImage(String bucketName,
GenericRequest genericRequest)
Gets the image processing attributes on the specific
Bucket . |
BucketInfo |
getBucketInfo(GenericRequest genericRequest)
Gets the
Bucket 's basic information as well as its ACL. |
BucketInfo |
getBucketInfo(String bucketName)
Gets the
Bucket 's basic information as well as its ACL. |
GetBucketInventoryConfigurationResult |
getBucketInventoryConfiguration(GetBucketInventoryConfigurationRequest getBucketInventoryConfigurationRequest)
Gets the bucket inventory configuration.
|
GetBucketInventoryConfigurationResult |
getBucketInventoryConfiguration(String bucketName,
String inventoryId)
Gets the bucket inventory configuration.
|
List<LifecycleRule> |
getBucketLifecycle(GenericRequest genericRequest)
Gets the
Bucket 's Lifecycle rules. |
List<LifecycleRule> |
getBucketLifecycle(String bucketName)
Gets the
Bucket 's lifecycle rules. |
String |
getBucketLocation(GenericRequest genericRequest)
Returns the datacenter name where the
Bucket instance specified
by GenericRequest is hosted. |
String |
getBucketLocation(String bucketName)
Returns the datacenter name where the
Bucket instance is hosted. |
BucketLoggingResult |
getBucketLogging(GenericRequest genericRequest)
Gets the
Bucket 's logging setting. |
BucketLoggingResult |
getBucketLogging(String bucketName)
Gets the
Bucket 's logging setting. |
BucketMetadata |
getBucketMetadata(GenericRequest genericRequest)
Gets all the metadata of
Bucket . |
BucketMetadata |
getBucketMetadata(String bucketName)
Gets the metadata of
Bucket . |
GetBucketPolicyResult |
getBucketPolicy(GenericRequest genericRequest)
Gets policy text of the
Bucket instance. |
GetBucketPolicyResult |
getBucketPolicy(String bucketName)
Gets policy text of the
Bucket instance. |
GetBucketPolicyStatusResult |
getBucketPolicyStatus(String bucketName)
Get bucketPolicyStatus from the OSS Server
|
BucketProcess |
getBucketProcess(GenericRequest genericRequest)
Get the bucket's image accessing configuration
|
BucketProcess |
getBucketProcess(String bucketName)
Gets the bucket's image accessing configuration.
|
GetBucketPublicAccessBlockResult |
getBucketPublicAccessBlock(String bucketName)
Get bucketPublicAccessBlock from the OSS Server
|
BucketQosInfo |
getBucketQosInfo(GenericRequest genericRequest)
Gets the bucket qos info of the
Bucket . |
BucketQosInfo |
getBucketQosInfo(String bucketName)
Gets the bucket qos info of the
Bucket . |
BucketReferer |
getBucketReferer(GenericRequest genericRequest)
Returns http referer information of the
Bucket specified by
bucket name in GenericRequest object. |
BucketReferer |
getBucketReferer(String bucketName)
Returns http referer information of the
Bucket specified by
bucket name. |
List<ReplicationRule> |
getBucketReplication(GenericRequest genericRequest)
Gets all the
Bucket 's cross region replication rules. |
List<ReplicationRule> |
getBucketReplication(String bucketName)
Gets all the
Bucket 's cross region replication rules. |
List<String> |
getBucketReplicationLocation(GenericRequest genericRequest)
Gets the
Bucket 's replication reachable data centers. |
List<String> |
getBucketReplicationLocation(String bucketName)
Gets the
Bucket 's replication reachable data centers. |
BucketReplicationProgress |
getBucketReplicationProgress(GetBucketReplicationProgressRequest getBucketReplicationProgressRequest)
Gets the
Bucket 's progress of the specified cross region
replication rule. |
BucketReplicationProgress |
getBucketReplicationProgress(String bucketName,
String replicationRuleID)
Gets the
Bucket 's progress of the specified cross region
replication rule. |
GetBucketRequestPaymentResult |
getBucketRequestPayment(GenericRequest genericRequest)
Gets the request payment of the
Bucket . |
GetBucketRequestPaymentResult |
getBucketRequestPayment(String bucketName)
Gets the request payment of the
Bucket . |
GetBucketResourceGroupResult |
getBucketResourceGroup(String bucketName)
Gets the resource group id of the
Bucket . |
BucketStat |
getBucketStat(GenericRequest genericRequest)
Gets the
Bucket 's storage information such as object counts,
storage size and executing multipart uploads. |
BucketStat |
getBucketStat(String bucketName)
Gets the
Bucket 's storage information such as object counts,
storage size and executing multipart uploads. |
UserQos |
getBucketStorageCapacity(GenericRequest genericRequest)
Gets the
Bucket 's capacity |
UserQos |
getBucketStorageCapacity(String bucketName)
Gets the
Bucket 's capacity |
TagSet |
getBucketTagging(GenericRequest genericRequest)
Gets the tags of
Bucket instance. |
TagSet |
getBucketTagging(String bucketName)
Gets all tags of the
Bucket instance. |
TransferAcceleration |
getBucketTransferAcceleration(String bucketName)
Get transferAcceleration configuration from the OSS Server
|
BucketVersioningConfiguration |
getBucketVersioning(GenericRequest genericRequest)
Returns the versioning configuration for the specified bucket.
|
BucketVersioningConfiguration |
getBucketVersioning(String bucketName)
Returns the versioning configuration for the specified bucket.
|
List<VpcPolicy> |
getBucketVpcip(GenericRequest genericRequest)
Returns all
VpcPolicy instances of the Bucket. |
BucketWebsiteResult |
getBucketWebsite(GenericRequest genericRequest)
Gets the
Bucket 's static webite settings. |
BucketWebsiteResult |
getBucketWebsite(String bucketName)
Gets the
Bucket 's static website settings. |
GetBucketWormResult |
getBucketWorm(GenericRequest genericRequest)
Get the bucket worm configuration
|
GetBucketWormResult |
getBucketWorm(String bucketName)
Get the bucket worm configuration
|
ClientConfiguration |
getClientConfiguration() |
String |
getConnectionPoolStats()
Get the statistics of the connection pool.
|
CredentialsProvider |
getCredentialsProvider() |
URI |
getEndpoint()
Gets OSS services Endpoint.
|
GetImageStyleResult |
getImageStyle(String bucketName,
String styleName)
Gets a style named by parameter styleName under
Bucket |
GetImageStyleResult |
getImageStyle(String bucketName,
String styleName,
GenericRequest genericRequest)
Gets a style named by parameter styleName under the
Bucket |
List<LiveRecord> |
getLiveChannelHistory(LiveChannelGenericRequest liveChannelGenericRequest)
Gets recent
LiveRecord entries from the specified Live Channel. |
List<LiveRecord> |
getLiveChannelHistory(String bucketName,
String liveChannel)
Gets recent
LiveRecord entries from the specified Live Channel. |
LiveChannelInfo |
getLiveChannelInfo(LiveChannelGenericRequest liveChannelGenericRequest)
Gets the Live Channel's configuration.
|
LiveChannelInfo |
getLiveChannelInfo(String bucketName,
String liveChannel)
Gets the Live Channel's configuration.
|
LiveChannelStat |
getLiveChannelStat(LiveChannelGenericRequest liveChannelGenericRequest)
Gets Live Channel's streaming information.
|
LiveChannelStat |
getLiveChannelStat(String bucketName,
String liveChannel)
Gets Live Channel's streaming information.
|
GetMetaQueryStatusResult |
getMetaQueryStatus(String bucketName)
Get MetaQueryStatus configuration from the OSS Server
|
com.aliyun.oss.internal.OSSMultipartOperation |
getMultipartOperation()
Gets the inner multipartOperation, used for subclass to do implement opreation.
|
OSSObject |
getObject(GetObjectRequest getObjectRequest)
Gets the
OSSObject from the bucket specified in
GetObjectRequest parameter. |
ObjectMetadata |
getObject(GetObjectRequest getObjectRequest,
File file)
Downloads the file from a file specified by the
GetObjectRequest
parameter. |
OSSObject |
getObject(String bucketName,
String key)
|
OSSObject |
getObject(URL signedUrl,
Map<String,String> requestHeaders)
Gets the
OSSObject from the signed Url. |
ObjectAcl |
getObjectAcl(GenericRequest genericRequest)
Gets the Access Control List (ACL) of the OSS object.
|
ObjectAcl |
getObjectAcl(String bucketName,
String key)
Gets the Access Control List (ACL) of the OSS object.
|
ObjectMetadata |
getObjectMetadata(GenericRequest genericRequest)
Gets all the metadata of
OSSObject . |
ObjectMetadata |
getObjectMetadata(String bucketName,
String key)
Gets all the metadata of
OSSObject . |
com.aliyun.oss.internal.OSSObjectOperation |
getObjectOperation()
Gets the inner objectOperation, used for subclass to do implement opreation.
|
TagSet |
getObjectTagging(GenericRequest genericRequest)
Gets all tags of the OSS object.
|
TagSet |
getObjectTagging(String bucketName,
String key)
Gets all tags of the OSS object.
|
GetPublicAccessBlockResult |
getPublicAccessBlock()
Get publicAccessBlock from the OSS Server
|
SimplifiedObjectMeta |
getSimplifiedObjectMeta(GenericRequest genericRequest)
Gets the simplified metadata information of
OSSObject . |
SimplifiedObjectMeta |
getSimplifiedObjectMeta(String bucketName,
String key)
Gets the simplified metadata information of
OSSObject . |
OSSSymlink |
getSymlink(GenericRequest genericRequest)
Gets the symlink information for the given symlink name.
|
OSSSymlink |
getSymlink(String bucketName,
String symLink)
Gets the symlink information for the given symlink name.
|
UdfApplicationInfo |
getUdfApplicationInfo(UdfGenericRequest genericRequest) |
UdfApplicationLog |
getUdfApplicationLog(GetUdfApplicationLogRequest getUdfApplicationLogRequest) |
List<UdfImageInfo> |
getUdfImageInfo(UdfGenericRequest genericRequest) |
UdfInfo |
getUdfInfo(UdfGenericRequest genericRequest) |
UserQosInfo |
getUserQosInfo()
Gets the User qos info.
|
OSSObject |
getVodPlaylist(GetVodPlaylistRequest getVodPlaylistRequest)
Generates and returns a VOD playlist (m3u8 format) for the *.ts files with specified
time range under the Live Channel, but this VOD playlist would not be stored in OSS Server.
|
OSSObject |
getVodPlaylist(String bucketName,
String liveChannelName,
long startTime,
long endTime)
Generates and returns a VOD playlist (m3u8 format) for the *.ts files with specified
time range under the Live Channel, but this VOD playlist would not be stored in OSS Server.
|
ObjectMetadata |
headObject(HeadObjectRequest headObjectRequest)
Gets all the head data of
OSSObject . |
ObjectMetadata |
headObject(String bucketName,
String key)
Gets all the head data of
OSSObject . |
InitiateBucketWormResult |
initiateBucketWorm(InitiateBucketWormRequest initiateBucketWormRequest)
Initiate a bucket worm configuration
|
InitiateBucketWormResult |
initiateBucketWorm(String bucketName,
int retentionPeriodInDays)
Initiate a bucket worm configuration
|
InitiateMultipartUploadResult |
initiateMultipartUpload(InitiateMultipartUploadRequest request)
Initiates a multiple part upload
|
boolean |
isBucketExist(String bucketName)
Deprecated.
|
ListAccessPointsResult |
listAccessPoints(ListAccessPointsRequest listAccessPointsRequest)
List all access points for user
Bucket in the parameter of
ListObjectsRequest |
ListAccessPointsResult |
listBucketAccessPoints(ListBucketAccessPointsRequest listBucketAccessPointsRequest)
List all access points for bucket
Bucket in the parameter of
ListObjectsRequest |
List<GetBucketDataRedundancyTransitionResult> |
listBucketDataRedundancyTransition(GenericRequest request)
List all data redundancy type conversion tasks under the bucket
|
List<GetBucketDataRedundancyTransitionResult> |
listBucketDataRedundancyTransition(String bucketName)
List all data redundancy type conversion tasks under the bucket
|
ListBucketInventoryConfigurationsResult |
listBucketInventoryConfigurations(ListBucketInventoryConfigurationsRequest listBucketInventoryConfigurationsRequest)
Returns the list of inventory configurations for the bucket.
|
ListBucketInventoryConfigurationsResult |
listBucketInventoryConfigurations(String bucketName)
Returns the list of inventory configurations for the bucket.
|
ListBucketInventoryConfigurationsResult |
listBucketInventoryConfigurations(String bucketName,
String continuationToken)
Returns the list of inventory configurations for the bucket.
|
List<Bucket> |
listBuckets()
Returns all
Bucket instances of the current account. |
BucketList |
listBuckets(ListBucketsRequest listBucketsRequest)
Returns all
Bucket instances of the current account that meet the
conditions specified. |
BucketList |
listBuckets(String prefix,
String marker,
Integer maxKeys)
Returns all
Bucket instances of the current account that meet the
conditions specified. |
List<Style> |
listImageStyle(String bucketName)
Lists all styles under the
Bucket |
List<Style> |
listImageStyle(String bucketName,
GenericRequest genericRequest)
Lists all styles under the
Bucket |
LiveChannelListing |
listLiveChannels(ListLiveChannelsRequest listLiveChannelRequest)
Lists all Live Channels under a bucket that meets the requirement
specified by the parameter listLiveChannelRequest.
|
List<LiveChannel> |
listLiveChannels(String bucketName)
Lists all Live Channels under a bucket.
|
MultipartUploadListing |
listMultipartUploads(ListMultipartUploadsRequest request)
Lists executing multiple parts uploads.
|
ObjectListing |
listObjects(ListObjectsRequest listObjectsRequest)
Lists all objects under the specified
Bucket in the parameter of
ListObjectsRequest |
ObjectListing |
listObjects(String bucketName)
Lists all objects under the specified
Bucket |
ObjectListing |
listObjects(String bucketName,
String prefix)
Lists all objects under the specified
Bucket with the specified
prefix. |
ListObjectsV2Result |
listObjectsV2(ListObjectsV2Request listObjectsV2Request)
Lists all objects under the specified
Bucket in the parameter of
ListObjectsRequest |
ListObjectsV2Result |
listObjectsV2(String bucketName)
Lists all objects under the specified
Bucket in the parameter of
ListObjectsRequest |
ListObjectsV2Result |
listObjectsV2(String bucketName,
String prefix)
Lists all objects under the specified
Bucket in the parameter of
ListObjectsRequest |
ListObjectsV2Result |
listObjectsV2(String bucketName,
String prefix,
String continuationToken,
String startAfter,
String delimiter,
Integer maxKeys,
String encodingType,
boolean fetchOwner)
Lists all objects under the specified
Bucket in the parameter of
ListObjectsRequest |
PartListing |
listParts(ListPartsRequest request)
Lists all parts in a multiple parts upload.
|
List<UdfApplicationInfo> |
listUdfApplications() |
List<UdfInfo> |
listUdfs() |
ListUserDataRedundancyTransitionResult |
listUserDataRedundancyTransition(ListUserDataRedundancyTransitionRequest listUserDataRedundancyTransitionRequest)
List the data redundancy type conversion tasks for all buckets under the user
|
VersionListing |
listVersions(ListVersionsRequest listVersionsRequest)
Returns a list of summary information about the versions in the specified
bucket.
|
VersionListing |
listVersions(String bucketName,
String prefix)
Returns a list of summary information about the versions in the specified
bucket.
|
VersionListing |
listVersions(String bucketName,
String prefix,
String keyMarker,
String versionIdMarker,
String delimiter,
Integer maxResults)
Returns a list of summary information about the versions in the specified
bucket.
|
List<Vpcip> |
listVpcip()
Returns all
Vpcip instances of the current account. |
VoidResult |
openMetaQuery(String bucketName)
Open MetaQuery configuration to the OSS Server
|
ResponseMessage |
optionsObject(OptionsRequest request)
Deprecated method.
|
GenericResult |
processObject(ProcessObjectRequest processObjectRequest)
Apply process on the specified image file.
|
VoidResult |
putAccessPointPolicy(PutAccessPointPolicyRequest putAccessPointPolicyRequest)
Put access point policy
|
VoidResult |
putBucketAccessMonitor(String bucketName,
String status)
Set BucketAccessMonitor configuration to the OSS Server
|
VoidResult |
putBucketArchiveDirectRead(PutBucketArchiveDirectReadRequest request)
create archive direct Reading
|
VoidResult |
putBucketHttpsConfig(PutBucketHttpsConfigRequest putBucketHttpsConfigRequest)
Enable or disable TLS version settings for buckets.
|
VoidResult |
putBucketImage(PutBucketImageRequest request)
Sets image processing attributes on the specific
Bucket |
VoidResult |
putBucketPublicAccessBlock(PutBucketPublicAccessBlockRequest putBucketPublicAccessBlockRequest)
Set bucketPublicAccessBlock to the OSS Server
|
VoidResult |
putImageStyle(PutImageStyleRequest putImageStyleRequest)
Adds a new style under
Bucket . |
PutObjectResult |
putObject(PutObjectRequest putObjectRequest)
Uploads the file to
Bucket . |
PutObjectResult |
putObject(String bucketName,
String key,
File file)
Uploads the file to the
Bucket from the file. |
PutObjectResult |
putObject(String bucketName,
String key,
File file,
ObjectMetadata metadata)
Uploads the file to the
Bucket from the file with the
ObjectMetadata . |
PutObjectResult |
putObject(String bucketName,
String key,
InputStream input)
Uploads the file to the
Bucket from the InputStream
instance. |
PutObjectResult |
putObject(String bucketName,
String key,
InputStream input,
ObjectMetadata metadata)
Uploads the file to the
Bucket from the @{link InputStream} with
the ObjectMetadata information。 |
PutObjectResult |
putObject(URL signedUrl,
InputStream requestContent,
long contentLength,
Map<String,String> requestHeaders)
Uploads the file from a InputStream instance to the signed URL with
specified headers.
|
PutObjectResult |
putObject(URL signedUrl,
InputStream requestContent,
long contentLength,
Map<String,String> requestHeaders,
boolean useChunkEncoding)
Uploads the file from a InputStream instance to the signed URL with
specified headers.
|
PutObjectResult |
putObject(URL signedUrl,
String filePath,
Map<String,String> requestHeaders)
Uploads the file from a specified file path to the signed URL with
specified headers
|
PutObjectResult |
putObject(URL signedUrl,
String filePath,
Map<String,String> requestHeaders,
boolean useChunkEncoding)
Uploads the file from a specified file path to the signed URL with
specified headers with the flag of using chunked tranfer encoding.
|
VoidResult |
putPublicAccessBlock(PutPublicAccessBlockRequest putPublicAccessBlockRequest)
Set publicAccessBlock to the OSS Server
|
VoidResult |
renameObject(RenameObjectRequest renameObjectRequest)
Rename an object
|
VoidResult |
renameObject(String bucketName,
String sourceObjectName,
String destinationObject)
Rename an object, it can be a file or directory.
|
VoidResult |
resizeUdfApplication(ResizeUdfApplicationRequest resizeUdfApplicationRequest) |
RestoreObjectResult |
restoreObject(GenericRequest genericRequest)
Restores the object of archive storage.
|
RestoreObjectResult |
restoreObject(RestoreObjectRequest restoreObjectRequest)
Restores the object of archive storage.
|
RestoreObjectResult |
restoreObject(String bucketName,
String key)
Restores the object of archive storage.
|
RestoreObjectResult |
restoreObject(String bucketName,
String key,
RestoreConfiguration restoreConfiguration)
Restores the object of archive storage.
|
OSSObject |
selectObject(SelectObjectRequest selectObjectRequest)
Select the
OSSObject from the bucket specified in
SelectObjectRequest parameter |
SetAsyncFetchTaskResult |
setAsyncFetchTask(SetAsyncFetchTaskRequest setAsyncFetchTaskRequest)
Sets an async fetch task.
|
SetAsyncFetchTaskResult |
setAsyncFetchTask(String bucketName,
AsyncFetchTaskConfiguration asyncFetchTaskConfiguration)
Sets an async fetch task.
|
VoidResult |
setBucketAcl(SetBucketAclRequest setBucketAclRequest)
Sends the request to apply ACL on a
Bucket instance. |
VoidResult |
setBucketAcl(String bucketName,
CannedAccessControlList cannedACL)
Applies the Access Control List(ACL) on the
Bucket . |
VoidResult |
setBucketCallbackPolicy(SetBucketCallbackPolicyRequest setBucketCallbackPolicyRequest)
Sets the callback policy on the
Bucket instance. |
VoidResult |
setBucketCORS(SetBucketCORSRequest request)
Adds CORS rules to the bucket.
|
VoidResult |
setBucketEncryption(SetBucketEncryptionRequest setBucketEncryptionRequest)
Creates a new server-side encryption configuration (or replaces an existing one, if present).
|
VoidResult |
setBucketInventoryConfiguration(SetBucketInventoryConfigurationRequest setBucketInventoryConfigurationRequest)
Sets the bucket inventory configuration.
|
VoidResult |
setBucketInventoryConfiguration(String bucketName,
InventoryConfiguration inventoryConfiguration)
Sets the bucket inventory configuration.
|
VoidResult |
setBucketLifecycle(SetBucketLifecycleRequest setBucketLifecycleRequest)
Sets the
Bucket 's lifecycle rule. |
VoidResult |
setBucketLogging(SetBucketLoggingRequest request)
Enables or disables the
Bucket 's logging. |
VoidResult |
setBucketPolicy(SetBucketPolicyRequest setBucketPolicyRequest)
Sets the policy on the
Bucket instance. |
VoidResult |
setBucketPolicy(String bucketName,
String policyText)
Sets the policy on the
Bucket instance. |
VoidResult |
setBucketProcess(SetBucketProcessRequest setBucketProcessRequest)
Creates the image accessing configuration according to the parameter
setBucketProcessRequest.
|
VoidResult |
setBucketQosInfo(SetBucketQosInfoRequest setBucketQosInfoRequest)
sets the qos info for the
Bucket . |
VoidResult |
setBucketQosInfo(String bucketName,
BucketQosInfo bucketQosInfo)
sets the qos info for the
Bucket . |
VoidResult |
setBucketReferer(SetBucketRefererRequest setBucketRefererRequest)
Sets the http referer on the
Bucket instance in the parameter
setBucketRefererRequest. |
VoidResult |
setBucketReferer(String bucketName,
BucketReferer referer)
Sets the http referer on the
Bucket instance specified by the
bucket name. |
VoidResult |
setBucketRequestPayment(SetBucketRequestPaymentRequest setBucketRequestPaymentRequest)
Sets the request payment of the
Bucket . |
VoidResult |
setBucketRequestPayment(String bucketName,
Payer payer)
Sets the request payment of the
Bucket . |
VoidResult |
setBucketResourceGroup(SetBucketResourceGroupRequest setBucketResourceGroupRequest)
Sets the resource group id of the
Bucket . |
VoidResult |
setBucketStorageCapacity(SetBucketStorageCapacityRequest setBucketStorageCapacityRequest)
Sets the capacity of the
Bucket . |
VoidResult |
setBucketStorageCapacity(String bucketName,
UserQos userQos)
Sets the capacity of the
Bucket . |
VoidResult |
setBucketTagging(SetBucketTaggingRequest setBucketTaggingRequest)
Sets the tags on the
Bucket instance in
SetBucketTaggingRequest object. |
VoidResult |
setBucketTagging(String bucketName,
Map<String,String> tags)
Sets the tags on the
Bucket instance specified by the bucket name |
VoidResult |
setBucketTagging(String bucketName,
TagSet tagSet)
Sets the tags on the
Bucket instance. |
VoidResult |
setBucketTransferAcceleration(String bucketName,
boolean enable)
Set transferAcceleration configuration to the OSS Server
|
VoidResult |
setBucketVersioning(SetBucketVersioningRequest setBucketVersioningRequest)
Sets the versioning configuration for the specified bucket.
|
VoidResult |
setBucketWebsite(SetBucketWebsiteRequest setBucketWebSiteRequest)
Sets the static website settings for the
Bucket . |
void |
setCloudBoxId(String cloudBoxId)
Sets OSS cloud box id.
|
void |
setDownloadOperation(com.aliyun.oss.internal.OSSDownloadOperation downloadOperation)
Sets the inner downloadOperation.
|
void |
setEndpoint(String endpoint)
Sets OSS services endpoint.
|
VoidResult |
setLiveChannelStatus(SetLiveChannelRequest setLiveChannelRequest)
Sets the Live Channel status.
|
VoidResult |
setLiveChannelStatus(String bucketName,
String liveChannel,
LiveChannelStatus status)
Sets the Live Channel status.
|
VoidResult |
setObjectAcl(SetObjectAclRequest setObjectAclRequest)
Sets the Access Control List (ACL) on a
OSSObject instance. |
VoidResult |
setObjectAcl(String bucketName,
String key,
CannedAccessControlList cannedACL)
Sets the Access Control List (ACL) on a
OSSObject instance. |
VoidResult |
setObjectTagging(SetObjectTaggingRequest setObjectTaggingRequest)
Sets the tags on the OSS object.
|
VoidResult |
setObjectTagging(String bucketName,
String key,
Map<String,String> tags)
Sets the tags on the OSS object.
|
VoidResult |
setObjectTagging(String bucketName,
String key,
TagSet tagSet)
Sets the tags on the OSS object.
|
void |
setProduct(String product)
Sets the product name.
|
void |
setRegion(String region)
Sets OSS services Region.
|
void |
setUploadOperation(com.aliyun.oss.internal.OSSUploadOperation uploadOperation)
Sets the inner uploadOperation.
|
void |
shutdown()
Shuts down the OSS instance (release all resources) The OSS instance is
not usable after its shutdown() is called.
|
void |
switchCredentials(Credentials creds)
Switches to another users with specified credentials
|
void |
switchSignatureVersion(SignVersion signatureVersion)
Switches to another signature version
|
VoidResult |
upgradeUdfApplication(UpgradeUdfApplicationRequest upgradeUdfApplicationRequest) |
UploadFileResult |
uploadFile(UploadFileRequest uploadFileRequest)
File upload
This method will automatically split files into parts and upload them in
parallel by a thread pool, though by default the thread pool only has one
thread.
|
UploadPartResult |
uploadPart(UploadPartRequest request)
Uploads a part to a specified multiple upload.
|
UploadPartCopyResult |
uploadPartCopy(UploadPartCopyRequest request)
Uploads Part copy from an existing source object to a target object with
specified upload Id and part number
|
VoidResult |
uploadUdfImage(UploadUdfImageRequest uploadUdfImageRequest) |
VoidResult |
writeGetObjectResponse(WriteGetObjectResponseRequest writeGetObjectResponseRequest)
write get object response.
|
@Deprecated public OSSClient(String accessKeyId, String secretAccessKey)
OSSClient
instance.accessKeyId
- Access Key ID.secretAccessKey
- Secret Access Key.@Deprecated public OSSClient(String endpoint, String accessKeyId, String secretAccessKey)
OSSClient
instance.endpoint
- OSS endpoint.accessKeyId
- Access Key ID.secretAccessKey
- Secret Access Key.@Deprecated public OSSClient(String endpoint, String accessKeyId, String secretAccessKey, String securityToken)
OSSClient
instance.endpoint
- OSS Endpoint.accessKeyId
- Access Id from STS.secretAccessKey
- Access Key from STSsecurityToken
- Security Token from STS.@Deprecated public OSSClient(String endpoint, String accessKeyId, String secretAccessKey, ClientConfiguration config)
OSSClient
instance.endpoint
- OSS Endpoint。accessKeyId
- Access Key ID。secretAccessKey
- Secret Access Key。config
- A ClientConfiguration
instance. The method would use
default configuration if it's null.@Deprecated public OSSClient(String endpoint, String accessKeyId, String secretAccessKey, String securityToken, ClientConfiguration config)
OSSClient
instance.endpoint
- OSS Endpoint。accessKeyId
- Access Key Id provided by STS.secretAccessKey
- Secret Access Key provided by STS.securityToken
- Security token provided by STS.config
- A ClientConfiguration
instance. The method would use
default configuration if it's null.@Deprecated public OSSClient(String endpoint, CredentialsProvider credsProvider)
CredentialsProvider
and OSS Endpoint to create
a new OSSClient
instance.endpoint
- OSS services Endpoint。credsProvider
- Credentials provider which has access key Id and access Key
secret.public OSSClient(String endpoint, CredentialsProvider credsProvider, ClientConfiguration config)
CredentialsProvider
, client configuration and
OSS endpoint to create a new OSSClient
instance.endpoint
- OSS services Endpoint.credsProvider
- Credentials provider.config
- client configuration.public com.aliyun.oss.internal.OSSMultipartOperation getMultipartOperation()
OSSMultipartOperation
instance.public com.aliyun.oss.internal.OSSObjectOperation getObjectOperation()
OSSObjectOperation
instance.public void setDownloadOperation(com.aliyun.oss.internal.OSSDownloadOperation downloadOperation)
downloadOperation
- the OSSDownloadOperation
instance.public void setUploadOperation(com.aliyun.oss.internal.OSSUploadOperation uploadOperation)
uploadOperation
- the OSSUploadOperation
instance.public URI getEndpoint()
public void setEndpoint(String endpoint)
endpoint
- OSS services endpoint.public void setProduct(String product)
product
- the product name, ex oss.public void setRegion(String region)
region
- OSS services Region.public void setCloudBoxId(String cloudBoxId)
cloudBoxId
- OSS cloud box id.public void switchCredentials(Credentials creds)
OSS
switchCredentials
in interface OSS
creds
- the credential to switch to。public void switchSignatureVersion(SignVersion signatureVersion)
OSS
switchSignatureVersion
in interface OSS
signatureVersion
- the signature version to switch to。public CredentialsProvider getCredentialsProvider()
public ClientConfiguration getClientConfiguration()
public Bucket createBucket(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance. The bucket name specified must be
globally unique and follow the naming rules from
https://www.alibabacloud.com/help/doc-detail/31827.htm?spm=a3c0i.o32012en
.a3.1.64ece5e0jPpa2t.createBucket
in interface OSS
bucketName
- bucket nameBucket
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public Bucket createBucket(CreateBucketRequest createBucketRequest) throws OSSException, ClientException
OSS
Bucket
instance with specified CreateBucketRequest
information.createBucket
in interface OSS
createBucketRequest
- instance of CreateBucketRequest
, which at least has
bucket name information.Bucket
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucket(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance. A non-empty bucket could not be
deleted.deleteBucket
in interface OSS
bucketName
- bucket name to delete.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucket(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.deleteBucket
in interface OSS
genericRequest
- the generic request instance that has the bucket name
information.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<Bucket> listBuckets() throws OSSException, ClientException
OSS
Bucket
instances of the current account.listBuckets
in interface OSS
Bucket
instances. If there's no buckets, the
list will be empty (instead of null).OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketList listBuckets(ListBucketsRequest listBucketsRequest) throws OSSException, ClientException
OSS
Bucket
instances of the current account that meet the
conditions specified.listBuckets
in interface OSS
listBucketsRequest
- the ListBucketsRequest instance that defines the criteria
which could have requirements on prefix, marker, maxKeys.Bucket
instances.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketList listBuckets(String prefix, String marker, Integer maxKeys) throws OSSException, ClientException
OSS
Bucket
instances of the current account that meet the
conditions specified.listBuckets
in interface OSS
prefix
- The prefix of the bucket name returned. If null, the bucket
name could have any prefix.marker
- The start point in the lexicographic order for the buckets to
return. If null, return the buckets from the beginning in the
lexicographic order. For example, if the account has buckets
bk1, bk2, bk3. If the marker is set as bk2, then only bk2 and
bk3 meet the criteria. But if the marker is null, then all
three buckets meet the criteria.maxKeys
- Max bucket count to return. The valid value is from 1 to 1000,
default is 100 if it's null.Bucket
instances.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketAcl(String bucketName, CannedAccessControlList cannedACL) throws OSSException, ClientException
OSS
Bucket
.setBucketAcl
in interface OSS
bucketName
- Bucket name.cannedACL
- CannedAccessControlList
instance. If the instance is
null, no ACL change on the bucket (but the request is still
sent).VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketAcl(SetBucketAclRequest setBucketAclRequest) throws OSSException, ClientException
OSS
Bucket
instance.setBucketAcl
in interface OSS
setBucketAclRequest
- SetBucketAclRequest instance which specifies the ACL and the
bucket information.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public AccessControlList getBucketAcl(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance.getBucketAcl
in interface OSS
bucketName
- Bucket Name.AccessControlList
.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public AccessControlList getBucketAcl(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.getBucketAcl
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name
information.AccessControlList
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketMetadata getBucketMetadata(String bucketName) throws OSSException, ClientException
OSS
Bucket
.getBucketMetadata
in interface OSS
bucketName
- Bucket name.BucketMetadata
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketMetadata getBucketMetadata(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
.getBucketMetadata
in interface OSS
genericRequest
- Generic request which specifies the bucket name.BucketMetadata
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketReferer(String bucketName, BucketReferer referer) throws OSSException, ClientException
OSS
Bucket
instance specified by the
bucket name.setBucketReferer
in interface OSS
bucketName
- Bucket name.referer
- The BucketReferer
instance. If null, it would create a
BucketReferer
instance from default constructor.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketReferer(SetBucketRefererRequest setBucketRefererRequest) throws OSSException, ClientException
OSS
Bucket
instance in the parameter
setBucketRefererRequest.setBucketReferer
in interface OSS
setBucketRefererRequest
- SetBucketRefererRequest
instance that specify the
bucket name and the BucketReferer
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketReferer getBucketReferer(String bucketName) throws OSSException, ClientException
OSS
Bucket
specified by
bucket name.getBucketReferer
in interface OSS
bucketName
- Bucket nameBucketReferer
instance. The BucketReferer object with
empty referer information is returned if there's no http referer
information.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketReferer getBucketReferer(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
specified by
bucket name in GenericRequest object.getBucketReferer
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.BucketReferer
。OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public String getBucketLocation(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance is hosted.
As of 08/03/2017, the valid datacenter names are oss-cn-hangzhou,
oss-cn-qingdao, oss-cn-beijing, oss-cn-hongkong, oss-cn-shenzhen,
oss-cn-shanghai, oss-us-west-1, oss-us-east-1, and oss-ap-southeast-1.getBucketLocation
in interface OSS
bucketName
- Bucket name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public String getBucketLocation(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance specified
by GenericRequest is hosted.getBucketLocation
in interface OSS
genericRequest
- GenericRequest
instance with bucket name information.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public boolean doesBucketExist(String bucketName) throws OSSException, ClientException
OSS
Bucket
exists .doesBucketExist
in interface OSS
bucketName
- Bucket name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public boolean doesBucketExist(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
exists。doesBucketExist
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.@Deprecated public boolean isBucketExist(String bucketName) throws OSSException, ClientException
OSSException
ClientException
public ObjectListing listObjects(String bucketName) throws OSSException, ClientException
OSS
Bucket
listObjects
in interface OSS
bucketName
- Bucket nameObjectListing
instance that has all objects.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectListing listObjects(String bucketName, String prefix) throws OSSException, ClientException
OSS
Bucket
with the specified
prefix.listObjects
in interface OSS
bucketName
- Bucket name.prefix
- The prefix returned object must have.ObjectListing
instance that has all objectsOSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectListing listObjects(ListObjectsRequest listObjectsRequest) throws OSSException, ClientException
OSS
Bucket
in the parameter of
ListObjectsRequest
listObjects
in interface OSS
listObjectsRequest
- The ListObjectsRequest
instance that defines the
bucket name as well as the criteria such as prefix, marker,
maxKeys, delimiter, etc.ObjectListing
instance that has the objects meet the
criteriaOSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ListObjectsV2Result listObjectsV2(ListObjectsV2Request listObjectsV2Request) throws OSSException, ClientException
OSS
Bucket
in the parameter of
ListObjectsRequest
listObjectsV2
in interface OSS
listObjectsV2Request
- The ListObjectsRequest
instance that defines the
bucket name as well as the criteria such as prefix, marker,
maxKeys, delimiter, etc.ListObjectsV2Result
instance that has the objects meet the
criteriaOSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ListObjectsV2Result listObjectsV2(String bucketName) throws OSSException, ClientException
OSS
Bucket
in the parameter of
ListObjectsRequest
listObjectsV2
in interface OSS
bucketName
- The bucket name.ListObjectsV2Result
instance that has the listing result.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ListObjectsV2Result listObjectsV2(String bucketName, String prefix) throws OSSException, ClientException
OSS
Bucket
in the parameter of
ListObjectsRequest
listObjectsV2
in interface OSS
bucketName
- bucket name.prefix
- The prefix restricting the objects listing.ListObjectsV2Result
instance that has the listing result.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ListObjectsV2Result listObjectsV2(String bucketName, String prefix, String continuationToken, String startAfter, String delimiter, Integer maxKeys, String encodingType, boolean fetchOwner) throws OSSException, ClientException
OSS
Bucket
in the parameter of
ListObjectsRequest
listObjectsV2
in interface OSS
bucketName
- The bucket name.prefix
- The prefix restricting the objects listing.continuationToken
- The continuation token allows list to be continued from a specific point.
It values the last result ListObjectsV2Result.getNextContinuationToken()
.startAfter
- Where you want oss to start the object listing from.delimiter
- The delimiter for condensing common prefixes in the returned listing results.maxKeys
- The maximum number of results to return.encodingType
- the encoding method to be applied on the response.fetchOwner
- Whether to get the owner filed in the response or not.ListObjectsV2Result
instance that has the listing result.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VersionListing listVersions(String bucketName, String prefix) throws OSSException, ClientException
OSS
Returns a list of summary information about the versions in the specified bucket.
The returned version summaries are ordered first by key and then by version. Keys are sorted lexicographically (alphabetically) while versions are sorted from most recent to least recent. Both versions with data and delete markers are included in the results.
Because buckets can contain a virtually unlimited number of versions, the
complete results of a list query can be extremely large. To manage large
result sets, OSS uses pagination to split them into multiple
responses. Always check the
VersionListing.isTruncated()
method to determine if the
returned listing is complete or if additional calls are needed to get
more results.
For more information about enabling versioning for a bucket, see
OSS.setBucketVersioning(SetBucketVersioningRequest)
.
listVersions
in interface OSS
bucketName
- The name of the OSS bucket whose versions are to be
listed.prefix
- An optional parameter restricting the response to keys
beginning with the specified prefix. Use prefixes to
separate a bucket into different sets of keys,
similar to how a file system organizes files
into directories.OSSException
- If any errors occurred in OSS while processing the
request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.listVersions(ListVersionsRequest)
,
listVersions(String, String, String, String, String, Integer)
public VersionListing listVersions(String bucketName, String prefix, String keyMarker, String versionIdMarker, String delimiter, Integer maxResults) throws OSSException, ClientException
OSS
Returns a list of summary information about the versions in the specified bucket.
The returned version summaries are ordered first by key and then by version. Keys are sorted lexicographically (alphabetically) and versions are sorted from most recent to least recent. Versions with data and delete markers are included in the results.
Because buckets can contain a virtually unlimited number of versions, the
complete results of a list query can be extremely large. To manage large
result sets, OSS uses pagination to split them into multiple
responses. Always check the
VersionListing.isTruncated()
method to determine if the
returned listing is complete or if additional calls are needed
to get more results.
The keyMarker
and versionIdMarker
parameters allow
callers to specify where to start the version listing.
The delimiter
parameter allows groups of keys that share a
delimiter-terminated prefix to be included
in the returned listing. This allows applications to organize and browse
their keys hierarchically, much like how a file system organizes
files into directories. These common prefixes can be retrieved
by calling the VersionListing.getCommonPrefixes()
method.
For example, consider a bucket that contains the following keys:
listVersions
with
a prefix
value of "foo/" and a delimiter
value of "/"
on this bucket, a VersionListing
is returned that contains:
To see deeper into the virtual hierarchy, make
another call to listVersions
setting the prefix parameter to any
interesting common prefix to list the individual versions under that
prefix.
For more information about enabling versioning for a bucket, see
OSS.setBucketVersioning(SetBucketVersioningRequest)
.
listVersions
in interface OSS
bucketName
- The name of the OSS bucket whose versions are to be listed.prefix
- An optional parameter restricting the response to keys that
begin with the specified prefix. Use prefixes to
separate a bucket into different sets of keys,
similar to how a file system organizes files
into directories.keyMarker
- Optional parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results.
Results are always ordered first lexicographically (i.e.
alphabetically) and then from most recent version to least
recent version. If a keyMarker is used without a
versionIdMarker, results begin immediately after that key's
last version. When a keyMarker is used with a versionIdMarker,
results begin immediately after the version with the specified
key and version ID.
This enables pagination; to get the next page of results use
the next key marker and next version ID marker (from
VersionListing.getNextKeyMarker()
and
VersionListing.getNextVersionIdMarker()
) as the
markers for the next request to list versions.
versionIdMarker
- Optional parameter indicating where in the sorted list of all
versions in the specified bucket to begin returning results.
Results are always ordered first lexicographically (i.e.
alphabetically) and then from most recent version to least
recent version. A keyMarker must be specified when specifying
a versionIdMarker. Results begin immediately after the version
with the specified key and version ID.
This enables pagination; to get the next page of results use
the next key marker and next version ID marker (from
VersionListing.getNextKeyMarker()
and
VersionListing.getNextVersionIdMarker()
) as the
markers for the next request to list versions.
delimiter
- Optional parameter that causes keys that contain the same
string between the prefix and the first occurrence of the
delimiter to be rolled up into a single result element in the
VersionListing.getCommonPrefixes()
list. These
rolled-up keys are not returned elsewhere in the response. The
most commonly used delimiter is "/", which simulates a
hierarchical organization similar to a file system directory
structure.maxResults
- Optional parameter indicating the maximum number of results to
include in the response. OSS might return fewer than
this, but will not return more. Even if maxResults is not
specified, OSS will limit the number of results in the
response.OSSException
- If any errors occurred in OSS while processing the
request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.listVersions(String, String)
,
listVersions(ListVersionsRequest)
public VersionListing listVersions(ListVersionsRequest listVersionsRequest) throws OSSException, ClientException
OSS
Returns a list of summary information about the versions in the specified bucket.
The returned version summaries are ordered first by key and then by version. Keys are sorted lexicographically (alphabetically) and versions are sorted from most recent to least recent. Versions with data and delete markers are included in the results.
Because buckets can contain a virtually unlimited number of versions, the
complete results of a list query can be extremely large. To manage large
result sets, OSS uses pagination to split them into multiple
responses. Always check the
VersionListing.isTruncated()
method to determine if the
returned listing is complete or if additional calls are needed
to get more results.
The keyMarker
and versionIdMarker
parameters allow
callers to specify where to start the version listing.
The delimiter
parameter allows groups of keys that share a
delimiter-terminated prefix to be included
in the returned listing. This allows applications to organize and browse
their keys hierarchically, much like how a file system organizes
files into directories. These common prefixes can be retrieved
by calling the VersionListing.getCommonPrefixes()
method.
For example, consider a bucket that contains the following keys:
listVersions
with
a prefix
value of "foo/" and a delimiter
value of "/"
on this bucket, a VersionListing
is returned that contains:
To see deeper into the virtual hierarchy, make
another call to listVersions
setting the prefix parameter to any
interesting common prefix to list the individual versions under that
prefix.
For more information about enabling versioning for a bucket, see
OSS.setBucketVersioning(SetBucketVersioningRequest)
.
listVersions
in interface OSS
listVersionsRequest
- The request object containing all options for listing the
versions in a specified bucket.OSSException
- If any errors occurred in OSS while processing the
request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.listVersions(String, String)
,
listVersions(String, String, String, String, String, Integer)
public PutObjectResult putObject(String bucketName, String key, InputStream input) throws OSSException, ClientException
OSS
Bucket
from the InputStream
instance. It overwrites the existing one and the bucket must exist.putObject
in interface OSS
bucketName
- Bucket name.key
- object key.input
- InputStream
instance to write from. The must be
readable.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(String bucketName, String key, InputStream input, ObjectMetadata metadata) throws OSSException, ClientException
OSS
Bucket
from the @{link InputStream} with
the ObjectMetadata
information。putObject
in interface OSS
bucketName
- Bucket name.key
- Object key.input
- InputStream
instance to write from. It must be
readable.metadata
- The ObjectMetadata
instance. If it does not specify
the Content-Length information, the data is encoded by chunked
tranfer encoding.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(String bucketName, String key, File file, ObjectMetadata metadata) throws OSSException, ClientException
OSS
Bucket
from the file with the
ObjectMetadata
.putObject
in interface OSS
bucketName
- Bucket name.key
- Object key.file
- File object to read from.metadata
- The ObjectMetadata
instance. If it does not specify
the Content-Length information, the data is encoded by chunked
tranfer encoding.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(String bucketName, String key, File file) throws OSSException, ClientException
OSS
Bucket
from the file.putObject
in interface OSS
bucketName
- Bucket name.key
- Object key.file
- File object to read from.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(PutObjectRequest putObjectRequest) throws OSSException, ClientException
OSS
Bucket
.putObject
in interface OSS
putObjectRequest
- The PutObjectRequest
instance that has bucket name,
object key, metadata information.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(URL signedUrl, String filePath, Map<String,String> requestHeaders) throws OSSException, ClientException
OSS
putObject
in interface OSS
signedUrl
- Signed url, which has the bucket name, object key, account
information and accessed Ids and its signature. The url is
recommended to be generated by generatePresignedUrl().filePath
- The file path to read fromrequestHeaders
- Request headers, including standard or customized http headers
documented by PutObject REST API.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(URL signedUrl, String filePath, Map<String,String> requestHeaders, boolean useChunkEncoding) throws OSSException, ClientException
OSS
putObject
in interface OSS
signedUrl
- Signed url, which has the bucket name, object key, account
information and accessed Ids and its signature. The url is
recommended to be generated by generatePresignedUrl().filePath
- The file path to read from.requestHeaders
- Request headers, including standard or customized http headers
documented by PutObject REST API.useChunkEncoding
- The flag of using chunked transfer encoding.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(URL signedUrl, InputStream requestContent, long contentLength, Map<String,String> requestHeaders) throws OSSException, ClientException
OSS
putObject
in interface OSS
signedUrl
- Signed Url, which has the bucket name, object key, account
information and accessed Ids and its signature. The url is
recommended to be generated by generatePresignedUrl().requestContent
- InputStream
instance to read from.contentLength
- Hint content length to write.requestHeaders
- Request headers,including standard or customized http headers
documented by PutObject REST API.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PutObjectResult putObject(URL signedUrl, InputStream requestContent, long contentLength, Map<String,String> requestHeaders, boolean useChunkEncoding) throws OSSException, ClientException
OSS
putObject
in interface OSS
signedUrl
- Signed Url, which has the bucket name, object key, account
information and accessed Ids and its signature. The url is
recommended to be generated by generatePresignedUrl().requestContent
- InputStream
instance to read from.contentLength
- Hint content length to write. if useChunkEncoding is true,
then -1 is used.requestHeaders
- Rquest headers,including standard or customized http headers
documented by PutObject REST API.useChunkEncoding
- The flag of using chunked transfer encoding.PutObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public CopyObjectResult copyObject(String sourceBucketName, String sourceKey, String destinationBucketName, String destinationKey) throws OSSException, ClientException
OSS
copyObject
in interface OSS
sourceBucketName
- Source object's bucket name.sourceKey
- Source object's key.destinationBucketName
- Target object's bucket name.destinationKey
- Target object's key.CopyObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public CopyObjectResult copyObject(CopyObjectRequest copyObjectRequest) throws OSSException, ClientException
OSS
copyObject
in interface OSS
copyObjectRequest
- A CopyObjectRequest
instance that specifies source
file, source bucket and target file, target bucket。CopyObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public OSSObject getObject(String bucketName, String key) throws OSSException, ClientException
OSS
getObject
in interface OSS
bucketName
- Bucket name.key
- Object Key.OSSObject
instance. The caller is responsible to close
the connection after usage.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectMetadata getObject(GetObjectRequest getObjectRequest, File file) throws OSSException, ClientException
OSS
GetObjectRequest
parameter.getObject
in interface OSS
getObjectRequest
- A GetObjectRequest
instance which specifies bucket
name and object key.file
- Target file instance to download as.ObjectMetadata
instance of the bucket file meta.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public OSSObject getObject(GetObjectRequest getObjectRequest) throws OSSException, ClientException
OSS
OSSObject
from the bucket specified in
GetObjectRequest
parameter.getObject
in interface OSS
getObjectRequest
- A GetObjectRequest
instance which specifies the bucket
name and the object key.OSSObject
instance of the bucket file. The caller is
responsible to close the connection after usage.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public OSSObject getObject(URL signedUrl, Map<String,String> requestHeaders) throws OSSException, ClientException
OSS
OSSObject
from the signed Url.getObject
in interface OSS
signedUrl
- The signed Url.requestHeaders
- Request headers, including http standard or OSS customized
headers.OSSObject
instance.The caller is responsible to close
the connection after usage.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public OSSObject selectObject(SelectObjectRequest selectObjectRequest) throws OSSException, ClientException
OSS
OSSObject
from the bucket specified in
SelectObjectRequest
parameterselectObject
in interface OSS
selectObjectRequest
- A SelectObjectRequest
instance which specifies the
bucket name
object key
filter expression
input serialization
output serializationOSSObject
instance will be returned. The caller is
responsible to close the connection after usage.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public SimplifiedObjectMeta getSimplifiedObjectMeta(String bucketName, String key) throws OSSException, ClientException
OSS
OSSObject
.
Simplified metadata includes ETag, Size, LastModified and thus it's more lightweight then GetObjectMeta().
getSimplifiedObjectMeta
in interface OSS
bucketName
- Bucket name.key
- Object key.SimplifiedObjectMeta
instance of the object.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public SimplifiedObjectMeta getSimplifiedObjectMeta(GenericRequest genericRequest) throws OSSException, ClientException
OSS
OSSObject
.
Simplified metadata includes ETag, Size, LastModified and thus it's more lightweight then GetObjectMeta().
getSimplifiedObjectMeta
in interface OSS
genericRequest
- Generic request which specifies the bucket name and object keySimplifiedObjectMeta
instance of specified file.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectMetadata getObjectMetadata(String bucketName, String key) throws OSSException, ClientException
OSS
OSSObject
.getObjectMetadata
in interface OSS
bucketName
- Bucket name.key
- Object key.ObjectMetadata
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public SelectObjectMetadata createSelectObjectMetadata(CreateSelectObjectMetadataRequest createSelectObjectMetadataRequest) throws OSSException, ClientException
OSS
CreateSelectObjectMetadataRequest
)createSelectObjectMetadata
in interface OSS
createSelectObjectMetadataRequest
- CreateSelectObjectMetadataRequest
create select object metadata request.SelectObjectMetadata
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectMetadata getObjectMetadata(GenericRequest genericRequest) throws OSSException, ClientException
OSS
OSSObject
.getObjectMetadata
in interface OSS
genericRequest
- Generic request which specifies the bucket name and object
key.ObjectMetadata
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectMetadata headObject(String bucketName, String key) throws OSSException, ClientException
OSS
OSSObject
.headObject
in interface OSS
bucketName
- Bucket name.key
- Object key.ObjectMetadata
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectMetadata headObject(HeadObjectRequest headObjectRequest) throws OSSException, ClientException
OSS
OSSObject
.headObject
in interface OSS
headObjectRequest
- A HeadObjectRequest
instance which specifies the
bucket name and object key, and some constraint information can be set.ObjectMetadata
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public AppendObjectResult appendObject(AppendObjectRequest appendObjectRequest) throws OSSException, ClientException
OSS
AppendObjectRequest
. It's not applicable to normal OSS object.appendObject
in interface OSS
appendObjectRequest
- A AppendObjectRequest
instance which specifies the
bucket name, appendable object key, the file or the
InputStream object to append.AppendObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteObject(String bucketName, String key) throws OSSException, ClientException
OSS
OSSObject
by bucket name and object key.deleteObject
in interface OSS
bucketName
- Bucket name.key
- Object key.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteObject(GenericRequest genericRequest) throws OSSException, ClientException
OSS
OSSObject
by the GenericRequest
instance.deleteObject
in interface OSS
genericRequest
- The GenericRequest
instance that specfies the bucket
name and object key.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteVersion(String bucketName, String key, String versionId) throws OSSException, ClientException
OSS
Deletes a specific version of the specified object in the specified bucket. Once deleted, there is no method to restore or undelete an object version. This is the only way to permanently delete object versions that are protected by versioning.
Deleting an object version is permanent and irreversible. It is a privileged operation that only the owner of the bucket containing the version can perform.
Users can only delete a version of an object if versioning is enabled
for the bucket.
For more information about enabling versioning for a bucket, see
OSS.setBucketVersioning(SetBucketVersioningRequest)
.
If attempting to delete an object that does not exist, OSS will return a success message instead of an error message.
deleteVersion
in interface OSS
bucketName
- The name of the OSS bucket containing the object to delete.key
- The key of the object to delete.versionId
- The version of the object to delete.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteVersion(DeleteVersionRequest deleteVersionRequest) throws OSSException, ClientException
OSS
Deletes a specific version of an object in the specified bucket. Once deleted, there is no method to restore or undelete an object version. This is the only way to permanently delete object versions that are protected by versioning.
Deleting an object version is permanent and irreversible. It is a privileged operation that only the owner of the bucket containing the version can perform.
Users can only delete a version of an object if versioning is enabled
for the bucket.
For more information about enabling versioning for a bucket, see
OSS.setBucketVersioning(SetBucketVersioningRequest)
.
If attempting to delete an object that does not exist, OSS will return a success message instead of an error message.
deleteVersion
in interface OSS
deleteVersionRequest
- The request object containing all options for deleting a
specific version of an OSS object.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public DeleteObjectsResult deleteObjects(DeleteObjectsRequest deleteObjectsRequest) throws OSSException, ClientException
OSS
deleteObjects
in interface OSS
deleteObjectsRequest
- A DeleteObjectsRequest
instance which specifies the
bucket and file keys to delete.DeleteObjectsResult
instance which specifies each
file's result in normal mode or only failed deletions in quite
mode. By default it's normal mode.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public DeleteVersionsResult deleteVersions(DeleteVersionsRequest deleteVersionsRequest) throws OSSException, ClientException
OSS
deleteVersions
in interface OSS
deleteVersionsRequest
- A DeleteVersionsRequest
instance which specifies the
bucket and file keys to delete.DeleteVersionsResult
instance which specifies each
file's result in normal mode or only failed deletions in quite
mode. By default it's normal mode.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public boolean doesObjectExist(String bucketName, String key) throws OSSException, ClientException
OSS
OSSObject
exists under the specific
Bucket
. 302 Redirect or OSS mirroring will not impact the result
of this function.doesObjectExist
in interface OSS
bucketName
- Bucket name.key
- Object Key.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public boolean doesObjectExist(String bucketName, String key, boolean isOnlyInOSS)
OSS
OSSObject
exists under the specific
Bucket
. 302 Redirect or OSS mirroring will impact the result of
this function if isOnlyInOSS is true.doesObjectExist
in interface OSS
bucketName
- Bucket name.key
- Object Key.isOnlyInOSS
- true if ignore 302 redirect or mirroring; false if considering
302 redirect or mirroring, which could download the object
from source to OSS when the file exists in source but is not
in OSS yet.@Deprecated public boolean doesObjectExist(HeadObjectRequest headObjectRequest) throws OSSException, ClientException
OSS
OSSObject
exists.doesObjectExist
in interface OSS
headObjectRequest
- A HeadObjectRequest
instance which specifies the
bucket name and object key. Constraint information is ignored.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public boolean doesObjectExist(GenericRequest genericRequest) throws OSSException, ClientException
OSS
OSSObject
exists under the specific
Bucket
. 302 Redirect or OSS mirroring will not impact the result
of this function.doesObjectExist
in interface OSS
genericRequest
- A GenericRequest
instance which specifies the bucket
and object key.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public boolean doesObjectExist(GenericRequest genericRequest, boolean isOnlyInOSS) throws OSSException, ClientException
OSS
OSSObject
exists under the specific
Bucket
. 302 Redirect or OSS mirroring will not impact the result
of this function.doesObjectExist
in interface OSS
genericRequest
- A GenericRequest
instance which specifies the bucket
and object key.isOnlyInOSS
- true if ignore 302 redirect or mirroring; false if considering
302 redirect or mirroring, which could download the object
from source to OSS when the file exists in source but is not
in OSS yet.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setObjectAcl(String bucketName, String key, CannedAccessControlList cannedACL) throws OSSException, ClientException
OSS
OSSObject
instance.setObjectAcl
in interface OSS
bucketName
- Bucket name.key
- Object Key.cannedACL
- One of the three values: Private, PublicRead or
PublicReadWrite.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setObjectAcl(SetObjectAclRequest setObjectAclRequest) throws OSSException, ClientException
OSS
OSSObject
instance.setObjectAcl
in interface OSS
setObjectAclRequest
- A SetObjectAclRequest
instance which specifies the
object's bucket name and key as well as the ACL information.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectAcl getObjectAcl(String bucketName, String key) throws OSSException, ClientException
OSS
getObjectAcl
in interface OSS
bucketName
- Bucket name.key
- Object Key.ObjectAcl
instance of the object.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ObjectAcl getObjectAcl(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getObjectAcl
in interface OSS
genericRequest
- A GenericRequest
instance which specifies the bucket
name and object key.ObjectAcl
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public RestoreObjectResult restoreObject(String bucketName, String key) throws OSSException, ClientException
OSS
restoreObject
in interface OSS
bucketName
- Bucket name.key
- Object Key.RestoreObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public RestoreObjectResult restoreObject(GenericRequest genericRequest) throws OSSException, ClientException
OSS
restoreObject
in interface OSS
genericRequest
- A GenericRequest
instance that specifies the bucket
name and object key.RestoreObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public RestoreObjectResult restoreObject(String bucketName, String key, RestoreConfiguration restoreConfiguration) throws OSSException, ClientException
OSS
restoreObject
in interface OSS
bucketName
- Bucket name.key
- Object Key.restoreConfiguration
- A RestoreConfiguration
instance that specifies the restore configuration.RestoreObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public RestoreObjectResult restoreObject(RestoreObjectRequest restoreObjectRequest) throws OSSException, ClientException
OSS
restoreObject
in interface OSS
restoreObjectRequest
- A RestoreObjectRequest
instance that specifies the bucket
name, object key and restore configuration.RestoreObjectResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setObjectTagging(String bucketName, String key, Map<String,String> tags) throws OSSException, ClientException
OSS
setObjectTagging
in interface OSS
bucketName
- Bucket name.key
- Object name.tags
- The dictionary that contains the tags in the form of <key,
value> pairs.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setObjectTagging(String bucketName, String key, TagSet tagSet) throws OSSException, ClientException
OSS
setObjectTagging
in interface OSS
bucketName
- Bucket name.key
- Object name.tagSet
- TagSet
instance that has the tags in the form of <key,
value> pairs.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setObjectTagging(SetObjectTaggingRequest setObjectTaggingRequest) throws OSSException, ClientException
OSS
setObjectTagging
in interface OSS
setObjectTaggingRequest
- SetObjectTaggingRequest
instance that has object
information as well as tagging information.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public TagSet getObjectTagging(String bucketName, String key) throws OSSException, ClientException
OSS
getObjectTagging
in interface OSS
bucketName
- Bucket name.key
- Object name.TagSet
instance. If there's no tag, the TagSet object
with empty tag information is returned.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public TagSet getObjectTagging(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getObjectTagging
in interface OSS
genericRequest
- A GenericRequest
instance that specifies the bucket
name and object name.TagSet
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteObjectTagging(String bucketName, String key) throws OSSException, ClientException
OSS
deleteObjectTagging
in interface OSS
bucketName
- Bucket name.key
- Object name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteObjectTagging(GenericRequest genericRequest) throws OSSException, ClientException
OSS
deleteObjectTagging
in interface OSS
genericRequest
- A GenericRequest
instance that specifies the bucket
name and object name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public URL generatePresignedUrl(String bucketName, String key, Date expiration) throws ClientException
OSS
OSSObject
with HTTP GET
method.generatePresignedUrl
in interface OSS
bucketName
- Bucket name.key
- Object key.expiration
- URL's expiration time.OSSObject
object.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public URL generatePresignedUrl(String bucketName, String key, Date expiration, HttpMethod method) throws ClientException
OSS
OSSObject
with a
specific HTTP method.generatePresignedUrl
in interface OSS
bucketName
- Bucket name.key
- Object Key.expiration
- URL's expiration time.method
- HTTP method,Only HttpMethod.GET
and
HttpMethod.PUT
are supported.OSSObject
object.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public URL generatePresignedUrl(GeneratePresignedUrlRequest request) throws ClientException
OSS
OSSObject
with a
specific HTTP method.generatePresignedUrl
in interface OSS
request
- A GeneratePresignedUrlRequest
instance which specifies
the bucket name, file key, expiration time, HTTP method, and
the MD5 signature of the content, etc.OSSObject
object.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult abortMultipartUpload(AbortMultipartUploadRequest request) throws OSSException, ClientException
OSS
abortMultipartUpload
in interface OSS
request
- A AbortMultipartUploadRequest
instance which specifies
the file name and the upload Id to abort.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public CompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest request) throws OSSException, ClientException
OSS
After all parts uploads finish, this API needs to be called to finalize the upload. All parts' number and their ETag are required and if ETag verification is not passed, the API will fail. The parts' are not necessarily ordered and the final file's content is determined by the order in partETags list.
The API will not automatically retry even if the max retry count is greater than 0 because it's not idempotent.
completeMultipartUpload
in interface OSS
request
- A CompleteMultipartUploadRequest
instance which
specifies all parameters to complete multiple part upload.CompleteMultipartUploadResult
instance which has the
key, ETag, url of the final object.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public InitiateMultipartUploadResult initiateMultipartUpload(InitiateMultipartUploadRequest request) throws OSSException, ClientException
OSS
Prior to starting a multiple part upload, this method needs to be called to ask OSS service do some initialization work. Upon a successful call, it returns a globally unique upload ID which could be used for the subsequent operations such as pause, lookup multiple parts, etc. This method will not automatically retry even if the max retry count is greater than 0, because it's not idempotent.
initiateMultipartUpload
in interface OSS
request
- A InitiateMultipartUploadRequest
instance which
specifies the bucket name, object key and metadata.InitiateMultipartUploadResult
instance which has the
global unique id if succeeds.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public MultipartUploadListing listMultipartUploads(ListMultipartUploadsRequest request) throws OSSException, ClientException
OSS
Those initialized but not finished multipart uploads would be listed by this method. If the executing multiple parts upload count is more than maxUploads (which could be up to 1000), then it would return the nextUploadIdMaker and nextKeyMaker which could be used for next call. When keyMarker in parameter request is specified, it would list executing multipart uploads whose keys are greater than the keyMarker in lexicographic order and multipart uploads whose keys are equal to the keyMarker and uploadIds are greater than uploadIdMarker in lexicographic order. In the other words, the keyMarker has the priority over the uploadIdMarker and uploadIdMarker only impacts the uploads who has the same keys as the keyMarker.
listMultipartUploads
in interface OSS
request
- A ListMultipartUploadsRequest
instance.MultipartUploadListing
instance.
Upon a successful call, it may has nextKeyMarker and
nextUploadIdMarker for the next call in case OSS has remaining
uploads not returned.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public PartListing listParts(ListPartsRequest request) throws OSSException, ClientException
OSS
listParts
in interface OSS
request
- A ListPartsRequest
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public UploadPartResult uploadPart(UploadPartRequest request) throws OSSException, ClientException
OSS
uploadPart
in interface OSS
request
- A UploadPartRequest
instance which specifies bucket,
object key, upload id, part number, content and length, MD5
digest and chunked transfer encoding flag.UploadPartResult
instance to indicate
the upload result.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public UploadPartCopyResult uploadPartCopy(UploadPartCopyRequest request) throws OSSException, ClientException
OSS
uploadPartCopy
in interface OSS
request
- A UploadPartCopyRequest
instance which specifies: 1)
source file 2) source file's copy range 3) target file 4)
target file's upload Id and its part number 5) constraints
such as ETag match or non-match, last modified match or
non-match, etc.UploadPartCopyResult
instance which has the part number
and ETag upon a successful upload.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketCORS(SetBucketCORSRequest request) throws OSSException, ClientException
OSS
setBucketCORS
in interface OSS
request
- A SetBucketCORSRequest
object that has defined all
CORS rules.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<SetBucketCORSRequest.CORSRule> getBucketCORSRules(String bucketName) throws OSSException, ClientException
OSS
getBucketCORSRules
in interface OSS
bucketName
- Bucket name.SetBucketCORSRequest.CORSRule
under the bucket.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<SetBucketCORSRequest.CORSRule> getBucketCORSRules(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getBucketCORSRules
in interface OSS
genericRequest
- A GenericRequest
instance that specifies the bucket
name.SetBucketCORSRequest.CORSRule
under the bucket.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public CORSConfiguration getBucketCORS(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getBucketCORS
in interface OSS
genericRequest
- A GenericRequest
instance that specifies the bucket
name.CORSConfiguration
instance which has the CORS configuration under the bucket.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketCORSRules(String bucketName) throws OSSException, ClientException
OSS
deleteBucketCORSRules
in interface OSS
bucketName
- The bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketCORSRules(GenericRequest genericRequest) throws OSSException, ClientException
OSS
deleteBucketCORSRules
in interface OSS
genericRequest
- The GenericRequest
instance that specifies the bucket
name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public ResponseMessage optionsObject(OptionsRequest request) throws OSSException, ClientException
OSS
optionsObject
in interface OSS
request
- The OptionsRequest
instance that specifies the bucket
name.ResponseMessage
instance contains some response information.OSSException
ClientException
public VoidResult setBucketLogging(SetBucketLoggingRequest request) throws OSSException, ClientException
OSS
Bucket
's logging. To enable the logging,
the TargetBucket attribute in SetBucketLoggingRequest object must be
specified. To disable the logging, the TargetBucket attribute in
SetBucketLoggingRequest object must be null. The logging file will be
hourly rolling log.setBucketLogging
in interface OSS
request
- A SetBucketLoggingRequest
instance which specifies the
bucket name to set the logging, the target bucket to store the
logging data and the prefix of the logging file.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketLoggingResult getBucketLogging(String bucketName) throws OSSException, ClientException
OSS
Bucket
's logging setting.getBucketLogging
in interface OSS
bucketName
- The bucket name.BucketLoggingResult
instance which contains the logging
settings such as target bucket for data, logging file prefix.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketLoggingResult getBucketLogging(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's logging setting.getBucketLogging
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.BucketLoggingResult
instance which contains the logging
settings such as target bucket for data, logging file prefix.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketLogging(String bucketName) throws OSSException, ClientException
OSS
Bucket
.deleteBucketLogging
in interface OSS
bucketName
- Bucket NameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketLogging(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
.deleteBucketLogging
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult putBucketImage(PutBucketImageRequest request) throws OSSException, ClientException
OSS
Bucket
putBucketImage
in interface OSS
request
- A PutBucketImageRequest
instances which specifies some
attributes of image processing.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public GetBucketImageResult getBucketImage(String bucketName) throws OSSException, ClientException
OSS
Bucket
.getBucketImage
in interface OSS
bucketName
- The bucket nameGetBucketImageResult
instance which has attributes of
image processingOSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public GetBucketImageResult getBucketImage(String bucketName, GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
.getBucketImage
in interface OSS
bucketName
- The bucket name.genericRequest
- The origin request.GetBucketImageResult
which has the attributes of image
processing.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketImage(String bucketName) throws OSSException, ClientException
OSS
Bucket
.deleteBucketImage
in interface OSS
bucketName
- Bucket nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketImage(String bucketName, GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
.deleteBucketImage
in interface OSS
bucketName
- Bucket namegenericRequest
- The origin requestVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult putImageStyle(PutImageStyleRequest putImageStyleRequest) throws OSSException, ClientException
OSS
Bucket
.putImageStyle
in interface OSS
putImageStyleRequest
- A PutImageStyleRequest
instance that has bucket name
and style informationVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteImageStyle(String bucketName, String styleName) throws OSSException, ClientException
OSS
Bucket
deleteImageStyle
in interface OSS
bucketName
- Bucket namestyleName
- Style nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteImageStyle(String bucketName, String styleName, GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
deleteImageStyle
in interface OSS
bucketName
- Bucket namestyleName
- Style namegenericRequest
- The origin requestVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public GetImageStyleResult getImageStyle(String bucketName, String styleName) throws OSSException, ClientException
OSS
Bucket
getImageStyle
in interface OSS
bucketName
- Bucket name.styleName
- Style name.GetImageStyleResult
instance which has the style
information if successful or error code if failed.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public GetImageStyleResult getImageStyle(String bucketName, String styleName, GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
getImageStyle
in interface OSS
bucketName
- Bucket name.styleName
- Style name.genericRequest
- The origin request.GetImageStyleResult
instance which has the style
information if successful or error code if failed.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<Style> listImageStyle(String bucketName) throws OSSException, ClientException
OSS
Bucket
listImageStyle
in interface OSS
bucketName
- Bucket name.List
of all styles of the Bucket. If there's no style,
it will be an empty list.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<Style> listImageStyle(String bucketName, GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
listImageStyle
in interface OSS
bucketName
- Bucket name.genericRequest
- The origin request.List
of all styles of the Bucket. If there's no style,
it will be an empty list.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketProcess(SetBucketProcessRequest setBucketProcessRequest) throws OSSException, ClientException
OSS
setBucketProcess
in interface OSS
setBucketProcessRequest
- A SetBucketTaggingRequest
instance that contains the
image accessing configuration such as enable original picture
protection, etc.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketProcess getBucketProcess(String bucketName) throws OSSException, ClientException
OSS
getBucketProcess
in interface OSS
bucketName
- Bucket name.BucketProcess
which contains the image accessing
configurations if succeeds.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketProcess getBucketProcess(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getBucketProcess
in interface OSS
genericRequest
- A GenericRequest
instance that has the bucket name.BucketProcess
which contains the image accessing
configurations if succeeds.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketWebsite(SetBucketWebsiteRequest setBucketWebSiteRequest) throws OSSException, ClientException
OSS
Bucket
. The settings
includes the mandatory home page, the optional 404 page and the routing
rules. If home page is null, then the static website is not enabled on
the bucket.setBucketWebsite
in interface OSS
setBucketWebSiteRequest
- A SetBucketWebsiteRequest
instance to set with.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketWebsiteResult getBucketWebsite(String bucketName) throws OSSException, ClientException
OSS
Bucket
's static website settings.getBucketWebsite
in interface OSS
bucketName
- The bucket name.BucketWebsiteResult
instanceOSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketWebsiteResult getBucketWebsite(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's static webite settings.getBucketWebsite
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.BucketWebsiteResult
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketWebsite(String bucketName) throws OSSException, ClientException
OSS
Bucket
's static website configuration, which means
disabling the static website on the bucket.deleteBucketWebsite
in interface OSS
bucketName
- Bucket nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketWebsite(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's static website configuration, which means
disabling the static website on the bucket.deleteBucketWebsite
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketVersioningConfiguration getBucketVersioning(String bucketName) throws OSSException, ClientException
OSS
Returns the versioning configuration for the specified bucket.
A bucket's versioning configuration can be in one of three possible states:
BucketVersioningConfiguration.OFF
BucketVersioningConfiguration.ENABLED
BucketVersioningConfiguration.SUSPENDED
By default, new buckets are in the
off
state. Once versioning is
enabled for a bucket the status can never be reverted to
off
.
The versioning configuration of a bucket has different implications for
each operation performed on that bucket or for objects within that
bucket. For example, when versioning is enabled a PutObject
operation creates a unique object version-id for the object being uploaded. The
The PutObject
API guarantees that, if versioning is enabled for a bucket at
the time of the request, the new object can only be permanently deleted
using a DeleteVersion
operation. It can never be overwritten.
Additionally, the PutObject
API guarantees that,
if versioning is enabled for a bucket the request,
no other object will be overwritten by that request.
OSS is eventually consistent. It can take time for the versioning status of a bucket to be propagated throughout the system.
getBucketVersioning
in interface OSS
bucketName
- The bucket whose versioning configuration will be retrieved.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.OSS.setBucketVersioning(SetBucketVersioningRequest)
,
OSS.getBucketVersioning(GenericRequest)
public BucketVersioningConfiguration getBucketVersioning(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Returns the versioning configuration for the specified bucket.
A bucket's versioning configuration can be in one of three possible states:
BucketVersioningConfiguration.OFF
BucketVersioningConfiguration.ENABLED
BucketVersioningConfiguration.SUSPENDED
By default, new buckets are in the
off
state. Once versioning is
enabled for a bucket the status can never be reverted to
off
.
The versioning configuration of a bucket has different implications for
each operation performed on that bucket or for objects within that
bucket. For example, when versioning is enabled a PutObject
operation creates a unique object version-id for the object being uploaded. The
The PutObject
API guarantees that, if versioning is enabled for a bucket at
the time of the request, the new object can only be permanently deleted
using a DeleteVersion
operation. It can never be overwritten.
Additionally, the PutObject
API guarantees that,
if versioning is enabled for a bucket the request,
no other object will be overwritten by that request.
OSS is eventually consistent. It can take time for the versioning status of a bucket to be propagated throughout the system.
getBucketVersioning
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.OSS.setBucketVersioning(SetBucketVersioningRequest)
,
OSS.getBucketVersioning(String)
public VoidResult setBucketVersioning(SetBucketVersioningRequest setBucketVersioningRequest) throws OSSException, ClientException
OSS
Sets the versioning configuration for the specified bucket.
A bucket's versioning configuration can be in one of three possible states:
BucketVersioningConfiguration.OFF
BucketVersioningConfiguration.ENABLED
BucketVersioningConfiguration.SUSPENDED
By default, new buckets are in the
off
state. Once versioning is
enabled for a bucket the status can never be reverted to
off
.
Objects created before versioning was enabled or when versioning is
suspended will be given the default null
version ID (see
OSSConstants.NULL_VERSION_ID
). Note that the
null
version ID is a valid version ID and is not the
same as not having a version ID.
The versioning configuration of a bucket has different implications for
each operation performed on that bucket or for objects within that
bucket. For example, when versioning is enabled a PutObject
operation creates a unique object version-id for the object being uploaded. The
The PutObject
API guarantees that, if versioning is enabled for a bucket at
the time of the request, the new object can only be permanently deleted
using a DeleteVersion
operation. It can never be overwritten.
Additionally, the PutObject
API guarantees that,
if versioning is enabled for a bucket the request,
no other object will be overwritten by that request.
Refer to the documentation sections for each API for information on how
versioning status affects the semantics of that particular API.
OSS is eventually consistent. It can take time for the versioning status of a bucket to be propagated throughout the system.
setBucketVersioning
in interface OSS
setBucketVersioningRequest
- The request object containing all options for setting the
bucket versioning configuration.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.OSS.getBucketVersioning(String)
public String generatePostPolicy(Date expiration, PolicyConditions conds)
OSS
generatePostPolicy
in interface OSS
expiration
- Policy expiration time.conds
- Policy condition lists.public String calculatePostSignature(String postPolicy) throws ClientException
OSS
calculatePostSignature
in interface OSS
postPolicy
- Post policy string in JSON which is generated from
OSS.generatePostPolicy(Date, PolicyConditions)
.ClientException
public VoidResult setBucketLifecycle(SetBucketLifecycleRequest setBucketLifecycleRequest) throws OSSException, ClientException
OSS
Bucket
's lifecycle rule.setBucketLifecycle
in interface OSS
setBucketLifecycleRequest
- A SetBucketWebsiteRequest
instance which specifies the
lifecycle rulesVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<LifecycleRule> getBucketLifecycle(String bucketName) throws OSSException, ClientException
OSS
Bucket
's lifecycle rules.getBucketLifecycle
in interface OSS
bucketName
- Bucket name.LifecycleRule
.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<LifecycleRule> getBucketLifecycle(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's Lifecycle rules.getBucketLifecycle
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.LifecycleRule
instances.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketLifecycle(String bucketName) throws OSSException, ClientException
OSS
Bucket
's Lifecycle rules.deleteBucketLifecycle
in interface OSS
bucketName
- The bucket name to operate on.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketLifecycle(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's Lifecycle rules.deleteBucketLifecycle
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketTagging(String bucketName, Map<String,String> tags) throws OSSException, ClientException
OSS
Bucket
instance specified by the bucket namesetBucketTagging
in interface OSS
bucketName
- Bucket name.tags
- The dictionary that contains the tags in the form of <key,
value> pairsVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketTagging(String bucketName, TagSet tagSet) throws OSSException, ClientException
OSS
Bucket
instance.setBucketTagging
in interface OSS
bucketName
- Bucket name.tagSet
- TagSet
instance that has the tags in the form of <key,
value> paris.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketTagging(SetBucketTaggingRequest setBucketTaggingRequest) throws OSSException, ClientException
OSS
Bucket
instance in
SetBucketTaggingRequest
object.setBucketTagging
in interface OSS
setBucketTaggingRequest
- SetBucketTaggingRequest
instance that has bucket
information as well as tagging information.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public TagSet getBucketTagging(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance.getBucketTagging
in interface OSS
bucketName
- Bucket nameTagSet
instance. If there's no tag, the TagSet object
with empty tag information is returned.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public TagSet getBucketTagging(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.getBucketTagging
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.TagSet
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketTagging(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance。deleteBucketTagging
in interface OSS
bucketName
- Bucket nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketTagging(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.deleteBucketTagging
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult addBucketReplication(AddBucketReplicationRequest addBucketReplicationRequest) throws OSSException, ClientException
OSS
Bucket
's cross-region replication rule.addBucketReplication
in interface OSS
addBucketReplicationRequest
- A AddBucketReplicationRequest
instance which specifies
a replication rule.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<ReplicationRule> getBucketReplication(String bucketName) throws OSSException, ClientException
OSS
Bucket
's cross region replication rules.getBucketReplication
in interface OSS
bucketName
- Bucket name.ReplicationRule
under the bucket.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<ReplicationRule> getBucketReplication(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's cross region replication rules.getBucketReplication
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.ReplicationRule
under the bucket.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketReplication(String bucketName, String replicationRuleID) throws OSSException, ClientException
OSS
Bucket
's cross region replication rule.deleteBucketReplication
in interface OSS
bucketName
- Bucket name.replicationRuleID
- Replication Id to delete.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketReplication(DeleteBucketReplicationRequest deleteBucketReplicationRequest) throws OSSException, ClientException
OSS
Bucket
's cross region replication rule.deleteBucketReplication
in interface OSS
deleteBucketReplicationRequest
- The DeleteBucketReplicationRequest
instance which
specifies the replication rule Id to delete.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketReplicationProgress getBucketReplicationProgress(String bucketName, String replicationRuleID) throws OSSException, ClientException
OSS
Bucket
's progress of the specified cross region
replication rule.getBucketReplicationProgress
in interface OSS
bucketName
- Bucket name.replicationRuleID
- Replication Rule Id.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketReplicationProgress getBucketReplicationProgress(GetBucketReplicationProgressRequest getBucketReplicationProgressRequest) throws OSSException, ClientException
OSS
Bucket
's progress of the specified cross region
replication rule.getBucketReplicationProgress
in interface OSS
getBucketReplicationProgressRequest
- The GetBucketReplicationProgressRequest
instance which
specifies the replication rule Id and bucket name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<String> getBucketReplicationLocation(String bucketName) throws OSSException, ClientException
OSS
Bucket
's replication reachable data centers.getBucketReplicationLocation
in interface OSS
bucketName
- Bucket name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<String> getBucketReplicationLocation(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's replication reachable data centers.getBucketReplicationLocation
in interface OSS
genericRequest
- The GenericRequest
instance that specifies the bucket
name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public AddBucketCnameResult addBucketCname(AddBucketCnameRequest addBucketCnameRequest) throws OSSException, ClientException
OSS
Bucket
instance.addBucketCname
in interface OSS
addBucketCnameRequest
- The request specifies the bucket name and the Cname
information.AddBucketCnameResult
instance wrapped certificate ID if exist and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<CnameConfiguration> getBucketCname(String bucketName) throws OSSException, ClientException
OSS
Bucket
's Cnames.getBucketCname
in interface OSS
bucketName
- Bucket name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public List<CnameConfiguration> getBucketCname(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's Cnames.getBucketCname
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketCname(String bucketName, String domain) throws OSSException, ClientException
OSS
Bucket
's Cname specified by the parameter domain.deleteBucketCname
in interface OSS
bucketName
- The bucket name。domain
- cname。VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult deleteBucketCname(DeleteBucketCnameRequest deleteBucketCnameRequest) throws OSSException, ClientException
OSS
Bucket
's specific Cname specified by the parameter
domain.deleteBucketCname
in interface OSS
deleteBucketCnameRequest
- A DeleteBucketCnameRequest
instance that specifies the
bucket name and the domain name to deleteVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public CreateBucketCnameTokenResult createBucketCnameToken(CreateBucketCnameTokenRequest createBucketCnameTokenRequest) throws OSSException, ClientException
OSS
Bucket
instance.createBucketCnameToken
in interface OSS
createBucketCnameTokenRequest
- The request specifies the bucket name and the Cname
information.CreateBucketCnameTokenResult
instance contains token
and some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public GetBucketCnameTokenResult getBucketCnameToken(GetBucketCnameTokenRequest getBucketCnameTokenRequest) throws OSSException, ClientException
OSS
Bucket
instance.getBucketCnameToken
in interface OSS
getBucketCnameTokenRequest
- The request specifies the bucket name and the cname token.CreateBucketCnameTokenResult
instance contains token
and some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketInfo getBucketInfo(String bucketName) throws OSSException, ClientException
OSS
Bucket
's basic information as well as its ACL.getBucketInfo
in interface OSS
bucketName
- The bucket name。BucketInfo
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketInfo getBucketInfo(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's basic information as well as its ACL.getBucketInfo
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.BucketInfo
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketStat getBucketStat(String bucketName) throws OSSException, ClientException
OSS
Bucket
's storage information such as object counts,
storage size and executing multipart uploads.getBucketStat
in interface OSS
bucketName
- The bucket name.BucketStat
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public BucketStat getBucketStat(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's storage information such as object counts,
storage size and executing multipart uploads.getBucketStat
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.BucketStat
instance.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketStorageCapacity(String bucketName, UserQos userQos) throws OSSException, ClientException
OSS
Bucket
.setBucketStorageCapacity
in interface OSS
bucketName
- The bucket name。userQos
- A UserQos
instance which specifies the capacity in GBVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors occurred in OSS while processing the request.ClientException
- If any errors are encountered in the client while making the
request or handling the response.public VoidResult setBucketStorageCapacity(SetBucketStorageCapacityRequest setBucketStorageCapacityRequest) throws OSSException, ClientException
OSS
Bucket
.setBucketStorageCapacity
in interface OSS
setBucketStorageCapacityRequest
- A SetBucketStorageCapacityRequest
instance which
specifies the bucket name as well as a UserQos instanceVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- OSS Server side exception.ClientException
- If any errors occurred in OSS while processing the request.public UserQos getBucketStorageCapacity(String bucketName) throws OSSException, ClientException
OSS
Bucket
's capacitygetBucketStorageCapacity
in interface OSS
bucketName
- The bucket name.UserQos
instance which has the capacity information.OSSException
- OSS Server side exception.ClientException
- If any errors occurred in OSS while processing the request.public UserQos getBucketStorageCapacity(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
's capacitygetBucketStorageCapacity
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.UserQos
instance which has the capacity information.OSSException
- OSS Server side exception.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketEncryption(SetBucketEncryptionRequest setBucketEncryptionRequest) throws OSSException, ClientException
OSS
setBucketEncryption
in interface OSS
setBucketEncryptionRequest
- The request object for setting the bucket encryption configuration.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- OSS Server side exception.ClientException
- If any errors occurred in OSS while processing the request.public ServerSideEncryptionConfiguration getBucketEncryption(String bucketName) throws OSSException, ClientException
OSS
getBucketEncryption
in interface OSS
bucketName
- Name of the bucket to retrieve encryption configuration for.ServerSideEncryptionConfiguration
.OSSException
- OSS Server side exception.ClientException
- If any errors occurred in OSS while processing the request.public ServerSideEncryptionConfiguration getBucketEncryption(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getBucketEncryption
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.ServerSideEncryptionConfiguration
.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketEncryption(String bucketName) throws OSSException, ClientException
OSS
deleteBucketEncryption
in interface OSS
bucketName
- The bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketEncryption(GenericRequest genericRequest) throws OSSException, ClientException
OSS
deleteBucketEncryption
in interface OSS
genericRequest
- The GenericRequest
instance which specifies the bucket
name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketPolicy(String bucketName, String policyText) throws OSSException, ClientException
OSS
Bucket
instance.setBucketPolicy
in interface OSS
bucketName
- Bucket name.policyText
- Policy JSON text, please refer to the policy writing rules of AliyunVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketPolicy(SetBucketPolicyRequest setBucketPolicyRequest) throws OSSException, ClientException
OSS
Bucket
instance.setBucketPolicy
in interface OSS
setBucketPolicyRequest
- SetBucketPolicyRequest
instance that has bucket
information as well as policy information.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketPolicyResult getBucketPolicy(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.getBucketPolicy
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.InputStream
.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketPolicyResult getBucketPolicy(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance.getBucketPolicy
in interface OSS
bucketName
- Bucket nameInputStream
.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketPolicy(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.deleteBucketPolicy
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketPolicy(String bucketName) throws OSSException, ClientException
OSS
Bucket
instance.deleteBucketPolicy
in interface OSS
bucketName
- Bucket nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public UploadFileResult uploadFile(UploadFileRequest uploadFileRequest) throws Throwable
OSS
uploadFile
in interface OSS
uploadFileRequest
- A UploadFileRequest
instance that specifies the bucket
name, object key, file path ,part size (> 100K) and thread
count (from 1 to 1000) and checkpoint file.UploadFileRequest
instance which has the new uploaded
file's key, ETag, location.Throwable
- Base class for any exceptions.public DownloadFileResult downloadFile(DownloadFileRequest downloadFileRequest) throws Throwable
OSS
downloadFile
in interface OSS
downloadFileRequest
- A DownloadFileRequest
instance that specifies the
bucket name, object key, file path, part size (> 100K) and
thread count (from 1 to 1000) and checkpoint file. Also it
could have the ETag and ModifiedSince constraints.DownloadFileResult
instance that has the
ObjectMetadata
information.Throwable
- Base class for any exceptions.public CreateLiveChannelResult createLiveChannel(CreateLiveChannelRequest createLiveChannelRequest) throws OSSException, ClientException
OSS
createLiveChannel
in interface OSS
createLiveChannelRequest
- A CreateLiveChannelRequest
instance that specifies the
target bucket name, channel name, channel status (Enabled or
Disabled), streaming storage status such as media file name,
its .ts file time duration, etc.CreateLiveChannelResult
instance that specifies the
publish url and playback url.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setLiveChannelStatus(String bucketName, String liveChannel, LiveChannelStatus status) throws OSSException, ClientException
OSS
setLiveChannelStatus
in interface OSS
bucketName
- Bucket name.liveChannel
- Live Channel name.status
- Live Channel status: "Enabled" or "Disabled".VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setLiveChannelStatus(SetLiveChannelRequest setLiveChannelRequest) throws OSSException, ClientException
OSS
setLiveChannelStatus
in interface OSS
setLiveChannelRequest
- A SetLiveChannelRequest
instance that specifies the
bucket name, the channel name and the Live Channel status.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public LiveChannelInfo getLiveChannelInfo(String bucketName, String liveChannel) throws OSSException, ClientException
OSS
getLiveChannelInfo
in interface OSS
bucketName
- Bucket name.liveChannel
- Live Channel name.LiveChannelInfo
instance that contains the Live
Channel's name, description, bucket name and its streaming
storage information.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public LiveChannelInfo getLiveChannelInfo(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
OSS
getLiveChannelInfo
in interface OSS
liveChannelGenericRequest
- A LiveChannelGenericRequest
instance that specifies
the bucket name and Live Channel name.LiveChannelInfo
instance that contains the Live
Channel's name, description, bucket name and its streaming
storage information.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public LiveChannelStat getLiveChannelStat(String bucketName, String liveChannel) throws OSSException, ClientException
OSS
getLiveChannelStat
in interface OSS
bucketName
- Bucket name.liveChannel
- Live Channel name.LiveChannelStat
instance that contains the media's
resolution, frame rate and bandwidth.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public LiveChannelStat getLiveChannelStat(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
OSS
getLiveChannelStat
in interface OSS
liveChannelGenericRequest
- A LiveChannelGenericRequest
instance that specifies
the bucket name and channel name.LiveChannelStat
instance that contains the media's
resolution, frame rate and bandwidth.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteLiveChannel(String bucketName, String liveChannel) throws OSSException, ClientException
OSS
deleteLiveChannel
in interface OSS
bucketName
- Bucket name.liveChannel
- Live Channel name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteLiveChannel(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
OSS
deleteLiveChannel
in interface OSS
liveChannelGenericRequest
- A LiveChannelGenericRequest
instance that specifies
theVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public List<LiveChannel> listLiveChannels(String bucketName) throws OSSException, ClientException
OSS
listLiveChannels
in interface OSS
bucketName
- Bucket name.LiveChannel
instances under the bucket.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public LiveChannelListing listLiveChannels(ListLiveChannelsRequest listLiveChannelRequest) throws OSSException, ClientException
OSS
listLiveChannels
in interface OSS
listLiveChannelRequest
- A ListLiveChannelsRequest
that specifies the bucket
name and its requirement on Live Channel instances to return,
such as prefix, marker, max entries to return.LiveChannel
instances that meet the
requirements.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public List<LiveRecord> getLiveChannelHistory(String bucketName, String liveChannel) throws OSSException, ClientException
OSS
LiveRecord
entries from the specified Live Channel.
OSS saves recent 10 LiveRecord (pushing streaming record) for every Live
Channel.getLiveChannelHistory
in interface OSS
bucketName
- Bucket name.liveChannel
- Live Channel name.LiveRecord
for the live channel.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public List<LiveRecord> getLiveChannelHistory(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
OSS
LiveRecord
entries from the specified Live Channel.
OSS saves recent 10 LiveRecord (pushing streaming record) for every Live
Channel.getLiveChannelHistory
in interface OSS
liveChannelGenericRequest
- A LiveChannelGenericRequest
instance that specifies
the bucket name and Live Channel name.LiveRecord
for the live channel.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult generateVodPlaylist(String bucketName, String liveChannelName, String PlaylistName, long startTime, long endTime) throws OSSException, ClientException
OSS
generateVodPlaylist
in interface OSS
bucketName
- Bucket name.liveChannelName
- Live Channel name.PlaylistName
- The playlist file name, such as (playlist.m3u8).startTime
- The start time of the playlist in epoch time (means *.ts files
time is same or later than it)endTime
- The end time of the playlist in epoch time(means *.ts files
time is no later than it).VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult generateVodPlaylist(GenerateVodPlaylistRequest generateVodPlaylistRequest) throws OSSException, ClientException
OSS
generateVodPlaylist
in interface OSS
generateVodPlaylistRequest
- A GenerateVodPlaylistRequest
instance the specifies
the bucket name and the Live Channel name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public OSSObject getVodPlaylist(String bucketName, String liveChannelName, long startTime, long endTime) throws OSSException, ClientException
OSS
getVodPlaylist
in interface OSS
bucketName
- Bucket name.liveChannelName
- Live Channel name.startTime
- The start time of the playlist in epoch time (means *.ts files
time is same or later than it)endTime
- The end time of the playlist in epoch time(means *.ts files
time is no later than it).OSSObject
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public OSSObject getVodPlaylist(GetVodPlaylistRequest getVodPlaylistRequest) throws OSSException, ClientException
OSS
getVodPlaylist
in interface OSS
getVodPlaylistRequest
- A GetVodPlaylistRequest
instance the specifies
the bucket name and the Live Channel name.OSSObject
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public String generateRtmpUri(String bucketName, String liveChannelName, String PlaylistName, long expires) throws OSSException, ClientException
OSS
generateRtmpUri
in interface OSS
bucketName
- Bucket name.liveChannelName
- Live Channel name.PlaylistName
- The playlist file name such as playlist.m3u8.expires
- Expiration time in epoch time, such as 1459922563.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public String generateRtmpUri(GenerateRtmpUriRequest generateRtmpUriRequest) throws OSSException, ClientException
OSS
generateRtmpUri
in interface OSS
generateRtmpUriRequest
- A GenerateRtmpUriRequest
instance that specifies the
bucket name and the Live Channel name.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult createSymlink(String bucketName, String symLink, String targetObject) throws OSSException, ClientException
OSS
createSymlink
in interface OSS
bucketName
- Bucket name.symLink
- symlink name.targetObject
- target file key.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult createSymlink(CreateSymlinkRequest createSymlinkRequest) throws OSSException, ClientException
OSS
createSymlink
in interface OSS
createSymlinkRequest
- A CreateSymlinkRequest
instance that specifies the
bucket name, symlink name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public OSSSymlink getSymlink(String bucketName, String symLink) throws OSSException, ClientException
OSS
getSymlink
in interface OSS
bucketName
- Bucket name.symLink
- The symlink name.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public OSSSymlink getSymlink(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getSymlink
in interface OSS
genericRequest
- A GenericRequest
instance which specifies the bucket
name and symlink name.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GenericResult processObject(ProcessObjectRequest processObjectRequest) throws OSSException, ClientException
OSS
The supported process includes resize, rotate, crop, watermark, format,
udf, customized style, etc. The GenericResult
instance returned
must be closed by the calller to release connection via calling
getResponse().getContent().close().
processObject
in interface OSS
processObjectRequest
- A ProcessObjectRequest
instance that specifies the
bucket name, the object key and the process (such as
image/resize,w_500)GenericResult
instance which must be closed after the
usage by the caller.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketRequestPayment(String bucketName, Payer payer) throws OSSException, ClientException
OSS
Bucket
.setBucketRequestPayment
in interface OSS
bucketName
- The bucket name.payer
- The request payer settingVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketRequestPayment(SetBucketRequestPaymentRequest setBucketRequestPaymentRequest) throws OSSException, ClientException
OSS
Bucket
.setBucketRequestPayment
in interface OSS
setBucketRequestPaymentRequest
- A SetBucketRequestPaymentRequest
instance that has
the bucket name and payer setting.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketRequestPaymentResult getBucketRequestPayment(String bucketName) throws OSSException, ClientException
OSS
Bucket
.getBucketRequestPayment
in interface OSS
bucketName
- The bucket name.GetBucketRequestPaymentResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketRequestPaymentResult getBucketRequestPayment(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
.getBucketRequestPayment
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.GetBucketRequestPaymentResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketQosInfo(String bucketName, BucketQosInfo bucketQosInfo) throws OSSException, ClientException
OSS
Bucket
.setBucketQosInfo
in interface OSS
bucketName
- The bucket name.bucketQosInfo
- The bucket qos info settingVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketQosInfo(SetBucketQosInfoRequest setBucketQosInfoRequest) throws OSSException, ClientException
OSS
Bucket
.setBucketQosInfo
in interface OSS
setBucketQosInfoRequest
- SetBucketQosInfoRequest
instance that has the bucket name and bucket qos info.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public BucketQosInfo getBucketQosInfo(String bucketName) throws OSSException, ClientException
OSS
Bucket
.getBucketQosInfo
in interface OSS
bucketName
- The bucket name.BucketQosInfo
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public BucketQosInfo getBucketQosInfo(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
.getBucketQosInfo
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.BucketQosInfo
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketQosInfo(String bucketName) throws OSSException, ClientException
OSS
deleteBucketQosInfo
in interface OSS
bucketName
- The bucket nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketQosInfo(GenericRequest genericRequest) throws OSSException, ClientException
OSS
deleteBucketQosInfo
in interface OSS
genericRequest
- A GenericRequest
instance that has the bucket nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public UserQosInfo getUserQosInfo() throws OSSException, ClientException
OSS
getUserQosInfo
in interface OSS
UserQosInfo
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public SetAsyncFetchTaskResult setAsyncFetchTask(String bucketName, AsyncFetchTaskConfiguration asyncFetchTaskConfiguration) throws OSSException, ClientException
OSS
setAsyncFetchTask
in interface OSS
bucketName
- The bucket name.asyncFetchTaskConfiguration
- The async fetch task configuration.SetAsyncFetchTaskResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public SetAsyncFetchTaskResult setAsyncFetchTask(SetAsyncFetchTaskRequest setAsyncFetchTaskRequest) throws OSSException, ClientException
OSS
setAsyncFetchTask
in interface OSS
setAsyncFetchTaskRequest
- A SetAsyncFetchTaskRequest
instance that specified the bucket name
and the task configuration.SetAsyncFetchTaskResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetAsyncFetchTaskResult getAsyncFetchTask(String bucketName, String taskId) throws OSSException, ClientException
OSS
getAsyncFetchTask
in interface OSS
bucketName
- The bucket name.taskId
- The id of the task which you want to get.GetAsyncFetchTaskResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetAsyncFetchTaskResult getAsyncFetchTask(GetAsyncFetchTaskRequest getAsyncFetchTaskRequest) throws OSSException, ClientException
OSS
getAsyncFetchTask
in interface OSS
getAsyncFetchTaskRequest
- A GetAsyncFetchTaskRequest
instance that specified the bucket name
and the task id.GetAsyncFetchTaskResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public CreateVpcipResult createVpcip(CreateVpcipRequest createVpcipRequest) throws OSSException, ClientException
OSS
Vpcip
.createVpcip
in interface OSS
createVpcipRequest
- A CreateVpcipRequest
instance that specified the vpc information.CreateVpcipResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public List<Vpcip> listVpcip() throws OSSException, ClientException
OSS
Vpcip
instances of the current account.listVpcip
in interface OSS
Vpcip
instances. If there's no Vpcips, the
list will be empty (instead of null).OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteVpcip(DeleteVpcipRequest deleteVpcipRequest) throws OSSException, ClientException
OSS
Vpcip
instance.deleteVpcip
in interface OSS
deleteVpcipRequest
- A DeleteVpcipRequest
that specified the vpc policy.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult createBucketVpcip(CreateBucketVpcipRequest createBucketVpcipRequest) throws OSSException, ClientException
OSS
createBucketVpcip
in interface OSS
createBucketVpcipRequest
- A CreateBucketVpcipRequest
instance that specified the bucketName and the VpcPolicy
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketVpcip(DeleteBucketVpcipRequest deleteBucketVpcipRequest) throws OSSException, ClientException
OSS
VpcPolicy
instance that has binded to the bucket.deleteBucketVpcip
in interface OSS
deleteBucketVpcipRequest
- A DeleteBucketVpcipRequest
instance that has specified the bucketName and the VpcPolicy
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public List<VpcPolicy> getBucketVpcip(GenericRequest genericRequest) throws OSSException, ClientException
OSS
VpcPolicy
instances of the Bucket.getBucketVpcip
in interface OSS
genericRequest
- A GenericRequest
instance that include the bucket name.VpcPolicy
instances. If there's no list, the
list will be empty (instead of null).OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketInventoryConfiguration(String bucketName, InventoryConfiguration inventoryConfiguration) throws OSSException, ClientException
OSS
setBucketInventoryConfiguration
in interface OSS
bucketName
- The bucket name.inventoryConfiguration
- The inventory configuration.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketInventoryConfiguration(SetBucketInventoryConfigurationRequest setBucketInventoryConfigurationRequest) throws OSSException, ClientException
OSS
setBucketInventoryConfiguration
in interface OSS
setBucketInventoryConfigurationRequest
- The SetBucketInventoryConfigurationRequest
instance that has the inventory configuration.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketInventoryConfigurationResult getBucketInventoryConfiguration(String bucketName, String inventoryId) throws OSSException, ClientException
OSS
getBucketInventoryConfiguration
in interface OSS
bucketName
- The bucket name.inventoryId
- The id of the inventory configuration that want to get.GetBucketInventoryConfigurationResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketInventoryConfigurationResult getBucketInventoryConfiguration(GetBucketInventoryConfigurationRequest getBucketInventoryConfigurationRequest) throws OSSException, ClientException
OSS
getBucketInventoryConfiguration
in interface OSS
getBucketInventoryConfigurationRequest
- The GetBucketInventoryConfigurationRequest
instance that has the bucketName and the configuration id.GetBucketInventoryConfigurationResult
instance that has the result.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public ListBucketInventoryConfigurationsResult listBucketInventoryConfigurations(String bucketName) throws OSSException, ClientException
OSS
listBucketInventoryConfigurations
in interface OSS
bucketName
- The bucket name.ListBucketInventoryConfigurationsResult
object
containing the list of InventoryConfiguration
.OSSException
ClientException
public ListBucketInventoryConfigurationsResult listBucketInventoryConfigurations(String bucketName, String continuationToken) throws OSSException, ClientException
OSS
listBucketInventoryConfigurations
in interface OSS
bucketName
- The bucket name.continuationToken
- The continuation token allows list to be continued from a specific point.ListBucketInventoryConfigurationsResult
object containing the inventory configurations.OSSException
ClientException
public ListBucketInventoryConfigurationsResult listBucketInventoryConfigurations(ListBucketInventoryConfigurationsRequest listBucketInventoryConfigurationsRequest) throws OSSException, ClientException
OSS
listBucketInventoryConfigurations
in interface OSS
listBucketInventoryConfigurationsRequest
- The request object to list the inventory configurations in a bucket.ListBucketInventoryConfigurationsResult
object
containing the list of InventoryConfiguration
.OSSException
ClientException
public VoidResult deleteBucketInventoryConfiguration(String bucketName, String inventoryId) throws OSSException, ClientException
OSS
deleteBucketInventoryConfiguration
in interface OSS
bucketName
- The name of the bucket.inventoryId
- The id of the inventory configuration.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult deleteBucketInventoryConfiguration(DeleteBucketInventoryConfigurationRequest deleteBucketInventoryConfigurationRequest) throws OSSException, ClientException
OSS
deleteBucketInventoryConfiguration
in interface OSS
deleteBucketInventoryConfigurationRequest
- The request object for deleting an inventory configuration.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public InitiateBucketWormResult initiateBucketWorm(InitiateBucketWormRequest initiateBucketWormRequest) throws OSSException, ClientException
OSS
OSS support character of "Write Once Read Many". This method is intend to create a worm configuration that will be reserved for 24 hours unless you use the completeBucketWorm method to complete the worm configuration.
initiateBucketWorm
in interface OSS
initiateBucketWormRequest
- The InitiateBucketWormRequest
instance includes worm configuration.InitiateBucketWormResult
instance that contains worm id.OSSException
ClientException
public InitiateBucketWormResult initiateBucketWorm(String bucketName, int retentionPeriodInDays) throws OSSException, ClientException
OSS
OSS support character of "Write Once Read Many". This method is intend to create a worm configuration that will be reserved for 24 hours unless you use the completeBucketWorm method to complete the worm configuration.
initiateBucketWorm
in interface OSS
bucketName
- The name of the bucket.retentionPeriodInDays
- The object's retention days.InitiateBucketWormResult
instance that contains worm id.OSSException
ClientException
public VoidResult abortBucketWorm(GenericRequest genericRequest) throws OSSException, ClientException
OSS
abortBucketWorm
in interface OSS
genericRequest
- A GenericRequest
instance that include the bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult abortBucketWorm(String bucketName) throws OSSException, ClientException
OSS
abortBucketWorm
in interface OSS
bucketName
- The name of the bucket.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult completeBucketWorm(CompleteBucketWormRequest completeBucketWormRequest) throws OSSException, ClientException
OSS
completeBucketWorm
in interface OSS
completeBucketWormRequest
- A CompleteBucketWormRequest
instance that includes bucket name and worm id.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult completeBucketWorm(String bucketName, String wormId) throws OSSException, ClientException
OSS
completeBucketWorm
in interface OSS
bucketName
- The name of the bucket.wormId
- The id of the worm configuration you want to complete.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult extendBucketWorm(ExtendBucketWormRequest extendBucketWormRequest) throws OSSException, ClientException
OSS
extendBucketWorm
in interface OSS
extendBucketWormRequest
- A ExtendBucketWormRequest
instance that includes bucket name, worm id and retention days.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult extendBucketWorm(String bucketName, String wormId, int retentionPeriodInDays) throws OSSException, ClientException
OSS
extendBucketWorm
in interface OSS
bucketName
- The name of the bucket.wormId
- The id of the worm configuration you want to extend.retentionPeriodInDays
- The object's retention days.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public GetBucketWormResult getBucketWorm(GenericRequest genericRequest) throws OSSException, ClientException
OSS
getBucketWorm
in interface OSS
genericRequest
- A GenericRequest
instance that includes bucket name.GetBucketWormResult
instance that contains the worm configuration.OSSException
ClientException
public GetBucketWormResult getBucketWorm(String bucketName) throws OSSException, ClientException
OSS
getBucketWorm
in interface OSS
bucketName
- The name of the bucket.GetBucketWormResult
instance that contains the worm configuration.OSSException
ClientException
public VoidResult createDirectory(String bucketName, String dirName) throws OSSException, ClientException
OSS
createDirectory
in interface OSS
bucketName
- Bucket name.dirName
- Directory nameVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult createDirectory(CreateDirectoryRequest createDirectoryRequest) throws OSSException, ClientException
OSS
createDirectory
in interface OSS
createDirectoryRequest
- A CreateDirectoryRequest
instance that includes bucket name and directory name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public DeleteDirectoryResult deleteDirectory(String bucketName, String dirName) throws OSSException, ClientException
OSS
deleteDirectory
in interface OSS
bucketName
- Bucket name.dirName
- Directory nameDeleteDirectoryResult
instance contains delete number and next delete token.OSSException
ClientException
public DeleteDirectoryResult deleteDirectory(String bucketName, String dirName, boolean deleteRecursive, String nextDeleteToken) throws OSSException, ClientException
OSS
deleteDirectory
in interface OSS
bucketName
- Bucket name.dirName
- Directory name.deleteRecursive
- Whether delete recursively? true or false, default is false.nextDeleteToken
- Next delete token.DeleteDirectoryResult
instance contains delete number and next delete token.OSSException
ClientException
public DeleteDirectoryResult deleteDirectory(DeleteDirectoryRequest deleteDirectoryRequest) throws OSSException, ClientException
OSS
deleteDirectory
in interface OSS
deleteDirectoryRequest
- A DeleteDirectoryRequest
instance that includes bucket, directory name and other configurations.DeleteDirectoryResult
instance contains delete number and next delete token.OSSException
ClientException
public VoidResult renameObject(String bucketName, String sourceObjectName, String destinationObject) throws OSSException, ClientException
OSS
renameObject
in interface OSS
bucketName
- Bucket name.sourceObjectName
- The source of the object.destinationObject
- The destination of the object.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult renameObject(RenameObjectRequest renameObjectRequest) throws OSSException, ClientException
OSS
renameObject
in interface OSS
renameObjectRequest
- A RenameObjectRequest
instance that includes bucketName, source object name
and destination object name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
ClientException
public VoidResult setBucketResourceGroup(SetBucketResourceGroupRequest setBucketResourceGroupRequest) throws OSSException, ClientException
OSS
Bucket
.setBucketResourceGroup
in interface OSS
setBucketResourceGroupRequest
- A SetBucketResourceGroupRequest
instance that has
the resource group id setting.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketResourceGroupResult getBucketResourceGroup(String bucketName) throws OSSException, ClientException
OSS
Bucket
.getBucketResourceGroup
in interface OSS
bucketName
- The bucket name.GetBucketResourceGroupResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult createUdf(CreateUdfRequest createUdfRequest) throws OSSException, ClientException
OSS
createUdf
in interface OSS
createUdfRequest
- A CreateUdfRequest
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public UdfInfo getUdfInfo(UdfGenericRequest genericRequest) throws OSSException, ClientException
getUdfInfo
in interface OSS
OSSException
ClientException
public List<UdfInfo> listUdfs() throws OSSException, ClientException
listUdfs
in interface OSS
OSSException
ClientException
public VoidResult deleteUdf(UdfGenericRequest genericRequest) throws OSSException, ClientException
deleteUdf
in interface OSS
OSSException
ClientException
public VoidResult uploadUdfImage(UploadUdfImageRequest uploadUdfImageRequest) throws OSSException, ClientException
uploadUdfImage
in interface OSS
OSSException
ClientException
public List<UdfImageInfo> getUdfImageInfo(UdfGenericRequest genericRequest) throws OSSException, ClientException
getUdfImageInfo
in interface OSS
OSSException
ClientException
public VoidResult deleteUdfImage(UdfGenericRequest genericRequest) throws OSSException, ClientException
deleteUdfImage
in interface OSS
OSSException
ClientException
public VoidResult createUdfApplication(CreateUdfApplicationRequest createUdfApplicationRequest) throws OSSException, ClientException
createUdfApplication
in interface OSS
OSSException
ClientException
public UdfApplicationInfo getUdfApplicationInfo(UdfGenericRequest genericRequest) throws OSSException, ClientException
getUdfApplicationInfo
in interface OSS
OSSException
ClientException
public List<UdfApplicationInfo> listUdfApplications() throws OSSException, ClientException
listUdfApplications
in interface OSS
OSSException
ClientException
public VoidResult deleteUdfApplication(UdfGenericRequest genericRequest) throws OSSException, ClientException
deleteUdfApplication
in interface OSS
OSSException
ClientException
public VoidResult upgradeUdfApplication(UpgradeUdfApplicationRequest upgradeUdfApplicationRequest) throws OSSException, ClientException
upgradeUdfApplication
in interface OSS
OSSException
ClientException
public VoidResult resizeUdfApplication(ResizeUdfApplicationRequest resizeUdfApplicationRequest) throws OSSException, ClientException
resizeUdfApplication
in interface OSS
OSSException
ClientException
public UdfApplicationLog getUdfApplicationLog(GetUdfApplicationLogRequest getUdfApplicationLogRequest) throws OSSException, ClientException
getUdfApplicationLog
in interface OSS
OSSException
ClientException
public VoidResult setBucketTransferAcceleration(String bucketName, boolean enable) throws OSSException, ClientException
OSS
setBucketTransferAcceleration
in interface OSS
bucketName
- The bucket name.enable
- The transfer acceleration status, true or false.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public TransferAcceleration getBucketTransferAcceleration(String bucketName) throws OSSException, ClientException
OSS
getBucketTransferAcceleration
in interface OSS
bucketName
- The bucket name.TransferAcceleration
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketTransferAcceleration(String bucketName) throws OSSException, ClientException
OSS
deleteBucketTransferAcceleration
in interface OSS
bucketName
- The bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult putBucketAccessMonitor(String bucketName, String status) throws OSSException, ClientException
OSS
putBucketAccessMonitor
in interface OSS
bucketName
- The bucket name.status
- The bucket access monitor status.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public AccessMonitor getBucketAccessMonitor(String bucketName) throws OSSException, ClientException
OSS
getBucketAccessMonitor
in interface OSS
bucketName
- The bucket name.AccessMonitor
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult openMetaQuery(String bucketName) throws OSSException, ClientException
OSS
openMetaQuery
in interface OSS
bucketName
- The bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetMetaQueryStatusResult getMetaQueryStatus(String bucketName) throws OSSException, ClientException
OSS
getMetaQueryStatus
in interface OSS
bucketName
- The bucket name.GetMetaQueryStatusResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public DoMetaQueryResult doMetaQuery(DoMetaQueryRequest doMetaQueryRequest) throws OSSException, ClientException
OSS
doMetaQuery
in interface OSS
doMetaQueryRequest
- The DoMetaQueryRequest
instanceDoMetaQueryResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult closeMetaQuery(String bucketName) throws OSSException, ClientException
OSS
closeMetaQuery
in interface OSS
bucketName
- The bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public DescribeRegionsResult describeRegions(DescribeRegionsRequest describeRegionsRequest) throws OSSException, ClientException
OSS
describeRegions
in interface OSS
describeRegionsRequest
- The DescribeRegionsRequest
instanceDescribeRegionsResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult setBucketCallbackPolicy(SetBucketCallbackPolicyRequest setBucketCallbackPolicyRequest) throws OSSException, ClientException
OSS
Bucket
instance.setBucketCallbackPolicy
in interface OSS
setBucketCallbackPolicyRequest
- SetBucketCallbackPolicyRequest
instance that has bucket
information as well as policy information.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketCallbackPolicyResult getBucketCallbackPolicy(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.getBucketCallbackPolicy
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.InputStream
.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketCallbackPolicy(GenericRequest genericRequest) throws OSSException, ClientException
OSS
Bucket
instance.deleteBucketCallbackPolicy
in interface OSS
genericRequest
- GenericRequest
instance that has the bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public AsyncProcessObjectResult asyncProcessObject(AsyncProcessObjectRequest asyncProcessObjectRequest) throws OSSException, ClientException
OSS
The supported async process includes resize, rotate, crop, watermark, format, udf, customized style, etc.
asyncProcessObject
in interface OSS
asyncProcessObjectRequest
- A AsyncProcessObjectRequest
instance that specifies the
bucket name, the object key and the process (such as
video/convert,f_mp4,vcodec_h265,s_1920x1080,vb_2000000,fps_30,acodec_aac,ab_100000,sn_1)AsyncProcessObjectResult
instance which must be closed after the
usage by the caller.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult writeGetObjectResponse(WriteGetObjectResponseRequest writeGetObjectResponseRequest) throws OSSException, ClientException
OSS
writeGetObjectResponse
in interface OSS
writeGetObjectResponseRequest
- The WriteGetObjectResponseRequest
instanceVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult putBucketArchiveDirectRead(PutBucketArchiveDirectReadRequest request) throws OSSException, ClientException
OSS
putBucketArchiveDirectRead
in interface OSS
request
- The PutBucketArchiveDirectReadRequest
instanceVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketArchiveDirectReadResult getBucketArchiveDirectRead(String bucketName) throws OSSException, ClientException
OSS
getBucketArchiveDirectRead
in interface OSS
bucketName
- The bucket name.GetBucketArchiveDirectReadResult
instanceOSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult putBucketHttpsConfig(PutBucketHttpsConfigRequest putBucketHttpsConfigRequest) throws OSSException, ClientException
OSS
putBucketHttpsConfig
in interface OSS
putBucketHttpsConfigRequest
- The PutBucketHttpsConfigRequest
instanceVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketHttpsConfigResult getBucketHttpsConfig(String bucketName) throws OSSException, ClientException
OSS
getBucketHttpsConfig
in interface OSS
bucketName
- The bucket name.GetBucketHttpsConfigResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult putPublicAccessBlock(PutPublicAccessBlockRequest putPublicAccessBlockRequest) throws OSSException, ClientException
OSS
putPublicAccessBlock
in interface OSS
putPublicAccessBlockRequest
- The PutPublicAccessBlockRequest
instanceVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetPublicAccessBlockResult getPublicAccessBlock() throws OSSException, ClientException
OSS
getPublicAccessBlock
in interface OSS
GetPublicAccessBlockResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deletePublicAccessBlock() throws OSSException, ClientException
OSS
deletePublicAccessBlock
in interface OSS
VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult putBucketPublicAccessBlock(PutBucketPublicAccessBlockRequest putBucketPublicAccessBlockRequest) throws OSSException, ClientException
OSS
putBucketPublicAccessBlock
in interface OSS
VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketPublicAccessBlockResult getBucketPublicAccessBlock(String bucketName) throws OSSException, ClientException
OSS
getBucketPublicAccessBlock
in interface OSS
bucketName
- The bucket name.GetBucketPublicAccessBlockResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketPublicAccessBlock(String bucketName) throws OSSException, ClientException
OSS
deleteBucketPublicAccessBlock
in interface OSS
bucketName
- The bucket name.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketPolicyStatusResult getBucketPolicyStatus(String bucketName) throws OSSException, ClientException
OSS
getBucketPolicyStatus
in interface OSS
bucketName
- The bucket name.GetBucketPolicyStatusResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public CreateBucketDataRedundancyTransitionResult createBucketDataRedundancyTransition(String bucketName) throws OSSException, ClientException
OSS
createBucketDataRedundancyTransition
in interface OSS
bucketName
- The bucket name.CreateBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public CreateBucketDataRedundancyTransitionResult createBucketDataRedundancyTransition(String bucketName, String targetType) throws OSSException, ClientException
OSS
createBucketDataRedundancyTransition
in interface OSS
bucketName
- the bucket nametargetType
- the target typeCreateBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public CreateBucketDataRedundancyTransitionResult createBucketDataRedundancyTransition(String bucketName, DataRedundancyType targetType) throws OSSException, ClientException
OSS
createBucketDataRedundancyTransition
in interface OSS
bucketName
- the bucket nametargetType
- the target typeCreateBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public CreateBucketDataRedundancyTransitionResult createBucketDataRedundancyTransition(CreateBucketDataRedundancyTransitionRequest createBucketDataRedundancyTransitionRequest) throws OSSException, ClientException
OSS
Bucket
instance.createBucketDataRedundancyTransition
in interface OSS
createBucketDataRedundancyTransitionRequest
- A CreateBucketDataRedundancyTransitionRequest
instance.CreateBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketDataRedundancyTransitionResult getBucketDataRedundancyTransition(String bucketName, String taskId) throws OSSException, ClientException
OSS
getBucketDataRedundancyTransition
in interface OSS
bucketName
- the bucket nametaskId
- the task idGetBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetBucketDataRedundancyTransitionResult getBucketDataRedundancyTransition(GetBucketDataRedundancyTransitionRequest getBucketDataRedundancyTransitionRequest) throws OSSException, ClientException
OSS
getBucketDataRedundancyTransition
in interface OSS
getBucketDataRedundancyTransitionRequest
- A GetBucketDataRedundancyTransitionRequest
instance.GetBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketDataRedundancyTransition(String bucketName, String taskId) throws OSSException, ClientException
OSS
deleteBucketDataRedundancyTransition
in interface OSS
bucketName
- the bucket nametaskId
- the task idVoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteBucketDataRedundancyTransition(DeleteBucketDataRedundancyTransitionRequest deleteBucketDataRedundancyTransitionRequest) throws OSSException, ClientException
OSS
deleteBucketDataRedundancyTransition
in interface OSS
deleteBucketDataRedundancyTransitionRequest
- A DeleteBucketDataRedundancyTransitionRequest
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public ListUserDataRedundancyTransitionResult listUserDataRedundancyTransition(ListUserDataRedundancyTransitionRequest listUserDataRedundancyTransitionRequest) throws OSSException, ClientException
OSS
listUserDataRedundancyTransition
in interface OSS
listUserDataRedundancyTransitionRequest
- A ListUserDataRedundancyTransitionRequest
instance.ListUserDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public List<GetBucketDataRedundancyTransitionResult> listBucketDataRedundancyTransition(String bucketName) throws OSSException, ClientException
OSS
listBucketDataRedundancyTransition
in interface OSS
bucketName
- the bucket name.GetBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public List<GetBucketDataRedundancyTransitionResult> listBucketDataRedundancyTransition(GenericRequest request) throws OSSException, ClientException
OSS
listBucketDataRedundancyTransition
in interface OSS
request
- A GenericRequest
instance.GetBucketDataRedundancyTransitionResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public CreateAccessPointResult createAccessPoint(CreateAccessPointRequest createAccessPointRequest) throws OSSException, ClientException
OSS
createAccessPoint
in interface OSS
createAccessPointRequest
- A CreateAccessPointRequest
instance.CreateAccessPointResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetAccessPointResult getAccessPoint(GetAccessPointRequest getAccessPointRequest) throws OSSException, ClientException
OSS
getAccessPoint
in interface OSS
getAccessPointRequest
- A GetAccessPointRequest
instance.GetAccessPointResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteAccessPoint(DeleteAccessPointRequest deleteAccessPointRequest) throws OSSException, ClientException
OSS
deleteAccessPoint
in interface OSS
deleteAccessPointRequest
- A DeleteAccessPointRequest
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult putAccessPointPolicy(PutAccessPointPolicyRequest putAccessPointPolicyRequest) throws OSSException, ClientException
OSS
putAccessPointPolicy
in interface OSS
putAccessPointPolicyRequest
- A PutAccessPointPolicyRequest
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public GetAccessPointPolicyResult getAccessPointPolicy(GetAccessPointPolicyRequest getAccessPointPolicyRequest) throws OSSException, ClientException
OSS
getAccessPointPolicy
in interface OSS
getAccessPointPolicyRequest
- A GetAccessPointPolicyRequest
instance.GetAccessPointPolicyResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public VoidResult deleteAccessPointPolicy(DeleteAccessPointPolicyRequest deleteAccessPointPolicyRequest) throws OSSException, ClientException
OSS
deleteAccessPointPolicy
in interface OSS
deleteAccessPointPolicyRequest
- A DeleteAccessPointPolicyRequest
instance.VoidResult
instance wrapped void return and
contains some basic response options, such as requestId.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public ListAccessPointsResult listAccessPoints(ListAccessPointsRequest listAccessPointsRequest) throws OSSException, ClientException
OSS
Bucket
in the parameter of
ListObjectsRequest
listAccessPoints
in interface OSS
listAccessPointsRequest
- The ListAccessPointsRequest
instance that defines the
access point as well as the criteria such as max keys, continuation token.ListAccessPointsResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public ListAccessPointsResult listBucketAccessPoints(ListBucketAccessPointsRequest listBucketAccessPointsRequest) throws OSSException, ClientException
OSS
Bucket
in the parameter of
ListObjectsRequest
listBucketAccessPoints
in interface OSS
listBucketAccessPointsRequest
- The ListBucketAccessPointsRequest
instance that defines the
access point as well as the criteria such as max keys, continuation token.ListAccessPointsResult
instance.OSSException
- If any errors are encountered in the client while making the
request or handling the response.ClientException
- If any errors occurred in OSS while processing the request.public void shutdown()
OSS
public String getConnectionPoolStats()
OSS
getConnectionPoolStats
in interface OSS
Copyright © 2024. All Rights Reserved.