public interface OSS
Object Store Service (a.k.a OSS) is the massive, secure, low cost
and highly reliable public storage which could be accessed from anywhere at anytime via REST APIs,
SDKs or web console.
Developers could use OSS to create any services that need huge data storage and access throughput,
such as media sharing web apps, cloud storage service or enterprise or personal data backup.
限定符和类型 | 方法和说明 |
---|---|
void |
abortMultipartUpload(AbortMultipartUploadRequest request)
Abort a multiple parts upload.
|
void |
addBucketCname(AddBucketCnameRequest addBucketCnameRequest)
Adds a Cname for the
Bucket instance. |
void |
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 . |
String |
calculatePostSignature(String postPolicy)
Calculates the signature based on the policy and access key secret.
|
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.
|
Bucket |
createBucket(CreateBucketRequest createBucketRequest)
Creates a
Bucket instance with specified CreateBucketRequest information. |
Bucket |
createBucket(String bucketName)
Creates
Bucket instance. |
CreateLiveChannelResult |
createLiveChannel(CreateLiveChannelRequest createLiveChannelRequest)
Creates a live streaming channel.
|
void |
createSymlink(CreateSymlinkRequest createSymlinkRequest)
Creates a symbol link to a target file under the bucket---this is not supported for archive class bucket.
|
void |
createSymlink(String bucketName,
String symlink,
String target)
Creates a symlink link to a target file under the bucket---this is not supported for archive class bucket.
|
void |
createUdf(CreateUdfRequest createUdfRequest)
Creates UDF
|
void |
createUdfApplication(CreateUdfApplicationRequest createUdfApplicationRequest) |
void |
deleteBucket(GenericRequest genericRequest)
Deletes the
Bucket instance. |
void |
deleteBucket(String bucketName)
Deletes the
Bucket instance. |
void |
deleteBucketCname(DeleteBucketCnameRequest deleteBucketCnameRequest)
Deletes one
Bucket 's specific Cname specified by the parameter domain. |
void |
deleteBucketCname(String bucketName,
String domain)
Deletes one
Bucket 's Cname specified by the parameter domain. |
void |
deleteBucketCORSRules(GenericRequest genericRequest)
Deletes all CORS rules under the bucket.
|
void |
deleteBucketCORSRules(String bucketName)
Deletes all CORS rules under the bucket.
|
void |
deleteBucketImage(String bucketName)
Deletes the image processing attributes on the specific
Bucket . |
void |
deleteBucketImage(String bucketName,
GenericRequest genericRequest)
Deletes the image processing attributes on the specific
Bucket . |
void |
deleteBucketLifecycle(GenericRequest genericRequest)
Deletes all the
Bucket 's Lifecycle rules. |
void |
deleteBucketLifecycle(String bucketName)
Deletes all the
Bucket 's Lifecycle rules. |
void |
deleteBucketLogging(GenericRequest genericRequest)
Disables the logging on
Bucket . |
void |
deleteBucketLogging(String bucketName)
Disables the logging on
Bucket . |
void |
deleteBucketReplication(DeleteBucketReplicationRequest deleteBucketReplicationRequest)
Deletes the specified
Bucket 's cross region replication rule. |
void |
deleteBucketReplication(String bucketName,
String replicationRuleID)
Deletes the specified
Bucket 's cross region replication rule. |
void |
deleteBucketTagging(GenericRequest genericRequest)
Clears all the tags of the
Bucket instance. |
void |
deleteBucketTagging(String bucketName)
Clears all the tags of the
Bucket instance。 |
void |
deleteBucketWebsite(GenericRequest genericRequest)
Deletes the
Bucket 's static website configuration, which means disabling the static website on the bucket. |
void |
deleteBucketWebsite(String bucketName)
Deletes the
Bucket 's static website configuration, which means disabling the static website on the bucket. |
void |
deleteImageStyle(String bucketName,
String styleName)
Deletes a style named by parameter styleName under
Bucket |
void |
deleteImageStyle(String bucketName,
String styleName,
GenericRequest genericRequest)
Deletes a style named by parameter styleName under
Bucket |
void |
deleteLiveChannel(LiveChannelGenericRequest liveChannelGenericRequest)
Deletes the Live Channel。
|
void |
deleteLiveChannel(String bucketName,
String liveChannel)
Deletes the Live Channel.
|
void |
deleteObject(GenericRequest genericRequest)
Deletes the specified
OSSObject by the GenericRequest instance. |
void |
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.
|
void |
deleteUdf(UdfGenericRequest genericRequest) |
void |
deleteUdfApplication(UdfGenericRequest genericRequest) |
void |
deleteUdfImage(UdfGenericRequest genericRequest) |
boolean |
doesBucketExist(GenericRequest genericRequest)
Checks if the
Bucket exists。 |
boolean |
doesBucketExist(String bucketName)
Checks the
Bucket exists . |
boolean |
doesObjectExist(GenericRequest genericRequest)
|
boolean |
doesObjectExist(HeadObjectRequest headObjectRequest)
已过时。
|
boolean |
doesObjectExist(String bucketName,
String key)
|
boolean |
doesObjectExist(String bucketName,
String key,
boolean isOnlyInOSS)
|
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.
|
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 generatePushflowUrlRequest)
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.
|
void |
generateVodPlaylist(GenerateVodPlaylistRequest generateVodPlaylistRequest)
Generates a VOD playlist (*.m3u8 file) for the *.ts files with specified time range under the Live Channel.
|
void |
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.
|
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. |
List<CnameConfiguration> |
getBucketCname(GenericRequest genericRequest)
Gets the
Bucket 's Cnames. |
List<CnameConfiguration> |
getBucketCname(String bucketName)
Gets the
Bucket 's Cnames. |
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.
|
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. |
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. |
BucketProcess |
getBucketProcess(GenericRequest genericRequest)
Get the bucket's image accessing configuration
|
BucketProcess |
getBucketProcess(String bucketName)
Gets the bucket's image accessing configuration.
|
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. |
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. |
BucketWebsiteResult |
getBucketWebsite(GenericRequest genericRequest)
Gets the
Bucket 's static webite settings. |
BucketWebsiteResult |
getBucketWebsite(String bucketName)
Gets the
Bucket 's static website settings. |
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.
|
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 . |
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) |
InitiateMultipartUploadResult |
initiateMultipartUpload(InitiateMultipartUploadRequest request)
Initiates a multiple part upload
Prior to starting a multiple part upload, this method needs to be called to ask OSS service do some initialization
work.
|
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. |
PartListing |
listParts(ListPartsRequest request)
Lists all parts in a multiple parts upload.
|
List<UdfApplicationInfo> |
listUdfApplications() |
List<UdfInfo> |
listUdfs() |
ResponseMessage |
optionsObject(OptionsRequest request)
已过时。
|
GenericResult |
processObject(ProcessObjectRequest processObjectRequest)
Apply process on the specified image file.
|
void |
putBucketImage(PutBucketImageRequest request)
Sets image processing attributes on the specific
Bucket |
void |
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.
|
void |
resizeUdfApplication(ResizeUdfApplicationRequest resizeUdfApplicationRequest) |
RestoreObjectResult |
restoreObject(GenericRequest genericRequest)
Restores the object of archive storage.
|
RestoreObjectResult |
restoreObject(String bucketName,
String key)
Restores the object of archive storage.
|
void |
setBucketAcl(SetBucketAclRequest setBucketAclRequest)
Sends the request to apply ACL on a
Bucket instance. |
void |
setBucketAcl(String bucketName,
CannedAccessControlList acl)
Applies the Access Control List(ACL) on the
Bucket . |
void |
setBucketCORS(SetBucketCORSRequest request)
Adds CORS rules to the bucket.
|
void |
setBucketLifecycle(SetBucketLifecycleRequest setBucketLifecycleRequest)
Sets the
Bucket 's lifecycle rule. |
void |
setBucketLogging(SetBucketLoggingRequest request)
Enables or disables the
Bucket 's logging. |
void |
setBucketProcess(SetBucketProcessRequest setBucketProcessRequest)
Creates the image accessing configuration according to the parameter setBucketProcessRequest.
|
void |
setBucketReferer(SetBucketRefererRequest setBucketRefererRequest)
Sets the http referer on the
Bucket instance in the parameter setBucketRefererRequest. |
void |
setBucketReferer(String bucketName,
BucketReferer referer)
Sets the http referer on the
Bucket instance specified by the bucket name. |
void |
setBucketStorageCapacity(SetBucketStorageCapacityRequest setBucketStorageCapacityRequest)
Sets the capacity of the
Bucket . |
void |
setBucketStorageCapacity(String bucketName,
UserQos userQos)
Sets the capacity of the
Bucket . |
void |
setBucketTagging(SetBucketTaggingRequest setBucketTaggingRequest)
Sets the tags on the
Bucket instance in SetBucketTaggingRequest object. |
void |
setBucketTagging(String bucketName,
Map<String,String> tags)
Sets the tags on the
Bucket instance specified by the bucket name |
void |
setBucketTagging(String bucketName,
TagSet tagSet)
Sets the tags on the
Bucket instance. |
void |
setBucketWebsite(SetBucketWebsiteRequest setBucketWebSiteRequest)
Sets the static website settings for the
Bucket . |
void |
setLiveChannelStatus(SetLiveChannelRequest setLiveChannelRequest)
Sets the Live Channel status.
|
void |
setLiveChannelStatus(String bucketName,
String liveChannel,
LiveChannelStatus status)
Sets the Live Channel status.
|
void |
setObjectAcl(SetObjectAclRequest setObjectAclRequest)
Sets the Access Control List (ACL) on a
OSSObject instance. |
void |
setObjectAcl(String bucketName,
String key,
CannedAccessControlList cannedAcl)
Sets the Access Control List (ACL) on a
OSSObject instance. |
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 |
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
|
void |
uploadUdfImage(UploadUdfImageRequest uploadUdfImageRequest) |
void switchCredentials(Credentials creds)
creds
- the credential to switch to。void shutdown()
Bucket createBucket(String bucketName) throws OSSException, ClientException
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.bucketName
- bucket nameOSSException
ClientException
Bucket createBucket(CreateBucketRequest createBucketRequest) throws OSSException, ClientException
Bucket
instance with specified CreateBucketRequest information.createBucketRequest
- instance of CreateBucketRequest
, which at least has bucket name information.OSSException
ClientException
void deleteBucket(String bucketName) throws OSSException, ClientException
Bucket
instance.
A non-empty bucket could not be deleted.bucketName
- bucket name to delete.OSSException
ClientException
void deleteBucket(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
instance.genericRequest
- the generic request instance that has the bucket name information.OSSException
ClientException
List<Bucket> listBuckets() throws OSSException, ClientException
Bucket
instances of the current account.Bucket
instances. If there's no buckets, the list will be empty (instead of null).OSSException
ClientException
BucketList listBuckets(String prefix, String marker, Integer maxKeys) throws OSSException, ClientException
Bucket
instances of the current account that meet the conditions specified.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
ClientException
BucketList listBuckets(ListBucketsRequest listBucketsRequest) throws OSSException, ClientException
Bucket
instances of the current account that meet the conditions specified.listBucketsRequest
- the ListBucketsRequest instance that defines the criteria which could have requirements on prefix, marker,
maxKeys.Bucket
instances.OSSException
ClientException
void setBucketAcl(String bucketName, CannedAccessControlList acl) throws OSSException, ClientException
Bucket
.bucketName
- Bucket name.acl
- CannedAccessControlList
instance.
If the instance is null, no ACL change on the bucket (but the request is still sent).OSSException
ClientException
void setBucketAcl(SetBucketAclRequest setBucketAclRequest) throws OSSException, ClientException
Bucket
instance.setBucketAclRequest
- SetBucketAclRequest instance which specifies the ACL and the bucket information.OSSException
ClientException
AccessControlList getBucketAcl(String bucketName) throws OSSException, ClientException
Bucket
instance.bucketName
- Bucket Name.AccessControlList
.OSSException
ClientException
AccessControlList getBucketAcl(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
instance.genericRequest
- GenericRequest
instance that has the bucket name information.AccessControlList
instance.OSSException
ClientException
void setBucketReferer(String bucketName, BucketReferer referer) throws OSSException, ClientException
Bucket
instance specified by the bucket name.bucketName
- Bucket name.referer
- The BucketReferer
instance. If null, it would create a BucketReferer
instance
from default constructor.OSSException
ClientException
void setBucketReferer(SetBucketRefererRequest setBucketRefererRequest) throws OSSException, ClientException
Bucket
instance in the parameter setBucketRefererRequest.setBucketRefererRequest
- SetBucketRefererRequest
instance that specify the bucket name and the BucketReferer
instance.OSSException
ClientException
BucketReferer getBucketReferer(String bucketName) throws OSSException, ClientException
Bucket
specified by bucket name.bucketName
- Bucket nameBucketReferer
instance. The BucketReferer object with empty referer information is returned if
there's no http referer information.OSSException
ClientException
BucketReferer getBucketReferer(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
specified by bucket name in GenericRequest object.genericRequest
- GenericRequest
instance that has the bucket name.BucketReferer
。OSSException
ClientException
String getBucketLocation(String bucketName) throws OSSException, ClientException
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.bucketName
- Bucket name.OSSException
ClientException
String getBucketLocation(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
instance specified by GenericRequest is hosted.genericRequest
- GenericRequest
instance with bucket name information.OSSException
ClientException
void setBucketTagging(String bucketName, Map<String,String> tags) throws OSSException, ClientException
Bucket
instance specified by the bucket namebucketName
- Bucket name.tags
- The dictionary that contains the tags in the form of OSSException
ClientException
void setBucketTagging(String bucketName, TagSet tagSet) throws OSSException, ClientException
Bucket
instance.bucketName
- Bucket name.tagSet
- TagSet
instance that has the tags in the form of OSSException
ClientException
void setBucketTagging(SetBucketTaggingRequest setBucketTaggingRequest) throws OSSException, ClientException
Bucket
instance in SetBucketTaggingRequest
object.setBucketTaggingRequest
- SetBucketTaggingRequest
instance that has bucket information as well as tagging information.OSSException
ClientException
TagSet getBucketTagging(String bucketName) throws OSSException, ClientException
Bucket
instance.bucketName
- Bucket nameTagSet
instance. If there's no tag, the TagSet object with empty tag information is returned.OSSException
ClientException
TagSet getBucketTagging(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
instance.genericRequest
- GenericRequest
instance that has the bucket name.TagSet
instance.OSSException
ClientException
void deleteBucketTagging(String bucketName) throws OSSException, ClientException
Bucket
instance。bucketName
- Bucket nameOSSException
ClientException
void deleteBucketTagging(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
instance.genericRequest
- GenericRequest
instance that has the bucket nameOSSException
ClientException
boolean doesBucketExist(String bucketName) throws OSSException, ClientException
Bucket
exists .bucketName
- Bucket name.OSSException
ClientException
boolean doesBucketExist(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
exists。genericRequest
- GenericRequest
instance that has the bucket name.OSSException
ClientException
ObjectListing listObjects(String bucketName) throws OSSException, ClientException
Bucket
bucketName
- Bucket nameObjectListing
instance that has all objects.OSSException
ClientException
ObjectListing listObjects(String bucketName, String prefix) throws OSSException, ClientException
Bucket
with the specified prefix.bucketName
- Bucket name.prefix
- The prefix returned object must have.ObjectListing
instance that has all objectsOSSException
ClientException
ObjectListing listObjects(ListObjectsRequest listObjectsRequest) throws OSSException, ClientException
Bucket
in the parameter of ListObjectsRequest
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
ClientException
PutObjectResult putObject(String bucketName, String key, InputStream input) throws OSSException, ClientException
Bucket
from the InputStream
instance.
It overwrites the existing one and the bucket must exist.bucketName
- Bucket name.key
- object key.input
- InputStream
instance to write from. The must be readable.OSSException
ClientException
PutObjectResult putObject(String bucketName, String key, InputStream input, ObjectMetadata metadata) throws OSSException, ClientException
Bucket
from the @{link InputStream} with the ObjectMetadata
information。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.OSSException
ClientException
PutObjectResult putObject(String bucketName, String key, File file, ObjectMetadata metadata) throws OSSException, ClientException
Bucket
from the file with the ObjectMetadata
.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.OSSException
ClientException
PutObjectResult putObject(String bucketName, String key, File file) throws OSSException, ClientException
Bucket
from the file.bucketName
- Bucket name.key
- Object key.file
- File object to read from.OSSException
ClientException
PutObjectResult putObject(PutObjectRequest putObjectRequest) throws OSSException, ClientException
Bucket
.putObjectRequest
- The PutObjectRequest
instance that has bucket name, object key, metadata
information.PutObjectResult
instance.OSSException
ClientException
PutObjectResult putObject(URL signedUrl, String filePath, Map<String,String> requestHeaders) throws OSSException, ClientException
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
ClientException
PutObjectResult putObject(URL signedUrl, String filePath, Map<String,String> requestHeaders, boolean useChunkEncoding) throws OSSException, ClientException
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
ClientException
PutObjectResult putObject(URL signedUrl, InputStream requestContent, long contentLength, Map<String,String> requestHeaders) throws OSSException, ClientException
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
ClientException
PutObjectResult putObject(URL signedUrl, InputStream requestContent, long contentLength, Map<String,String> requestHeaders, boolean useChunkEncoding) throws OSSException, ClientException
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
ClientException
CopyObjectResult copyObject(String sourceBucketName, String sourceKey, String destinationBucketName, String destinationKey) throws OSSException, ClientException
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
ClientException
CopyObjectResult copyObject(CopyObjectRequest copyObjectRequest) throws OSSException, ClientException
copyObjectRequest
- A CopyObjectRequest
instance that specifies source file, source bucket and target file, target
bucket。CopyObjectResult
instance.OSSException
ClientException
OSSObject getObject(String bucketName, String key) throws OSSException, ClientException
bucketName
- Bucket name.key
- Object Key.OSSObject
instance. The caller is responsible to close the connection after usage.OSSException
ClientException
ObjectMetadata getObject(GetObjectRequest getObjectRequest, File file) throws OSSException, ClientException
GetObjectRequest
parameter.getObjectRequest
- A GetObjectRequest
instance which specifies bucket name and object key.file
- Target file instance to download as.OSSException
ClientException
OSSObject getObject(GetObjectRequest getObjectRequest) throws OSSException, ClientException
OSSObject
from the bucket specified in GetObjectRequest
parameter.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
ClientException
OSSObject getObject(URL signedUrl, Map<String,String> requestHeaders) throws OSSException, ClientException
OSSObject
from the signed Url.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
ClientException
SimplifiedObjectMeta getSimplifiedObjectMeta(String bucketName, String key) throws OSSException, ClientException
OSSObject
.
Simplified metadata includes ETag, Size, LastModified and thus it's more lightweight then GetObjectMeta().
bucketName
- Bucket name.key
- Object key.SimplifiedObjectMeta
instance of the object.OSSException
ClientException
SimplifiedObjectMeta getSimplifiedObjectMeta(GenericRequest genericRequest) throws OSSException, ClientException
OSSObject
.
Simplified metadata includes ETag, Size, LastModified and thus it's more lightweight then GetObjectMeta().
genericRequest
- Generic request which specifies the bucket name and object keySimplifiedObjectMeta
instance of specified file.OSSException
ClientException
ObjectMetadata getObjectMetadata(String bucketName, String key) throws OSSException, ClientException
OSSObject
.bucketName
- Bucket name.key
- Object key.ObjectMetadata
instance.OSSException
ClientException
ObjectMetadata getObjectMetadata(GenericRequest genericRequest) throws OSSException, ClientException
OSSObject
.genericRequest
- Generic request which specifies the bucket name and object key.ObjectMetadata
instance.OSSException
ClientException
AppendObjectResult appendObject(AppendObjectRequest appendObjectRequest) throws OSSException, ClientException
AppendObjectRequest
. It's not applicable to normal
OSS object.appendObjectRequest
- A AppendObjectRequest
instance which specifies the bucket name, appendable object key, the
file or the InputStream object to append.AppendObjectResult
instance.OSSException
ClientException
void deleteObject(String bucketName, String key) throws OSSException, ClientException
OSSObject
by bucket name and object key.bucketName
- Bucket name.key
- Object key.OSSException
ClientException
void deleteObject(GenericRequest genericRequest) throws OSSException, ClientException
OSSObject
by the GenericRequest
instance.genericRequest
- The GenericRequest
instance that specfies the bucket name and object key.OSSException
ClientException
DeleteObjectsResult deleteObjects(DeleteObjectsRequest deleteObjectsRequest) throws OSSException, ClientException
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
ClientException
boolean doesObjectExist(String bucketName, String key) throws OSSException, ClientException
OSSObject
exists under the specific Bucket
. 302 Redirect or OSS mirroring
will not impact the result of this function.bucketName
- Bucket name.key
- Object Key.OSSException
ClientException
boolean doesObjectExist(GenericRequest genericRequest) throws OSSException, ClientException
OSSObject
exists under the specific Bucket
. 302 Redirect or OSS mirroring
will not impact the result of this function.genericRequest
- A GenericRequest
instance which specifies the bucket and object key.OSSException
ClientException
boolean doesObjectExist(String bucketName, String key, boolean isOnlyInOSS)
OSSObject
exists under the specific Bucket
. 302 Redirect or OSS mirroring
will impact the result of this function if isOnlyInOSS is true.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 boolean doesObjectExist(HeadObjectRequest headObjectRequest) throws OSSException, ClientException
OSSObject
exists.headObjectRequest
- A HeadObjectRequest
instance which specifies the bucket name and object key. Constraint
information is ignored.OSSException
ClientException
void setObjectAcl(String bucketName, String key, CannedAccessControlList cannedAcl) throws OSSException, ClientException
OSSObject
instance.bucketName
- Bucket name.key
- Object Key.cannedAcl
- One of the three values: Private, PublicRead or PublicReadWrite.OSSException
ClientException
void setObjectAcl(SetObjectAclRequest setObjectAclRequest) throws OSSException, ClientException
OSSObject
instance.setObjectAclRequest
- A SetObjectAclRequest
instance which specifies the object's bucket name and key as well as the
ACL information.OSSException
ClientException
ObjectAcl getObjectAcl(String bucketName, String key) throws OSSException, ClientException
bucketName
- Bucket name.key
- Object Key.ObjectAcl
instance of the object.OSSException
ClientException
ObjectAcl getObjectAcl(GenericRequest genericRequest) throws OSSException, ClientException
genericRequest
- A GenericRequest
instance which specifies the bucket name and object key.OSSException
ClientException
RestoreObjectResult restoreObject(String bucketName, String key) throws OSSException, ClientException
bucketName
- Bucket name.key
- Object Key.RestoreObjectResult
instance.OSSException
ClientException
RestoreObjectResult restoreObject(GenericRequest genericRequest) throws OSSException, ClientException
genericRequest
- A GenericRequest
instance that specifies the bucket name and object key.RestoreObjectResult
instance.OSSException
ClientException
URL generatePresignedUrl(String bucketName, String key, Date expiration) throws ClientException
OSSObject
with HTTP GET method.bucketName
- Bucket name.key
- Object key.expiration
- URL's expiration time.OSSObject
object.ClientException
URL generatePresignedUrl(String bucketName, String key, Date expiration, HttpMethod method) throws ClientException
OSSObject
with a specific HTTP method.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
URL generatePresignedUrl(GeneratePresignedUrlRequest request) throws ClientException
OSSObject
with a specific HTTP method.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
void putBucketImage(PutBucketImageRequest request) throws OSSException, ClientException
Bucket
request
- A PutBucketImageRequest
instances which specifies some attributes of image processing.OSSException
ClientException
GetBucketImageResult getBucketImage(String bucketName) throws OSSException, ClientException
Bucket
.bucketName
- The bucket nameGetBucketImageResult
instance which has attributes of image processingOSSException
ClientException
GetBucketImageResult getBucketImage(String bucketName, GenericRequest genericRequest) throws OSSException, ClientException
Bucket
.bucketName
- The bucket name.genericRequest
- The origin request.GetBucketImageResult
which has the attributes of image processing.OSSException
ClientException
void deleteBucketImage(String bucketName) throws OSSException, ClientException
Bucket
.bucketName
- Bucket nameOSSException
ClientException
void deleteBucketImage(String bucketName, GenericRequest genericRequest) throws OSSException, ClientException
Bucket
.bucketName
- Bucket namegenericRequest
- The origin requestgenericRequest
- OSSException
ClientException
void deleteImageStyle(String bucketName, String styleName) throws OSSException, ClientException
Bucket
bucketName
- Bucket namestyleName
- Style nameOSSException
ClientException
void deleteImageStyle(String bucketName, String styleName, GenericRequest genericRequest) throws OSSException, ClientException
Bucket
bucketName
- Bucket namestyleName
- Style namegenericRequest
- The origin requestOSSException
ClientException
void putImageStyle(PutImageStyleRequest putImageStyleRequest) throws OSSException, ClientException
Bucket
.putImageStyleRequest
- A PutImageStyleRequest
instance that has bucket name and style informationOSSException
ClientException
GetImageStyleResult getImageStyle(String bucketName, String styleName) throws OSSException, ClientException
Bucket
bucketName
- Bucket name.styleName
- Style name.GetImageStyleResult
instance which has the style information if successful or error code if
failed.OSSException
ClientException
GetImageStyleResult getImageStyle(String bucketName, String styleName, GenericRequest genericRequest) throws OSSException, ClientException
Bucket
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
ClientException
List<Style> listImageStyle(String bucketName) throws OSSException, ClientException
Bucket
bucketName
- Bucket name.List
of all styles of the Bucket. If there's no style, it will be an empty list.OSSException
ClientException
List<Style> listImageStyle(String bucketName, GenericRequest genericRequest) throws OSSException, ClientException
Bucket
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
- OSS Server side exception.ClientException
- OSS Client side exception.void setBucketProcess(SetBucketProcessRequest setBucketProcessRequest) throws OSSException, ClientException
setBucketProcessRequest
- A SetBucketTaggingRequest
instance that contains the image accessing
configuration such as enable original picture protection, etc.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketProcess getBucketProcess(String bucketName) throws OSSException, ClientException
bucketName
- Bucket name.BucketProcess
which contains the image accessing configurations if succeeds.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketProcess getBucketProcess(GenericRequest genericRequest) throws OSSException, ClientException
genericRequest
- A GenericRequest
instance that has the bucket name.BucketProcess
which contains the image accessing configurations if succeeds.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.InitiateMultipartUploadResult initiateMultipartUpload(InitiateMultipartUploadRequest request) throws OSSException, ClientException
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.
request
- A InitiateMultipartUploadRequest
instance which specifies the bucket name, object key and metadata.InitiateMultipartUploadResult
instance which has the global unique id if succeeds.ClientException
OSSException
MultipartUploadListing listMultipartUploads(ListMultipartUploadsRequest request) throws OSSException, ClientException
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.
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.ClientException
OSSException
PartListing listParts(ListPartsRequest request) throws OSSException, ClientException
request
- A ListPartsRequest
instance.ClientException
OSSException
UploadPartResult uploadPart(UploadPartRequest request) throws OSSException, ClientException
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.ClientException
OSSException
UploadPartCopyResult uploadPartCopy(UploadPartCopyRequest request) throws OSSException, ClientException
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
ClientException
void abortMultipartUpload(AbortMultipartUploadRequest request) throws OSSException, ClientException
request
- A AbortMultipartUploadRequest
instance which specifies the file name and the upload Id to abort.ClientException
OSSException
CompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest request) throws OSSException, ClientException
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.
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.ClientException
OSSException
void setBucketCORS(SetBucketCORSRequest request) throws OSSException, ClientException
request
- A SetBucketCORSRequest
object that has defined all CORS rules.OSSException
ClientException
List<SetBucketCORSRequest.CORSRule> getBucketCORSRules(String bucketName) throws OSSException, ClientException
bucketName
- Bucket name.SetBucketCORSRequest.CORSRule
under the bucket.OSSException
ClientException
List<SetBucketCORSRequest.CORSRule> getBucketCORSRules(GenericRequest genericRequest) throws OSSException, ClientException
genericRequest
- A GenericRequest
instance that specifies the bucket name.SetBucketCORSRequest.CORSRule
under the bucket.OSSException
ClientException
void deleteBucketCORSRules(String bucketName) throws OSSException, ClientException
bucketName
- The bucket name.OSSException
ClientException
void deleteBucketCORSRules(GenericRequest genericRequest) throws OSSException, ClientException
genericRequest
- The GenericRequest
instance that specifies the bucket name.OSSException
ClientException
@Deprecated ResponseMessage optionsObject(OptionsRequest request) throws OSSException, ClientException
void setBucketLogging(SetBucketLoggingRequest request) throws OSSException, ClientException
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.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.OSSException
ClientException
BucketLoggingResult getBucketLogging(String bucketName) throws OSSException, ClientException
Bucket
's logging setting.bucketName
- The bucket name.BucketLoggingResult
instance which contains the logging settings such as target bucket for data,
logging file prefix.OSSException
ClientException
BucketLoggingResult getBucketLogging(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's logging setting.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
ClientException
void deleteBucketLogging(String bucketName) throws OSSException, ClientException
Bucket
.bucketName
- Bucket NameOSSException
ClientException
void deleteBucketLogging(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
.genericRequest
- The GenericRequest
instance which specifies the bucket name.OSSException
ClientException
void setBucketWebsite(SetBucketWebsiteRequest setBucketWebSiteRequest) throws OSSException, ClientException
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.setBucketWebSiteRequest
- A SetBucketWebsiteRequest
instance to set with.OSSException
ClientException
BucketWebsiteResult getBucketWebsite(String bucketName) throws OSSException, ClientException
Bucket
's static website settings.bucketName
- The bucket name.BucketWebsiteResult
instanceOSSException
ClientException
BucketWebsiteResult getBucketWebsite(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's static webite settings.genericRequest
- The GenericRequest
instance which specifies the bucket name.BucketWebsiteResult
instance.OSSException
ClientException
void deleteBucketWebsite(String bucketName) throws OSSException, ClientException
Bucket
's static website configuration, which means disabling the static website on the bucket.bucketName
- Bucket nameOSSException
ClientException
void deleteBucketWebsite(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's static website configuration, which means disabling the static website on the bucket.genericRequest
- The GenericRequest
instance which specifies the bucket name.OSSException
ClientException
String generatePostPolicy(Date expiration, PolicyConditions conds) throws ClientException
expiration
- Policy expiration time.conds
- Policy condition lists.ClientException
String calculatePostSignature(String postPolicy)
postPolicy
- Post policy string in JSON which is generated from generatePostPolicy(Date, PolicyConditions)
.void setBucketLifecycle(SetBucketLifecycleRequest setBucketLifecycleRequest) throws OSSException, ClientException
Bucket
's lifecycle rule.setBucketLifecycleRequest
- A SetBucketWebsiteRequest
instance which specifies the lifecycle rulesOSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<LifecycleRule> getBucketLifecycle(String bucketName) throws OSSException, ClientException
Bucket
's lifecycle rules.bucketName
- Bucket name.LifecycleRule
.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<LifecycleRule> getBucketLifecycle(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's Lifecycle rules.genericRequest
- The GenericRequest
instance which specifies the bucket name.LifecycleRule
instances.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteBucketLifecycle(String bucketName) throws OSSException, ClientException
Bucket
's Lifecycle rules.bucketName
- The bucket name to operate on.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteBucketLifecycle(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's Lifecycle rules.genericRequest
- The GenericRequest
instance which specifies the bucket name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void addBucketReplication(AddBucketReplicationRequest addBucketReplicationRequest) throws OSSException, ClientException
Bucket
's cross-region replication rule.addBucketReplicationRequest
- A AddBucketReplicationRequest
instance which specifies a replication
rule.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<ReplicationRule> getBucketReplication(String bucketName) throws OSSException, ClientException
Bucket
's cross region replication rules.bucketName
- Bucket name.ReplicationRule
under the bucket.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<ReplicationRule> getBucketReplication(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's cross region replication rules.genericRequest
- The GenericRequest
instance which specifies the bucket name.ReplicationRule
under the bucket.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteBucketReplication(String bucketName, String replicationRuleID) throws OSSException, ClientException
Bucket
's cross region replication rule.bucketName
- Bucket name.replicationRuleID
- Replication Id to delete.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteBucketReplication(DeleteBucketReplicationRequest deleteBucketReplicationRequest) throws OSSException, ClientException
Bucket
's cross region replication rule.deleteBucketReplicationRequest
- The DeleteBucketReplicationRequest
instance which specifies the replication rule Id to delete.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketReplicationProgress getBucketReplicationProgress(String bucketName, String replicationRuleID) throws OSSException, ClientException
Bucket
's progress of the specified cross region replication rule.bucketName
- Bucket name.replicationRuleID
- Replication Rule Id.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketReplicationProgress getBucketReplicationProgress(GetBucketReplicationProgressRequest getBucketReplicationProgressRequest) throws OSSException, ClientException
Bucket
's progress of the specified cross region replication rule.getBucketReplicationProgressRequest
- The GetBucketReplicationProgressRequest
instance which specifies the replication rule Id and
bucket name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<String> getBucketReplicationLocation(String bucketName) throws OSSException, ClientException
Bucket
's replication reachable data centers.bucketName
- Bucket name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<String> getBucketReplicationLocation(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's replication reachable data centers.genericRequest
- The GenericRequest
instance that specifies the bucket name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void addBucketCname(AddBucketCnameRequest addBucketCnameRequest) throws OSSException, ClientException
Bucket
instance.addBucketCnameRequest
- The request specifies the bucket name and the Cname information.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<CnameConfiguration> getBucketCname(String bucketName) throws OSSException, ClientException
Bucket
's Cnames.bucketName
- Bucket name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<CnameConfiguration> getBucketCname(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's Cnames.genericRequest
- The GenericRequest
instance which specifies the bucket name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteBucketCname(String bucketName, String domain) throws OSSException, ClientException
Bucket
's Cname specified by the parameter domain.bucketName
- The bucket name。domain
- cname。OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteBucketCname(DeleteBucketCnameRequest deleteBucketCnameRequest) throws OSSException, ClientException
Bucket
's specific Cname specified by the parameter domain.deleteBucketCnameRequest
- A DeleteBucketCnameRequest
instance that specifies the bucket name and
the domain name to deleteOSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketInfo getBucketInfo(String bucketName) throws OSSException, ClientException
Bucket
's basic information as well as its ACL.bucketName
- The bucket name。BucketInfo
instance.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketInfo getBucketInfo(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's basic information as well as its ACL.genericRequest
- The GenericRequest
instance which specifies the bucket name.BucketInfo
instance.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketStat getBucketStat(String bucketName) throws OSSException, ClientException
Bucket
's storage information such as object counts, storage size and executing multipart uploads.bucketName
- The bucket name。BucketStat
instance.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.BucketStat getBucketStat(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's storage information such as object counts, storage size and executing multipart uploads.genericRequest
- The GenericRequest
instance which specifies the bucket name.BucketStat
instance.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void setBucketStorageCapacity(String bucketName, UserQos userQos) throws OSSException, ClientException
Bucket
.bucketName
- The bucket name。userQos
- A UserQos
instance which specifies the capacity in GBOSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void setBucketStorageCapacity(SetBucketStorageCapacityRequest setBucketStorageCapacityRequest) throws OSSException, ClientException
Bucket
.setBucketStorageCapacityRequest
- A SetBucketStorageCapacityRequest
instance which specifies the bucket name as well as a
UserQos instanceOSSException
- OSS Server side exception.ClientException
- OSS Client side exception.UserQos getBucketStorageCapacity(String bucketName) throws OSSException, ClientException
Bucket
's capacitybucketName
- The bucket name。UserQos
instance which has the capacity information.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.UserQos getBucketStorageCapacity(GenericRequest genericRequest) throws OSSException, ClientException
Bucket
's capacitygenericRequest
- The GenericRequest
instance which specifies the bucket name.UserQos
instance which has the capacity information.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.UploadFileResult uploadFile(UploadFileRequest uploadFileRequest) throws Throwable
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
DownloadFileResult downloadFile(DownloadFileRequest downloadFileRequest) throws Throwable
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
CreateLiveChannelResult createLiveChannel(CreateLiveChannelRequest createLiveChannelRequest) throws OSSException, ClientException
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
- OSS Server side exception.ClientException
- OSS Client side exception.void setLiveChannelStatus(String bucketName, String liveChannel, LiveChannelStatus status) throws OSSException, ClientException
bucketName
- Bucket name.liveChannel
- Live Channel name.status
- Live Channel status: "Enabled" or "Disabled".OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void setLiveChannelStatus(SetLiveChannelRequest setLiveChannelRequest) throws OSSException, ClientException
setLiveChannelRequest
- A SetLiveChannelRequest
instance that specifies the bucket name, the channel
name and the Live Channel status.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.LiveChannelInfo getLiveChannelInfo(String bucketName, String liveChannel) throws OSSException, ClientException
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
- OSS Server side exception.ClientException
- OSS Client side exception.LiveChannelInfo getLiveChannelInfo(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
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
- OSS Server side exception.ClientException
- OSS Client side exception.LiveChannelStat getLiveChannelStat(String bucketName, String liveChannel) throws OSSException, ClientException
bucketName
- Bucket name.liveChannel
- Live Channel name.LiveChannelStat
instance that contains the media's resolution, frame rate and bandwidth.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.LiveChannelStat getLiveChannelStat(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
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
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteLiveChannel(String bucketName, String liveChannel) throws OSSException, ClientException
bucketName
- Bucket name.liveChannel
- Live Channel name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void deleteLiveChannel(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
liveChannelGenericRequest
- A LiveChannelGenericRequest
instance that specifies theOSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<LiveChannel> listLiveChannels(String bucketName) throws OSSException, ClientException
bucketName
- Bucket name.LiveChannel
instances under the bucket.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.LiveChannelListing listLiveChannels(ListLiveChannelsRequest listLiveChannelRequest) throws OSSException, ClientException
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
- OSS Server side exception.ClientException
- OSS Client side exception.List<LiveRecord> getLiveChannelHistory(String bucketName, String liveChannel) throws OSSException, ClientException
LiveRecord
entries from the specified Live Channel.
OSS saves recent 10 LiveRecord (pushing streaming record) for every Live Channel.bucketName
- Bucket name.liveChannel
- Live Channel name.LiveRecord
for the live channel.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.List<LiveRecord> getLiveChannelHistory(LiveChannelGenericRequest liveChannelGenericRequest) throws OSSException, ClientException
LiveRecord
entries from the specified Live Channel.
OSS saves recent 10 LiveRecord (pushing streaming record) for every Live Channel.liveChannelGenericRequest
- A LiveChannelGenericRequest
instance that specifies the bucket name and
Live Channel name.LiveRecord
for the live channel.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void generateVodPlaylist(String bucketName, String liveChannelName, String PlaylistName, long startTime, long endTime) throws OSSException, ClientException
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).OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void generateVodPlaylist(GenerateVodPlaylistRequest generateVodPlaylistRequest) throws OSSException, ClientException
generateVodPlaylistRequest
- A GenerateVodPlaylistRequest
instance the specifies the bucket name and
the Live Channel name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.String generateRtmpUri(String bucketName, String liveChannelName, String PlaylistName, long expires) throws OSSException, ClientException
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
- OSS Server side exception.ClientException
- OSS Client side exception.String generateRtmpUri(GenerateRtmpUriRequest generatePushflowUrlRequest) throws OSSException, ClientException
generatePushflowUrlRequest
- A GenerateRtmpUriRequest
instance that specifies the bucket name and the
Live Channel name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void createSymlink(String bucketName, String symlink, String target) throws OSSException, ClientException
bucketName
- Bucket name.symlink
- symlink name.target
- target file key.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.void createSymlink(CreateSymlinkRequest createSymlinkRequest) throws OSSException, ClientException
createSymlinkRequest
- A CreateSymlinkRequest
instance that specifies the bucket name, symlink name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.OSSSymlink getSymlink(String bucketName, String symlink) throws OSSException, ClientException
bucketName
- Bucket name.symlink
- The symlink name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.OSSSymlink getSymlink(GenericRequest genericRequest) throws OSSException, ClientException
genericRequest
- A GenericRequest
instance which specifies the bucket name and symlink name.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.GenericResult processObject(ProcessObjectRequest processObjectRequest) throws OSSException, ClientException
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().
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
- OSS Server side exception.ClientException
- OSS Client side exception.void createUdf(CreateUdfRequest createUdfRequest) throws OSSException, ClientException
createUdfRequest
- A CreateUdfRequest
instance.OSSException
- OSS Server side exception.ClientException
- OSS Client side exception.UdfInfo getUdfInfo(UdfGenericRequest genericRequest) throws OSSException, ClientException
List<UdfInfo> listUdfs() throws OSSException, ClientException
void deleteUdf(UdfGenericRequest genericRequest) throws OSSException, ClientException
void uploadUdfImage(UploadUdfImageRequest uploadUdfImageRequest) throws OSSException, ClientException
List<UdfImageInfo> getUdfImageInfo(UdfGenericRequest genericRequest) throws OSSException, ClientException
void deleteUdfImage(UdfGenericRequest genericRequest) throws OSSException, ClientException
void createUdfApplication(CreateUdfApplicationRequest createUdfApplicationRequest) throws OSSException, ClientException
UdfApplicationInfo getUdfApplicationInfo(UdfGenericRequest genericRequest) throws OSSException, ClientException
List<UdfApplicationInfo> listUdfApplications() throws OSSException, ClientException
void deleteUdfApplication(UdfGenericRequest genericRequest) throws OSSException, ClientException
void upgradeUdfApplication(UpgradeUdfApplicationRequest upgradeUdfApplicationRequest) throws OSSException, ClientException
void resizeUdfApplication(ResizeUdfApplicationRequest resizeUdfApplicationRequest) throws OSSException, ClientException
UdfApplicationLog getUdfApplicationLog(GetUdfApplicationLogRequest getUdfApplicationLogRequest) throws OSSException, ClientException
Copyright © 2017. All Rights Reserved.