| Modifier | Constructor and Description |
|---|---|
protected |
TOSV2Client(TOSClientConfiguration conf) |
protected TOSV2Client(TOSClientConfiguration conf)
public void changeCredentials(Credentials credentials)
changeCredentials in interface TOSV2protected TOSClientConfiguration getConfig()
protected TosRequestFactory getFactory()
public void changeRegionAndEndpoint(String region, String endpoint)
changeRegionAndEndpoint in interface TOSV2public void changeTransportConfig(TransportConfig config)
changeTransportConfig in interface TOSV2public CreateBucketV2Output createBucket(String bucket) throws TosException
TOSV2createBucket in interface TOSV2bucket - require input's bucketName not nullCreateBucketV2OutputTosExceptionpublic CreateBucketV2Output createBucket(CreateBucketV2Input input) throws TosException
TOSV2createBucket in interface TOSV2input - require input's bucketName not nullCreateBucketV2OutputTosExceptionpublic HeadBucketV2Output headBucket(HeadBucketV2Input input) throws TosException
TOSV2headBucket in interface TOSV2input - bucket nameHeadBucketOutputTosExceptionpublic DeleteBucketOutput deleteBucket(String bucket) throws TosException
TOSdeleteBucket in interface TOSbucket - bucket nameDeleteBucketOutputTosExceptionpublic DeleteBucketOutput deleteBucket(DeleteBucketInput input) throws TosException
TOSV2deleteBucket in interface TOSV2input - bucket nameDeleteBucketOutputTosExceptionpublic ListBucketsV2Output listBuckets(ListBucketsV2Input input) throws TosException
TOSV2listBuckets in interface TOSV2input - no params requiredListBucketsV2OutputTosExceptionpublic PutBucketPolicyOutput putBucketPolicy(String bucket, String policy) throws TosException
TOSV2putBucketPolicy in interface TOSputBucketPolicy in interface TOSV2bucket - bucket namepolicy - bucket policyTosExceptionpublic PutBucketPolicyOutput putBucketPolicy(PutBucketPolicyInput input) throws TosException
TOSV2putBucketPolicy in interface TOSV2input - set bucket name and bucket policyTosExceptionpublic GetBucketPolicyOutput getBucketPolicy(String bucket) throws TosException
TOSV2getBucketPolicy in interface TOSgetBucketPolicy in interface TOSV2bucket - bucket nameTosExceptionpublic GetBucketPolicyOutput getBucketPolicy(GetBucketPolicyInput input) throws TosException
TOSV2getBucketPolicy in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketPolicyOutput deleteBucketPolicy(String bucket) throws TosException
TOSV2deleteBucketPolicy in interface TOSdeleteBucketPolicy in interface TOSV2bucket - bucket nameTosExceptionpublic DeleteBucketPolicyOutput deleteBucketPolicy(DeleteBucketPolicyInput input) throws TosException
TOSV2deleteBucketPolicy in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketCORSOutput putBucketCORS(PutBucketCORSInput input) throws TosException
TOSV2putBucketCORS in interface TOSV2input - set bucket name and the bucket CORS rulesTosExceptionpublic GetBucketCORSOutput getBucketCORS(GetBucketCORSInput input) throws TosException
TOSV2getBucketCORS in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketCORSOutput deleteBucketCORS(DeleteBucketCORSInput input) throws TosException
TOSV2deleteBucketCORS in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketStorageClassOutput putBucketStorageClass(PutBucketStorageClassInput input) throws TosException
TOSV2putBucketStorageClass in interface TOSV2input - set bucket name and the specific storageClassTypeTosExceptionpublic GetBucketLocationOutput getBucketLocation(GetBucketLocationInput input) throws TosException
TOSV2getBucketLocation in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketLifecycleOutput putBucketLifecycle(PutBucketLifecycleInput input) throws TosException
TOSV2putBucketLifecycle in interface TOSV2input - set bucket name and the bucket lifecycle rulesTosExceptionpublic GetBucketLifecycleOutput getBucketLifecycle(GetBucketLifecycleInput input) throws TosException
TOSV2getBucketLifecycle in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketLifecycleOutput deleteBucketLifecycle(DeleteBucketLifecycleInput input) throws TosException
TOSV2deleteBucketLifecycle in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketMirrorBackOutput putBucketMirrorBack(PutBucketMirrorBackInput input) throws TosException
TOSV2putBucketMirrorBack in interface TOSV2input - set bucket name and the bucket mirrorBack rulesTosExceptionpublic GetBucketMirrorBackOutput getBucketMirrorBack(GetBucketMirrorBackInput input) throws TosException
TOSV2getBucketMirrorBack in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketMirrorBackOutput deleteBucketMirrorBack(DeleteBucketMirrorBackInput input) throws TosException
TOSV2deleteBucketMirrorBack in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketReplicationOutput putBucketReplication(PutBucketReplicationInput input) throws TosException
TOSV2putBucketReplication in interface TOSV2input - set bucket name and the bucket replication rulesTosExceptionpublic GetBucketReplicationOutput getBucketReplication(GetBucketReplicationInput input) throws TosException
TOSV2getBucketReplication in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketReplicationOutput deleteBucketReplication(DeleteBucketReplicationInput input) throws TosException
TOSV2deleteBucketReplication in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketVersioningOutput putBucketVersioning(PutBucketVersioningInput input) throws TosException
TOSV2putBucketVersioning in interface TOSV2input - set bucket name and the bucket multi-version statusTosExceptionpublic GetBucketVersioningOutput getBucketVersioning(GetBucketVersioningInput input) throws TosException
TOSV2getBucketVersioning in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketWebsiteOutput putBucketWebsite(PutBucketWebsiteInput input) throws TosException
TOSV2putBucketWebsite in interface TOSV2input - set bucket name and the bucket website config rulesTosExceptionpublic GetBucketWebsiteOutput getBucketWebsite(GetBucketWebsiteInput input) throws TosException
TOSV2getBucketWebsite in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketWebsiteOutput deleteBucketWebsite(DeleteBucketWebsiteInput input) throws TosException
TOSV2deleteBucketWebsite in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketNotificationOutput putBucketNotification(PutBucketNotificationInput input) throws TosException
TOSV2putBucketNotification in interface TOSV2input - set bucket name and the bucket event notification rulesTosExceptionpublic GetBucketNotificationOutput getBucketNotification(GetBucketNotificationInput input) throws TosException
TOSV2getBucketNotification in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketCustomDomainOutput putBucketCustomDomain(PutBucketCustomDomainInput input) throws TosException
TOSV2putBucketCustomDomain in interface TOSV2input - set bucket name and the custom domain ruleTosExceptionpublic ListBucketCustomDomainOutput listBucketCustomDomain(ListBucketCustomDomainInput input) throws TosException
TOSV2listBucketCustomDomain in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketCustomDomainOutput deleteBucketCustomDomain(DeleteBucketCustomDomainInput input) throws TosException
TOSV2deleteBucketCustomDomain in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketRealTimeLogOutput putBucketRealTimeLog(PutBucketRealTimeLogInput input) throws TosException
TOSV2putBucketRealTimeLog in interface TOSV2input - set bucket name and the realtime log configTosExceptionpublic GetBucketRealTimeLogOutput getBucketRealTimeLog(GetBucketRealTimeLogInput input) throws TosException
TOSV2getBucketRealTimeLog in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketRealTimeLogOutput deleteBucketRealTimeLog(DeleteBucketRealTimeLogInput input) throws TosException
TOSV2deleteBucketRealTimeLog in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketACLOutput putBucketACL(PutBucketACLInput input) throws TosException
TOSV2putBucketACL in interface TOSV2input - set bucket name and the bucket lifecycle rulesTosExceptionpublic GetBucketACLOutput getBucketACL(GetBucketACLInput input) throws TosException
TOSV2getBucketACL in interface TOSV2input - set bucket nameTosExceptionpublic PutBucketRenameOutput putBucketRename(PutBucketRenameInput input) throws TosException
TOSV2putBucketRename in interface TOSV2input - set bucket name and the rename-switchTosExceptionpublic GetBucketRenameOutput getBucketRename(GetBucketRenameInput input) throws TosException
TOSV2getBucketRename in interface TOSV2input - set bucket nameTosExceptionpublic DeleteBucketRenameOutput deleteBucketRename(DeleteBucketRenameInput input) throws TosException
TOSV2deleteBucketRename in interface TOSV2input - set bucket nameTosExceptionpublic GetObjectV2Output getObject(GetObjectV2Input input) throws TosException
TOSV2getObject in interface TOSV2input - set get object optionsGetObjectV2OutputTosExceptionpublic GetObjectToFileOutput getObjectToFile(GetObjectToFileInput input) throws TosException
TOSV2getObjectToFile in interface TOSV2input - set get object optionsGetObjectToFileOutputTosExceptionpublic UploadFileV2Output uploadFile(UploadFileV2Input input) throws TosException
uploadFile in interface TOSV2TosExceptionpublic DownloadFileOutput downloadFile(DownloadFileInput input) throws TosException
downloadFile in interface TOSV2TosExceptionpublic ResumableCopyObjectOutput resumableCopyObject(ResumableCopyObjectInput input) throws TosException
resumableCopyObject in interface TOSV2TosExceptionpublic HeadObjectV2Output headObject(HeadObjectV2Input input) throws TosException
TOSV2headObject in interface TOSV2input - set head object optionsHeadObjectV2OutputTosExceptionpublic DeleteObjectOutput deleteObject(DeleteObjectInput input) throws TosException
TOSV2deleteObject in interface TOSV2input - set delete object optionsDeleteObjectOutputTosExceptionpublic DeleteMultiObjectsV2Output deleteMultiObjects(DeleteMultiObjectsV2Input input) throws TosException
TOSV2deleteMultiObjects in interface TOSV2input - set delete multi objects optionsDeleteMultiObjectsV2OutputTosExceptionpublic PutObjectOutput putObject(PutObjectInput input) throws TosException
TOSV2putObject in interface TOSV2input - set put object optionPutObjectOutputTosExceptionpublic PutObjectFromFileOutput putObjectFromFile(PutObjectFromFileInput input) throws TosException
TOSV2putObjectFromFile in interface TOSV2input - set put object optionPutObjectFromFileOutputTosExceptionpublic AppendObjectOutput appendObject(AppendObjectInput input) throws TosException
TOSV2appendObject in interface TOSV2input - set append object optionAppendObjectOutputTosExceptionpublic SetObjectMetaOutput setObjectMeta(SetObjectMetaInput input) throws TosException
TOSV2setObjectMeta in interface TOSV2input - set setObjectMeta optionSetObjectMetaOutputTosExceptionpublic ListObjectsV2Output listObjects(ListObjectsV2Input input) throws TosException
TOSV2listObjects in interface TOSV2input - list object optionsListObjectsV2OutputTosExceptionpublic ListObjectsType2Output listObjectsType2(ListObjectsType2Input input) throws TosException
TOSV2listObjectsType2 in interface TOSV2input - list object optionsListObjectsType2OutputTosExceptionpublic ListObjectVersionsV2Output listObjectVersions(ListObjectVersionsV2Input input) throws TosException
TOSV2listObjectVersions in interface TOSV2input - query paramsListObjectVersionsV2OutputTosExceptionpublic CopyObjectV2Output copyObject(CopyObjectV2Input input) throws TosException
TOSV2copyObject in interface TOSV2input - set copy object optionCopyObjectV2OutputTosExceptionpublic UploadPartCopyV2Output uploadPartCopy(UploadPartCopyV2Input input) throws TosException
TOSV2uploadPartCopy in interface TOSV2UploadPartCopyV2OutputTosExceptionpublic PutObjectACLOutput putObjectAcl(PutObjectACLInput input) throws TosException
TOSV2putObjectAcl in interface TOSV2input - set acl option.PutObjectACLOutputTosExceptionpublic GetObjectACLV2Output getObjectAcl(GetObjectACLV2Input input) throws TosException
TOSV2getObjectAcl in interface TOSV2input - set bucket, key and versionID.GetObjectACLV2OutputTosExceptionpublic PutObjectTaggingOutput putObjectTagging(PutObjectTaggingInput input) throws TosException
TOSV2putObjectTagging in interface TOSV2input - set object tag set.PutObjectTaggingOutputTosExceptionpublic GetObjectTaggingOutput getObjectTagging(GetObjectTaggingInput input) throws TosException
TOSV2getObjectTagging in interface TOSV2input - set bucket, key and versionID.GetObjectTaggingOutputTosExceptionpublic DeleteObjectTaggingOutput deleteObjectTagging(DeleteObjectTaggingInput input) throws TosException
TOSV2deleteObjectTagging in interface TOSV2input - set bucket, key and versionID.DeleteObjectTaggingOutputTosExceptionpublic FetchObjectOutput fetchObject(FetchObjectInput input) throws TosException
TOSV2fetchObject in interface TOSV2input - set fetch options.FetchObjectOutputTosExceptionpublic PutFetchTaskOutput putFetchTask(PutFetchTaskInput input) throws TosException
TOSV2putFetchTask in interface TOSV2input - set fetch options.PutFetchTaskOutputTosExceptionpublic CreateMultipartUploadOutput createMultipartUpload(CreateMultipartUploadInput input) throws TosException
TOSV2createMultipartUpload in interface TOSV2input - set the createMultipartUpload optionCreateMultipartUploadOutputTosExceptionpublic UploadPartV2Output uploadPart(UploadPartV2Input input) throws TosException
TOSV2uploadPart in interface TOSV2input - set uploadpart optionUploadPartV2OutputTosExceptionpublic UploadPartFromFileOutput uploadPartFromFile(UploadPartFromFileInput input) throws TosException
TOSV2uploadPartFromFile in interface TOSV2input - set uploadpart optionUploadPartFromFileOutputTosExceptionpublic CompleteMultipartUploadV2Output completeMultipartUpload(CompleteMultipartUploadV2Input input) throws TosException
TOSV2completeMultipartUpload in interface TOSV2input - set completeMultipartUpload optionCompleteMultipartUploadV2OutputTosExceptionpublic AbortMultipartUploadOutput abortMultipartUpload(AbortMultipartUploadInput input) throws TosException
TOSV2abortMultipartUpload in interface TOSV2input - set abortMultipartUpload optionAbortMultipartUploadOutputTosExceptionpublic ListPartsOutput listParts(ListPartsInput input) throws TosException
TOSV2listParts in interface TOSV2input - set listParts optionListPartsOutputTosExceptionpublic ListMultipartUploadsV2Output listMultipartUploads(ListMultipartUploadsV2Input input) throws TosException
TOSV2listMultipartUploads in interface TOSV2input - ListMultipartUploadsInputListMultipartUploadsV2OutputTosExceptionpublic RenameObjectOutput renameObject(RenameObjectInput input) throws TosException
TOSV2renameObject in interface TOSV2input - set the source key to be renamed and the renamed key.RenameObjectOutputTosExceptionpublic RestoreObjectOutput restoreObject(RestoreObjectInput input) throws TosException
TOSV2restoreObject in interface TOSV2input - set restoreObject options.RestoreObjectOutputTosExceptionpublic PreSignedURLOutput preSignedURL(PreSignedURLInput input) throws TosException
TOSV2preSignedURL in interface TOSV2input - PreSignedURLInputPreSignedURLOutputTosExceptionpublic PreSignedPostSignatureOutput preSignedPostSignature(PreSignedPostSignatureInput input) throws TosException
TOSV2preSignedPostSignature in interface TOSV2input - PreSignedPostSignatureInputPreSignedPostSignatureOutputTosException@Deprecated public PreSingedPolicyURLOutput preSingedPolicyURL(PreSingedPolicyURLInput input) throws TosException
TOSV2preSingedPolicyURL in interface TOSV2input - PreSingedPolicyURLInputPreSingedPolicyURLOutputTosExceptionpublic PreSignedPolicyURLOutput preSignedPolicyURL(PreSignedPolicyURLInput input) throws TosException
TOSV2preSignedPolicyURL in interface TOSV2input - PreSignedPolicyURLInputPreSignedPolicyURLOutputTosExceptionpublic CreateBucketOutput createBucket(CreateBucketInput input) throws TosException
TOScreateBucket in interface TOSinput - require input's bucketName not nullCreateBucketOutputTosExceptionpublic HeadBucketOutput headBucket(String bucket) throws TosException
TOSheadBucket in interface TOSbucket - bucket nameHeadBucketOutputTosExceptionpublic ListBucketsOutput listBuckets(ListBucketsInput input) throws TosException
TOSlistBuckets in interface TOSinput - no params requiredListBucketsOutputTosExceptionpublic GetObjectOutput getObject(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSgetObject in interface TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID: which version of this object.
withRange: the range of content.
withIfModifiedSince: return if the object modified after the given date,
otherwise return status code 304.
withIfUnmodifiedSince, withIfMatch, withIfNoneMatch set If-Unmodified-Since, If-Match and If-None-Match.GetObjectOutputTosExceptionpublic HeadObjectOutput headObject(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSheadObject in interface TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID: which version of this object.
withRange: the range of content.
withIfModifiedSince: return if the object modified after the given date,
otherwise return status code 304.
withIfUnmodifiedSince, withIfMatch, withIfNoneMatch set If-Unmodified-Since, If-Match and If-None-Match.HeadObjectOutputTosExceptionpublic DeleteObjectOutput deleteObject(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSdeleteObject in interface TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID: which version of this object will be deletedDeleteObjectOutputTosExceptionpublic DeleteMultiObjectsOutput deleteMultiObjects(String bucket, DeleteMultiObjectsInput input, RequestOptionsBuilder... builders) throws TosException
TOSdeleteMultiObjects in interface TOSbucket - the bucket to operateinput - the objects to be deletedbuilders - optional. setting withXXX properties.DeleteMultiObjectsOutputTosExceptionpublic PutObjectOutput putObject(String bucket, String objectKey, InputStream inputStream, RequestOptionsBuilder... builders) throws TosException
TOSputObject in interface TOSbucket - the bucket to operateobjectKey - the name of objectinputStream - the content of objectbuilders - optional. setting withXXX properties.
withContentType: set Content-Type.
withContentDisposition: set Content-Disposition.
withContentLanguage: set Content-Language.
withContentEncoding: set Content-Encoding.
withCacheControl: set Cache-Control.
withExpires: set Expires.
withMeta: set meta header(s).
withContentSHA256: set Content-Sha256.
withContentMD5: set Content-MD5.
withExpires: set Expires.
withServerSideEncryptionCustomer: set server side encryption options.
withACL, withACLGrantFullControl, withACLGrantRead, withACLGrantReadAcp,
withACLGrantWrite, withACLGrantWriteAcp set object acl.
withStorageClass set storage class, 'STANDARD|IA'PutObjectOutputTosExceptionpublic UploadFileOutput uploadFile(String bucket, UploadFileInput input, RequestOptionsBuilder... builders) throws TosException
uploadFile in interface TOSTosExceptionpublic AppendObjectOutput appendObject(String bucket, String objectKey, InputStream content, long offset, RequestOptionsBuilder... builders) throws TosException
TOSappendObject in interface TOSbucket - the bucket to operateobjectKey - the name of objectcontent - the content of objectoffset - append position, equals to the current object-sizebuilders - optional. setting withXXX properties.
withContentType: set Content-Type.
withContentDisposition: set Content-Disposition.
withContentLanguage: set Content-Language.
withContentEncoding: set Content-Encoding.
withCacheControl: set Cache-Control.
withExpires: set Expires.
withMeta: set meta header(s).
withExpires: set Expires.
withACL, withACLGrantFullControl, withACLGrantRead, withACLGrantReadAcp,
withACLGrantWrite, withACLGrantWriteAcp set object acl.
withStorageClass set storage class, 'STANDARD|IA'
above options only take effect when offset parameter is 0.
withContentSHA256: set Content-Sha256.
withContentMD5: set Content-MD5.AppendObjectOutputTosExceptionpublic SetObjectMetaOutput setObjectMeta(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSsetObjectMeta in interface TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Languag.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).
withVersionID which version of this object will be setSetObjectMetaOutputTosExceptionpublic ListObjectsOutput listObjects(String bucket, ListObjectsInput input) throws TosException
TOSlistObjects in interface TOSbucket - the bucket to operateinput - query paramsListObjectsOutputTosExceptionpublic ListObjectVersionsOutput listObjectVersions(String bucket, ListObjectVersionsInput input) throws TosException
TOSlistObjectVersions in interface TOSbucket - the bucket to operateinput - query paramsListObjectVersionsOutputTosExceptionpublic CopyObjectOutput copyObject(String bucket, String srcObjectKey, String dstObjectKey, RequestOptionsBuilder... builders) throws TosException
TOScopyObject in interface TOSbucket - the bucket to operatesrcObjectKey - the source object namedstObjectKey - the destination object name
NOTICE: srcObjectKey and dstObjectKey belongs to the same bucket.builders - optional. setting withXXX properties.
withVersionID the version id of source object.
withMetadataDirective copy source object metadata or replace with new object metadata.
withACL withACLGrantFullControl withACLGrantRead withACLGrantReadAcp
withACLGrantWrite withACLGrantWriteAcp set object acl.
withCopySourceIfMatch withCopySourceIfNoneMatch withCopySourceIfModifiedSince
withCopySourceIfUnmodifiedSince set copy conditions.
withStorageClass set storage class, 'STANDARD|IA'
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5
if copyObject called with withMetadataDirective(TosHeaders.METADATA_DIRECTIVE_REPLACE),
these properties can be used:
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s),CopyObjectOutputTosExceptionpublic CopyObjectOutput copyObjectTo(String bucket, String dstBucket, String dstObjectKey, String srcObjectKey, RequestOptionsBuilder... builders) throws TosException
TOScopyObjectTo in interface TOSbucket - the bucket to operatedstBucket - the destination bucketdstObjectKey - the destination object namesrcObjectKey - the source object namebuilders - optional. setting withXXX properties.
withVersionID the version id of source object.
withMetadataDirective copy source object metadata or replace with new object metadata.
withACL withACLGrantFullControl withACLGrantRead withACLGrantReadAcp
withACLGrantWrite withACLGrantWriteAcp set object acl.
withCopySourceIfMatch withCopySourceIfNoneMatch withCopySourceIfModifiedSince
withCopySourceIfUnmodifiedSince set copy conditions.
withStorageClass set storage class, 'STANDARD|IA'
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5
if copyObjectTo called with withMetadataDirective(TosHeaders.METADATA_DIRECTIVE_REPLACE),
these properties can be used:
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).CopyObjectOutputTosExceptionpublic CopyObjectOutput copyObjectFrom(String bucket, String srcBucket, String srcObjectKey, String dstObjectKey, RequestOptionsBuilder... builders) throws TosException
TOScopyObjectFrom in interface TOSbucket - the bucket to operatesrcBucket - the source bucketsrcObjectKey - the source object namedstObjectKey - the destination object namebuilders - optional. setting withXXX properties.
withVersionID the version id of source object.
withMetadataDirective copy source object metadata or replace with new object metadata.
withACL withACLGrantFullControl withACLGrantRead withACLGrantReadAcp
withACLGrantWrite withACLGrantWriteAcp set object acl.
withCopySourceIfMatch withCopySourceIfNoneMatch withCopySourceIfModifiedSince
withCopySourceIfUnmodifiedSince set copy conditions.
withStorageClass set storage class, 'STANDARD|IA'
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5
if copyObjectFrom called with withMetadataDirective(TosHeaders.METADATA_DIRECTIVE_REPLACE),
these properties can be used:
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).CopyObjectOutputTosExceptionpublic UploadPartCopyOutput uploadPartCopy(String bucket, UploadPartCopyInput input, RequestOptionsBuilder... builders) throws TosException
TOSuploadPartCopy in interface TOSbucket - the bucket to operateinput - uploadID, destinationKey, sourceBucket, sourceKey, partNumber, partSize and startOffset are inclusive,
other parameters are optional.builders - optional. setting withXXX properties.
withCopySourceIfMatch, withCopySourceIfNoneMatch, withCopySourceIfModifiedSince and
withCopySourceIfUnmodifiedSince set copy conditions
withServerSideEncryption: set server side encryption algorithm, 'AES256'.
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5UploadPartCopyOutputTosExceptionpublic PutObjectAclOutput putObjectAcl(String bucket, PutObjectAclInput input) throws TosException
TOSputObjectAcl in interface TOSbucket - the bucket to operateinput - aclGrant, aclRules can not set both.PutObjectAclOutputTosExceptionpublic GetObjectAclOutput getObjectAcl(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSgetObjectAcl in interface TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID the version of the objectGetObjectAclOutputTosExceptionpublic CreateMultipartUploadOutput createMultipartUpload(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOScreateMultipartUpload in interface TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).
withContentSHA256 set Content-Sha256.
withContentMD5 set Content-MD5.
withExpires set Expires.
withServerSideEncryptionCustomer set server side encryption options.
withACL, WithACLGrantFullControl, withACLGrantRead, withACLGrantReadAcp,
withACLGrantWrite, withACLGrantWriteAcp set object acl.
withStorageClass set storage class, 'STANDARD|IA'.
withServerSideEncryption: set server side encryption algorithm, 'AES256'.CreateMultipartUploadOutputTosExceptionpublic UploadPartOutput uploadPart(String bucket, UploadPartInput input, RequestOptionsBuilder... builders) throws TosException
TOSuploadPart in interface TOSbucket - the bucket to operateinput - some params are required, eg, key, uploadID, partSize, partNumber and partNumberbuilders - optional. setting withXXX properties.UploadPartOutputTosExceptionpublic CompleteMultipartUploadOutput completeMultipartUpload(String bucket, CompleteMultipartUploadInput input) throws TosException
TOScompleteMultipartUpload in interface TOSbucket - the bucket to operateinput - key: the object name,
uploadID: the uploadID got from CreateMultipartUpload,
uploadedParts: upload part output got from uploadPart or uploadPartCopyCompleteMultipartUploadOutputTosExceptionpublic AbortMultipartUploadOutput abortMultipartUpload(String bucket, AbortMultipartUploadInput input) throws TosException
TOSabortMultipartUpload in interface TOSbucket - the bucket to operateAbortMultipartUploadOutputTosExceptionpublic ListUploadedPartsOutput listUploadedParts(String bucket, ListUploadedPartsInput input, RequestOptionsBuilder... builders) throws TosException
TOSlistUploadedParts in interface TOSbucket - the bucket to operateinput - key, uploadID and other parametersbuilders - optional. setting withXXX properties.ListUploadedPartsOutputTosExceptionpublic ListMultipartUploadsOutput listMultipartUploads(String bucket, ListMultipartUploadsInput input) throws TosException
TOSlistMultipartUploads in interface TOSbucket - the bucket to operateinput - ListMultipartUploadsInputListMultipartUploadsOutputTosExceptionpublic String preSignedURL(String httpMethod, String bucket, String objectKey, Duration ttl, RequestOptionsBuilder... builders) throws TosException
TOSpreSignedURL in interface TOShttpMethod - the http method in the URL, such as GET, POST, PUT, HEADbucket - the bucket to operateobjectKey - the object namettl - the time-to-live of signed URLbuilders - withVersionID the version id of the objectTosExceptionCopyright © 2023. All rights reserved.