public class COSClient extends Object implements COS
Modifier and Type | Field and Description |
---|---|
protected ClientConfig |
clientConfig |
Constructor and Description |
---|
COSClient(COSCredentials cred,
ClientConfig clientConfig) |
COSClient(COSCredentialsProvider credProvider,
ClientConfig clientConfig) |
Modifier and Type | Method and Description |
---|---|
void |
abortMultipartUpload(AbortMultipartUploadRequest abortMultipartUploadRequest)
Aborts a multipart upload.
|
AuditingKeywordResponse |
addAuditingLibKeyWord(AuditingKeywordRequest keywordRequest) |
AuditingStrategyResponse |
addAuditingStrategy(AuditingStrategyRequest auditingStrategyRequest) |
AuditingTextLibResponse |
addAuditingTextLib(AuditingTextLibRequest libRequest) |
boolean |
addGalleryImages(ImageSearchRequest imageSearchRequest) |
Boolean |
addImageStyle(ImageStyleRequest imageStyleRequest) |
AddPersonFaceResponse |
addPersonFace(AddPersonFaceRequest addPersonFaceRequest) |
AIGameRecResponse |
aiGameRec(AIRecRequest aiRecRequest) |
InputStream |
aIImageColoring(AIImageColoringRequest aIImageColoringRequest) |
AppendObjectResult |
appendObject(AppendObjectRequest appendObjectRequest)
append data to an COS object
|
AutoTranslationBlockResponse |
autoTranslationBlock(AutoTranslationBlockRequest translationBlockRequest) |
BatchImageAuditingResponse |
batchImageAuditing(BatchImageAuditingRequest batchImageAuditingRequest)
BatchImageAuditing 批量提交图片审核任务 https://cloud.tencent.com/document/product/460/59383
|
Boolean |
cancelLiveAuditing(VideoAuditingRequest videoAuditingRequest) |
Boolean |
cancelMediaJob(MediaJobsRequest req)
CancelMediaJob 接口用于取消一个任务。 https://cloud.tencent.com/document/product/460/38939
|
CompleteMultipartUploadResult |
completeMultipartUpload(CompleteMultipartUploadRequest completeMultipartUploadRequest)
Completes a multipart upload by assembling previously uploaded parts.
|
CopyObjectResult |
copyObject(CopyObjectRequest copyObjectRequest)
Copy a source object to a new destination in COS.
|
CopyObjectResult |
copyObject(String sourceBucketName,
String sourceKey,
String destinationBucketName,
String destinationKey)
Copy a source object to a new destination in COS.
|
CopyPartResult |
copyPart(CopyPartRequest copyPartRequest)
Copies a source object to a part of a multipart upload.
|
AudioAuditingResponse |
createAudioAuditingJobs(AudioAuditingRequest audioAuditingRequest)
CreateAudioAuditingJobs 音频审核任务创建接口 https://cloud.tencent.com/document/product/460/53395
|
DocumentAuditingResponse |
createAuditingDocumentJobs(DocumentAuditingRequest documentAuditingRequest)
CreateAuditingDocumentJobs 提交文档审核任务 https://cloud.tencent.com/document/product/460/59380
|
TextAuditingResponse |
createAuditingTextJobs(TextAuditingRequest textAuditingRequest)
CreateAuditingTextJobs 音频审核任务查询接口 https://cloud.tencent.com/document/product/460/56289
|
Bucket |
createBucket(CreateBucketRequest createBucketRequest)
Creates a new bucket in the region which is set in ClientConfig
|
Bucket |
createBucket(String bucketName)
Creates a new bucket in the region which is set in ClientConfig
|
CreateDatasetResponse |
createDataset(CreateDatasetRequest customRequest) |
CreateDatasetBindingResponse |
createDatasetBinding(CreateDatasetBindingRequest customRequest) |
Boolean |
createDocProcessBucket(DocBucketRequest docBucketRequest)
createDocProcessBucket 开通文档预览功能
|
DocJobResponse |
createDocProcessJobs(DocJobRequest request)
CreateDocProcessJobs 接口用于提交一个文档预览任务。 https://cloud.tencent.com/document/product/460/46942
|
CreateFileMetaIndexResponse |
createFileMetaIndex(CreateFileMetaIndexRequest customRequest) |
FileProcessJobResponse |
createFileProcessJob(FileProcessRequest req) |
CreateHLSPlayKeyResponse |
createHLSPlayKey(CreateHLSPlayKeyRequest customRequest) |
BatchJobResponse |
createInventoryTriggerJob(BatchJobRequest req) |
Bucket |
createMAZBucket(CreateBucketRequest createBucketRequest) |
MediaJobResponse |
createMediaJobs(MediaJobsRequest req)
CreateMediaJobs 接口用于提交一个任务。 https://cloud.tencent.com/document/product/460/38936
|
MediaJobResponseV2 |
createMediaJobsV2(MediaJobsRequestV2 req) |
Boolean |
createMediaProcessBucket(MediaBucketRequest mediaBucketRequest) |
MediaTemplateResponse |
createMediaTemplate(MediaTemplateRequest templateRequest)
CreateMediaTemplate 用于新增模板。。
动图模板 https://cloud.tencent.com/document/product/460/46989
截图模板 https://cloud.tencent.com/document/product/460/46994
转码模板 https://cloud.tencent.com/document/product/460/46999
|
MediaTemplateResponseV2 |
createMediaTemplateV2(MediaTemplateRequestV2 templateRequest) |
CreatePersonResponse |
createPerson(CreatePersonRequest createPersonRequest) |
MediaJobResponse |
createPicProcessJob(MediaJobsRequest req) |
protected <X extends CosServiceRequest> |
createRequest(String bucketName,
String key,
X originalRequest,
HttpMethodName httpMethod) |
VideoAuditingResponse |
createVideoAuditingJob(VideoAuditingRequest videoAuditingRequest)
CreateVideoAuditingJob 视频审核任务发起接口 https://cloud.tencent.com/document/product/460/46427
|
WebpageAuditingResponse |
createWebpageAuditingJob(WebpageAuditingRequest webpageAuditingRequest)
createWebpageAuditingJob 提交网页审核任务 https://cloud.tencent.com/document/product/460/63968
|
DatasetFaceSearchResponse |
datasetFaceSearch(DatasetFaceSearchRequest customRequest) |
DatasetSimpleQueryResponse |
datasetSimpleQuery(DatasetSimpleQueryRequest customRequest) |
AuditingKeywordResponse |
deleteAuditingKeyWord(AuditingKeywordRequest keywordRequest) |
AuditingTextLibResponse |
deleteAuditingTextLib(AuditingTextLibRequest libRequest) |
void |
deleteBucket(DeleteBucketRequest deleteBucketRequest)
Deletes the specified bucket.
|
void |
deleteBucket(String bucketName)
Deletes the specified bucket.
|
void |
deleteBucketCrossOriginConfiguration(DeleteBucketCrossOriginConfigurationRequest deleteBucketCrossOriginConfigurationRequest)
Delete the cross origin configuration for the specified bucket.
|
void |
deleteBucketCrossOriginConfiguration(String bucketName)
Delete the cross origin configuration for the specified bucket.
|
void |
deleteBucketDomainCertificate(BucketDomainCertificateRequest deleteBucketDomainCertificateRequest)
This operation removes the domain certificate for a bucket.
|
void |
deleteBucketDomainCertificate(String bucketName,
String domainName)
This operation removes the domain certificate for a bucket.
|
void |
deleteBucketDomainConfiguration(DeleteBucketDomainConfigurationRequest deleteBucketDomainConfigurationRequest)
This operation removes the domain configuration for a bucket.
|
void |
deleteBucketDomainConfiguration(String bucketName)
This operation removes the domain configuration for a bucket.
|
DeleteBucketInventoryConfigurationResult |
deleteBucketInventoryConfiguration(DeleteBucketInventoryConfigurationRequest deleteBucketInventoryConfigurationRequest)
Deletes an inventory configuration (identified by the inventory ID) from the bucket.
|
DeleteBucketInventoryConfigurationResult |
deleteBucketInventoryConfiguration(String bucketName,
String id)
Deletes an inventory configuration (identified by the inventory ID) from the bucket.
|
void |
deleteBucketLifecycleConfiguration(DeleteBucketLifecycleConfigurationRequest deleteBucketLifecycleConfigurationRequest)
Removes the lifecycle configuration for the bucket specified.
|
void |
deleteBucketLifecycleConfiguration(String bucketName)
Removes the lifecycle configuration for the bucket specified.
|
void |
deleteBucketPolicy(DeleteBucketPolicyRequest deleteBucketPolicyRequest)
Deletes the policy associated with the specified bucket.
|
void |
deleteBucketPolicy(String bucketName)
Deletes the policy associated with the specified bucket.
|
void |
deleteBucketReplicationConfiguration(DeleteBucketReplicationConfigurationRequest deleteBucketReplicationConfigurationRequest)
Deletes the replication configuration for the given QCloud bucket.
|
void |
deleteBucketReplicationConfiguration(String bucketName)
Deletes the replication configuration for the given QCloud bucket.
|
void |
deleteBucketTaggingConfiguration(DeleteBucketTaggingConfigurationRequest deleteBucketTaggingConfigurationRequest)
Removes the tagging configuration for the bucket specified.
|
void |
deleteBucketTaggingConfiguration(String bucketName)
Removes the tagging configuration for the bucket specified.
|
void |
deleteBucketWebsiteConfiguration(DeleteBucketWebsiteConfigurationRequest deleteBucketWebsiteConfigurationRequest)
This operation removes the website configuration for a bucket.
|
void |
deleteBucketWebsiteConfiguration(String bucketName)
This operation removes the website configuration for a bucket.
|
DeleteDatasetResponse |
deleteDataset(DeleteDatasetRequest customRequest) |
DeleteDatasetBindingResponse |
deleteDatasetBinding(DeleteDatasetBindingRequest customRequest) |
DeleteFileMetaIndexResponse |
deleteFileMetaIndex(DeleteFileMetaIndexRequest customRequest) |
boolean |
deleteGalleryImages(ImageSearchRequest imageSearchRequest) |
Boolean |
deleteImageStyle(ImageStyleRequest imageStyleRequest) |
Boolean |
deleteMediaTemplate(MediaTemplateRequest request)
DeleteMediaTemplate 用于删除模板。 https://cloud.tencent.com/document/product/460/46990
|
void |
deleteObject(DeleteObjectRequest deleteObjectRequest)
Deletes the specified object in the specified bucket.
|
void |
deleteObject(String bucketName,
String key)
Deletes the specified object in the specified bucket.
|
DeleteObjectsResult |
deleteObjects(DeleteObjectsRequest deleteObjectsRequest)
Deletes multiple objects in a single bucket from COS.
|
DeleteObjectTaggingResult |
deleteObjectTagging(DeleteObjectTaggingRequest deleteObjectTaggingRequest)
Remove the tags for the specified object.
|
boolean |
deletePersonFace(DeletePersonFaceRequest customRequest) |
void |
deleteVersion(DeleteVersionRequest deleteVersionRequest)
Deletes a specific version of the specified object in the specified bucket.
|
void |
deleteVersion(String bucketName,
String key,
String versionId)
Deletes a specific version of the specified object in the specified bucket.
|
Boolean |
deleteWorkflow(MediaWorkflowListRequest request)
DeleteWorkflow 接口用于删除工作流。 https://cloud.tencent.com/document/product/460/45947
|
AudioAuditingResponse |
describeAudioAuditingJob(AudioAuditingRequest audioAuditingRequest)
DescribeAudioAuditingJob 音频审核任务查询接口 https://cloud.tencent.com/document/product/460/53396
|
DocumentAuditingResponse |
describeAuditingDocumentJob(DocumentAuditingRequest documentAuditingRequest)
DescribeAuditingDocumentJobs 提交文档审核任务 https://cloud.tencent.com/document/product/460/59383
|
ImageAuditingResponse |
describeAuditingImageJob(DescribeImageAuditingRequest imageAuditingRequest) |
VideoAuditingResponse |
describeAuditingJob(VideoAuditingRequest videoAuditingRequest)
DescribeAuditingJob 视频审核任务查询接口 https://cloud.tencent.com/document/product/460/46926
|
AuditingKeywordResponse |
describeAuditingKeyWordList(AuditingKeywordRequest keywordRequest) |
AuditingStrategyResponse |
describeAuditingStrategy(AuditingStrategyRequest auditingStrategyRequest) |
AuditingStrategyListResponse |
describeAuditingStrategyList(AuditingStrategyRequest auditingStrategyRequest) |
TextAuditingResponse |
describeAuditingTextJob(TextAuditingRequest textAuditingRequest)
DescribeAuditingTextJob 查询文本审核任务结果 https://cloud.tencent.com/document/product/436/56288
|
AuditingTextLibResponse |
describeAuditingTextLib(AuditingTextLibRequest libRequest) |
DescribeDatasetResponse |
describeDataset(DescribeDatasetRequest customRequest) |
DescribeDatasetBindingResponse |
describeDatasetBinding(DescribeDatasetBindingRequest customRequest) |
DescribeDatasetBindingsResponse |
describeDatasetBindings(DescribeDatasetBindingsRequest customRequest) |
DescribeDatasetsResponse |
describeDatasets(DescribeDatasetsRequest customRequest) |
DocBucketResponse |
describeDocProcessBuckets(DocBucketRequest docRequest)
DescribeDocProcessBuckets 接口用于查询存储桶是否已开通文档预览功能。https://cloud.tencent.com/document/product/460/46945
|
DocJobResponse |
describeDocProcessJob(DocJobRequest request)
DescribeDocProcessJob 用于查询指定的文档预览任务。 https://cloud.tencent.com/document/product/460/46943
|
DocJobListResponse |
describeDocProcessJobs(DocJobListRequest request)
DescribeDocProcessJobs 用于拉取符合条件的文档预览任务。 https://cloud.tencent.com/document/product/460/46944
|
DocListQueueResponse |
describeDocProcessQueues(DocQueueRequest docRequest)
DescribeDocProcessQueues 接口用于查询文档预览队列。 https://cloud.tencent.com/document/product/460/46946
|
DescribeFileMetaIndexResponse |
describeFileMetaIndex(DescribeFileMetaIndexRequest customRequest) |
FileProcessJobResponse |
describeFileProcessJob(FileProcessRequest request) |
BatchJobResponse |
describeInventoryTriggerJob(BatchJobRequest request) |
MediaBucketResponse |
describeMediaBuckets(MediaBucketRequest mediaBucketRequest)
DescribeMediaBuckets 接口用于查询存储桶是否已开通媒体处理功能。 https://cloud.tencent.com/document/product/460/38914
|
DNADbFilesResponse |
describeMediaDnaDbFiles(DNADbFilesRequest dnaDbFilesRequest) |
DNADbConfigsResponse |
describeMediaDnaDbs(DNADbConfigsRequest dnaDbConfigsRequest) |
MediaJobResponse |
describeMediaJob(MediaJobsRequest req)
DescribeMediaJob 用于查询指定的任务。 https://cloud.tencent.com/document/product/460/38937
|
MediaListJobResponse |
describeMediaJobs(MediaJobsRequest req)
DescribeMediaJobs 用于拉取符合条件的任务。 https://cloud.tencent.com/document/product/460/38938
|
MediaJobResponseV2 |
describeMediaJobV2(MediaJobsRequestV2 req) |
MediaListQueueResponse |
describeMediaQueues(MediaQueueRequest req)
DescribeMediaQueues 接口用于搜索队列。 https://cloud.tencent.com/document/product/460/38913
|
MediaListTemplateResponse |
describeMediaTemplates(MediaTemplateRequest request)
DescribeMediaTemplates 用于查询动图模板。 https://cloud.tencent.com/document/product/460/46991
|
MediaListTemplateResponse |
describeMediaTemplatesV2(MediaTemplateRequest request) |
MediaListQueueResponse |
describePicProcessQueues(MediaQueueRequest req) |
WebpageAuditingResponse |
describeWebpageAuditingJob(WebpageAuditingRequest webpageAuditingRequest)
describeWebpageAuditingJob 查询网页审核任务 https://cloud.tencent.com/document/product/460/63970
|
MediaWorkflowListResponse |
describeWorkflow(MediaWorkflowListRequest request)
DescribeWorkflow 接口用于搜索工作流。 https://cloud.tencent.com/document/product/460/45948
|
MediaWorkflowExecutionResponse |
describeWorkflowExecution(MediaWorkflowListRequest request)
DescribeWorkflowExecution 接口用于获取工作流实例详情。 https://cloud.tencent.com/document/product/460/45949
|
MediaWorkflowExecutionsResponse |
describeWorkflowExecutions(MediaWorkflowListRequest request)
DescribeWorkflowExecutions 接口用于获取工作流实例列表。 https://cloud.tencent.com/document/product/460/45950
|
DetectCarResponse |
detectCar(AIRecRequest AIRecRequest) |
DetectFaceResponse |
detectFace(DetectFaceRequest detectFaceRequest) |
boolean |
doesBucketExist(String bucketName)
Checks if the specified bucket exists.
|
boolean |
doesObjectExist(String bucketName,
String objectName) |
boolean |
faceSearchBucket(FaceSearchBucketRequest customRequest) |
String |
generateCosDomainPrivateM3U8Url(PrivateM3U8Request privateM3U8Request) |
String |
generateDocPreviewUrl(DocHtmlRequest docJobRequest)
GenerateDocPreviewHtmlUrl 查询账号下已开通文档预览功能的bucket
|
String |
GenerateDocPreviewUrl(DocHtmlRequest docJobRequest) |
MediaInfoResponse |
generateMediainfo(MediaInfoRequest request)
GenerateMediainfo 接口用于获取媒体文件的信息。 https://cloud.tencent.com/document/product/460/38935
|
URL |
generatePresignedUrl(GeneratePresignedUrlRequest req)
Returns a pre-signed URL for accessing COS resource.
|
URL |
generatePresignedUrl(GeneratePresignedUrlRequest req,
Boolean signHost)
Returns a pre-signed URL for accessing COS resource.
|
URL |
generatePresignedUrl(String bucketName,
String key,
Date expiration) |
URL |
generatePresignedUrl(String bucketName,
String key,
Date expiration,
HttpMethodName method)
Returns a pre-signed URL for accessing COS resource.
|
URL |
generatePresignedUrl(String bucketName,
String key,
Date expiration,
HttpMethodName method,
Map<String,String> headers,
Map<String,String> params)
Returns a pre-signed URL for accessing COS resource.
|
URL |
generatePresignedUrl(String bucketName,
String key,
Date expiration,
HttpMethodName method,
Map<String,String> headers,
Map<String,String> params,
Boolean signPrefixMode,
Boolean signHost) |
String |
generateQrcode(GenerateQrcodeRequest generateQrcodeRequest) |
SnapshotResponse |
generateSnapshot(SnapshotRequest request)
GenerateSnapshot 接口用于获取媒体文件某个时间的截图,输出的截图统一为 jpeg 格式。
https://cloud.tencent.com/document/product/460/38934
|
GetAsyncFetchTaskResult |
getAsyncFetchTask(GetAsyncFetchTaskRequest getAsyncFetchTaskRequest)
Deprecated.
|
AccessControlList |
getBucketAcl(GetBucketAclRequest getBucketAclRequest)
Gets the
AccessControlList (ACL) for the specified bucket. |
AccessControlList |
getBucketAcl(String bucketName)
Gets the
AccessControlList (ACL) for the specified bucket. |
BucketCrossOriginConfiguration |
getBucketCrossOriginConfiguration(GetBucketCrossOriginConfigurationRequest getBucketCrossOriginConfigurationRequest)
Gets the cross origin configuration for the specified bucket, or null if no configuration has
been established.
|
BucketCrossOriginConfiguration |
getBucketCrossOriginConfiguration(String bucketName)
Gets the cross origin configuration for the specified bucket, or null if no configuration has
been established.
|
BucketGetDomainCertificate |
getBucketDomainCertificate(BucketDomainCertificateRequest getBucketDomainCertificateRequest)
Returns the domain certificate for the specified bucket.
|
BucketGetDomainCertificate |
getBucketDomainCertificate(String bucketName,
String domainName)
Returns the domain certificate for the specified bucket.
|
BucketDomainConfiguration |
getBucketDomainConfiguration(GetBucketDomainConfigurationRequest getBucketDomainConfigurationRequest)
Returns the domain configuration for the specified bucket.
|
BucketDomainConfiguration |
getBucketDomainConfiguration(String bucketName)
Returns the domain configuration for the specified bucket.
|
BucketIntelligentTierConfiguration |
getBucketIntelligentTierConfiguration(GetBucketIntelligentTierConfigurationRequest getBucketIntelligentTierConfigurationRequest)
Get the intelligent configuration for the specified bucket.
|
BucketIntelligentTierConfiguration |
getBucketIntelligentTierConfiguration(String bucketName)
Get the intelligent configuration for the specified bucket.
|
GetBucketInventoryConfigurationResult |
getBucketInventoryConfiguration(GetBucketInventoryConfigurationRequest getBucketInventoryConfigurationRequest)
Returns an inventory configuration (identified by the inventory ID) from the bucket.
|
GetBucketInventoryConfigurationResult |
getBucketInventoryConfiguration(String bucketName,
String id)
Returns an inventory configuration (identified by the inventory ID) from the bucket.
|
BucketLifecycleConfiguration |
getBucketLifecycleConfiguration(GetBucketLifecycleConfigurationRequest getBucketLifecycleConfigurationRequest)
Gets the lifecycle configuration for the specified bucket, or null if the specified bucket
does not exist or if no configuration has been established.
|
BucketLifecycleConfiguration |
getBucketLifecycleConfiguration(String bucketName)
Gets the lifecycle configuration for the specified bucket, or null if the specified bucket
does not exist or if no configuration has been established.
|
String |
getBucketLocation(GetBucketLocationRequest getBucketLocationRequest)
Gets the geographical region where stores the specified bucket.
|
String |
getBucketLocation(String bucketName)
Gets the geographical region where stores the specified bucket.
|
BucketLoggingConfiguration |
getBucketLoggingConfiguration(GetBucketLoggingConfigurationRequest getBucketLoggingConfigurationRequest)
Gets the logging configuration for the specified bucket.
|
BucketLoggingConfiguration |
getBucketLoggingConfiguration(String bucketName)
Gets the logging configuration for the specified bucket.
|
BucketPolicy |
getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest)
Gets the policy for the specified bucket.
|
BucketPolicy |
getBucketPolicy(String bucketName)
Gets the policy for the specified bucket.
|
BucketRefererConfiguration |
getBucketRefererConfiguration(GetBucketRefererConfigurationRequest getBucketRefererConfigurationRequest)
Returns the referer configuration for the specified bucket.
|
BucketRefererConfiguration |
getBucketRefererConfiguration(String bucketName)
Returns the referer configuration for the specified bucket.
|
BucketReplicationConfiguration |
getBucketReplicationConfiguration(GetBucketReplicationConfigurationRequest getBucketReplicationConfigurationRequest)
Retrieves the replication configuration for the given QCloud bucket.
|
BucketReplicationConfiguration |
getBucketReplicationConfiguration(String bucketName)
Retrieves the replication configuration for the given QCloud bucket.
|
BucketTaggingConfiguration |
getBucketTaggingConfiguration(GetBucketTaggingConfigurationRequest getBucketTaggingConfigurationRequest)
Gets the tagging configuration for the specified bucket, or null if
the specified bucket does not exist, or if no configuration has been established.
|
BucketTaggingConfiguration |
getBucketTaggingConfiguration(String bucketName)
Gets the tagging configuration for the specified bucket, or null if
the specified bucket does not exist, or if no configuration has been established.
|
BucketVersioningConfiguration |
getBucketVersioningConfiguration(GetBucketVersioningConfigurationRequest getBucketVersioningConfigurationRequest)
Returns the versioning configuration for the specified bucket.
|
BucketVersioningConfiguration |
getBucketVersioningConfiguration(String bucketName)
Returns the versioning configuration for the specified bucket.
|
BucketWebsiteConfiguration |
getBucketWebsiteConfiguration(GetBucketWebsiteConfigurationRequest getBucketWebsiteConfigurationRequest)
Returns the website configuration for the specified bucket.
|
BucketWebsiteConfiguration |
getBucketWebsiteConfiguration(String bucketName)
Returns the website configuration for the specified bucket.
|
ClientConfig |
getClientConfig()
return the client config.
|
GetHLSPlayKeyResponse |
getHLSPlayKey(GetHLSPlayKeyRequest customRequest) |
ImageInspectResponse |
getImageInspect(ImageInspectRequest inspectRequest) |
ImageLabelResponse |
getImageLabel(ImageLabelRequest imageLabelRequest)
GetImageLabel 图片标签 https://cloud.tencent.com/document/product/460/39082
|
ImageLabelV2Response |
getImageLabelV2(ImageLabelV2Request imageLabelV2Request)
GetImageLabel 图片标签V2 https://cloud.tencent.com/document/product/460/39082
|
ImageStyleResponse |
getImageStyle(ImageStyleRequest imageStyleRequest) |
COSObject |
getObject(GetObjectRequest getObjectRequest)
Gets the object stored in under the specified bucket and key.
|
ObjectMetadata |
getObject(GetObjectRequest getObjectRequest,
File destinationFile)
Gets the object metadata for the object stored in under the specified bucket and key, and
saves the object contents to the specified file.
|
COSObject |
getObject(String bucketName,
String key)
Gets the object stored in under the specified bucket and key.
|
AccessControlList |
getObjectAcl(GetObjectAclRequest getObjectAclRequest)
Gets the
AccessControlList (ACL) for the specified object in Qcloud COS. |
AccessControlList |
getObjectAcl(String bucketName,
String key)
Gets the
AccessControlList (ACL) for the specified object in Qcloud COS. |
String |
getObjectDecompressionStatus(String bucketName,
String objectKey) |
DecompressionResult |
getObjectDecompressionStatus(String bucketName,
String objectKey,
String jobId)
查询解压任务的状态
|
ObjectMetadata |
getObjectMetadata(GetObjectMetadataRequest getObjectMetadataRequest)
Gets the metadata for the specified object without actually fetching the object itself.
|
ObjectMetadata |
getObjectMetadata(String bucketName,
String key)
Gets the metadata for the specified object without actually fetching the object itself.
|
GetObjectTaggingResult |
getObjectTagging(GetObjectTaggingRequest getObjectTaggingRequest)
Returns the tags for the specified object.
|
URL |
getObjectUrl(GetObjectRequest getObjectRequest) |
URL |
getObjectUrl(String bucketName,
String key) |
URL |
getObjectUrl(String bucketName,
String key,
String versionId) |
InputStream |
getPlayList(GetPlayListRequest getPlayListRequest) |
PrivateM3U8Response |
getPrivateM3U8(PrivateM3U8Request privateM3U8Request) |
InputStream |
getSnapshot(CosSnapshotRequest snapshotRequest) |
GetSymlinkResult |
getSymlink(GetSymlinkRequest getSymlinkRequest)
Get the object the symbolic link actually points to.
|
GoodsMattingResponse |
goodsMatting(GoodsMattingRequest customRequest) |
HeadBucketResult |
headBucket(HeadBucketRequest headBucketRequest)
Performs a head bucket operation on the requested bucket name.
|
ImageAuditingResponse |
imageAuditing(ImageAuditingRequest imageAuditingRequest)
ImageAuditing图片审核 https://cloud.tencent.com/document/product/460/37318
|
ImageOCRResponse |
imageOCR(ImageOCRRequest ocrRequest) |
InitiateMultipartUploadResult |
initiateMultipartUpload(InitiateMultipartUploadRequest initiateMultipartUploadRequest)
Initiates a multipart upload and returns an InitiateMultipartUploadResult which contains an
upload ID.
|
ListBucketInventoryConfigurationsResult |
listBucketInventoryConfigurations(ListBucketInventoryConfigurationsRequest listBucketInventoryConfigurationsRequest)
Returns the list of inventory configurations for the bucket.
|
List<Bucket> |
listBuckets()
Returns a list of all buckets that the authenticated sender of the request owns.
|
List<Bucket> |
listBuckets(ListBucketsRequest listBucketsRequest)
Returns a list of all buckets that the authenticated sender of the request owns.
|
MultipartUploadListing |
listMultipartUploads(ListMultipartUploadsRequest listMultipartUploadsRequest)
Lists in-progress multipart uploads.
|
ObjectListing |
listNextBatchOfObjects(ListNextBatchOfObjectsRequest listNextBatchOfObjectsRequest)
Provides an easy way to continue a truncated object listing and retrieve the next page of
results.
|
ObjectListing |
listNextBatchOfObjects(ObjectListing previousObjectListing)
Provides an easy way to continue a truncated object listing and retrieve the next page of
results.
|
VersionListing |
listNextBatchOfVersions(ListNextBatchOfVersionsRequest listNextBatchOfVersionsRequest)
Provides an easy way to continue a truncated
VersionListing and retrieve the next
page of results. |
VersionListing |
listNextBatchOfVersions(VersionListing previousVersionListing)
Provides an easy way to continue a truncated
VersionListing and retrieve the next
page of results. |
ListJobsResult |
listObjectDecompressionJobs(String bucketName,
String jobStatus,
String sortBy,
String maxResults,
String nextToken)
列出解压缩任务列表.
|
ObjectListing |
listObjects(ListObjectsRequest listObjectsRequest)
Returns a list of summary information about the objects in the specified bucket.
|
ObjectListing |
listObjects(String bucketName)
Returns a list of summary information about the objects in the specified buckets.
|
ObjectListing |
listObjects(String bucketName,
String prefix)
Returns a list of summary information about the objects in the specified bucket.
|
PartListing |
listParts(ListPartsRequest listPartsRequest)
Lists the parts that have been uploaded for a specific multipart upload.
|
VersionListing |
listVersions(ListVersionsRequest listVersionsRequest)
Returns a list of summary information about the versions in the specified bucket.
|
VersionListing |
listVersions(String bucketName,
String prefix)
Returns a list of summary information about the versions in the specified bucket.
|
VersionListing |
listVersions(String bucketName,
String prefix,
String keyMarker,
String versionIdMarker,
String delimiter,
Integer maxResults)
Returns a list of summary information about the versions in the specified bucket.
|
boolean |
openImageSearch(OpenImageSearchRequest imageSearchRequest) |
protected static void |
populateRequestMetadata(CosHttpRequest<?> request,
ObjectMetadata metadata)
Populates the specified request object with the appropriate headers from the
ObjectMetadata object. |
DecompressionResult |
postObjectDecompression(DecompressionRequest decompressionRequest)
提交一个解压任务
|
PostSpeechRecognitionResponse |
postSpeechRecognition(PostSpeechRecognitionRequest postSpeechRecognitionRequest) |
CIUploadResult |
processImage(ImageProcessRequest imageProcessRequest)
process Image 接口用于对图片进行处理
|
boolean |
processImage2(CImageProcessRequest imageProcessRequest) |
PutAsyncFetchTaskResult |
putAsyncFetchTask(PutAsyncFetchTaskRequest putAsyncFetchTaskRequest)
Deprecated.
|
PutObjectResult |
putObject(PutObjectRequest putObjectRequest)
Uploads a new object to the specified bucket.
|
PutObjectResult |
putObject(String bucketName,
String key,
File file)
Uploads the specified file to under the specified bucket and key name.
|
PutObjectResult |
putObject(String bucketName,
String key,
InputStream input,
ObjectMetadata metadata)
Uploads the specified file to under the specified bucket and key name.
|
PutObjectResult |
putObject(String bucketName,
String key,
String content)
upload string content to a cos object.
|
PutSymlinkResult |
putSymlink(PutSymlinkRequest putSymlinkRequest)
Create a Symlink for the specified object.
|
RecognizeLogoResponse |
recognizeLogo(RecognizeLogoRequest customRequest) |
void |
rename(RenameRequest renameRequest)
rename object, which contains both file or dir in fs
|
String |
reportBadCase(ReportBadCaseRequest reportBadCaseRequest) |
void |
restoreObject(RestoreObjectRequest restoreObjectRequest)
Restore an object, which was transitioned to CAS from COS when it was expired, into COS
again.
|
void |
restoreObject(String bucketName,
String key,
int expirationInDays)
Restore an object, which was transitioned to CAS from COS when it was expired, into COS
again.
|
ImageSearchResponse |
searchGalleryImages(ImageSearchRequest imageSearchRequest) |
SearchImageResponse |
searchImage(SearchImageRequest customRequest) |
SearchPersonFaceResponse |
searchPersonFace(SearchPersonFaceRequest customRequest) |
SelectObjectContentResult |
selectObjectContent(SelectObjectContentRequest selectRequest)
This operation filters the contents of an COS object based on a simple Structured Query Language (SQL) statement.
|
void |
setBucketAcl(SetBucketAclRequest setBucketAclRequest)
Sets the
AccessControlList for the specified bucket. |
void |
setBucketAcl(String bucketName,
AccessControlList acl)
Sets the
AccessControlList for the specified bucket. |
void |
setBucketAcl(String bucketName,
CannedAccessControlList acl)
Sets the
CannedAccessControlList for the specified bucket. |
void |
setBucketCrossOriginConfiguration(SetBucketCrossOriginConfigurationRequest setBucketCrossOriginConfigurationRequest)
Sets the cross origin configuration for the specified bucket.
|
void |
setBucketCrossOriginConfiguration(String bucketName,
BucketCrossOriginConfiguration bucketCrossOriginConfiguration)
Sets the cross origin configuration for the specified bucket.
|
void |
setBucketDomainCertificate(SetBucketDomainCertificateRequest setBucketDomainCertificateRequest)
Sets the domain certificate for the specified bucket.
|
void |
setBucketDomainCertificate(String bucketName,
BucketPutDomainCertificate domainCertificate)
Sets the domain certificate for the specified bucket.
|
void |
setBucketDomainConfiguration(SetBucketDomainConfigurationRequest setBucketDomainConfigurationRequest)
Sets the domain configuration for the specified bucket.
|
void |
setBucketDomainConfiguration(String bucketName,
BucketDomainConfiguration configuration)
Sets the domain configuration for the specified bucket.
|
void |
setBucketIntelligentTieringConfiguration(SetBucketIntelligentTierConfigurationRequest setBucketIntelligentTierConfigurationRequest)
Sets the intelligent configuration for the specified bucket.
|
SetBucketInventoryConfigurationResult |
setBucketInventoryConfiguration(SetBucketInventoryConfigurationRequest setBucketInventoryConfigurationRequest)
Sets an inventory configuration (identified by the inventory ID) to the bucket.
|
SetBucketInventoryConfigurationResult |
setBucketInventoryConfiguration(String bucketName,
InventoryConfiguration inventoryConfiguration)
Sets an inventory configuration (identified by the inventory ID) to the bucket.
|
void |
setBucketLifecycleConfiguration(SetBucketLifecycleConfigurationRequest setBucketLifecycleConfigurationRequest)
Sets the lifecycle configuration for the specified bucket.
|
void |
setBucketLifecycleConfiguration(String bucketName,
BucketLifecycleConfiguration bucketLifecycleConfiguration)
Sets the lifecycle configuration for the specified bucket.
|
void |
setBucketLoggingConfiguration(SetBucketLoggingConfigurationRequest setBucketLoggingConfigurationRequest)
Sets the logging configuration for the specified bucket.
|
void |
setBucketPolicy(SetBucketPolicyRequest setBucketPolicyRequest)
Sets the policy associated with the specified bucket.
|
void |
setBucketPolicy(String bucketName,
String policyText)
Sets the policy associated with the specified bucket.
|
void |
setBucketRefererConfiguration(SetBucketRefererConfigurationRequest setBucketRefererConfigurationRequest)
Sets the referer configuration for the specified bucket.
|
void |
setBucketRefererConfiguration(String bucketName,
BucketRefererConfiguration configuration)
Sets the referer configuration for the specified bucket.
|
void |
setBucketReplicationConfiguration(SetBucketReplicationConfigurationRequest setBucketReplicationConfigurationRequest)
Sets a replication configuration for the QCloud bucket.
|
void |
setBucketReplicationConfiguration(String bucketName,
BucketReplicationConfiguration configuration)
Sets a replication configuration for a bucket.
|
void |
setBucketTaggingConfiguration(SetBucketTaggingConfigurationRequest setBucketTaggingConfigurationRequest)
Sets the tagging configuration for the specified bucket.
|
void |
setBucketTaggingConfiguration(String bucketName,
BucketTaggingConfiguration bucketTaggingConfiguration)
Sets the tagging configuration for the specified bucket.
|
void |
setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest)
Sets the versioning configuration for the specified bucket.
|
void |
setBucketWebsiteConfiguration(SetBucketWebsiteConfigurationRequest setBucketWebsiteConfigurationRequest)
Sets the website configuration for the specified bucket.
|
void |
setBucketWebsiteConfiguration(String bucketName,
BucketWebsiteConfiguration configuration)
Sets the website configuration for the specified bucket.
|
void |
setCOSCredentials(COSCredentials cred) |
void |
setCOSCredentialsProvider(COSCredentialsProvider credProvider) |
void |
setObjectAcl(SetObjectAclRequest setObjectAclRequest)
Sets the
AccessControlList for the specified object. |
void |
setObjectAcl(String bucketName,
String key,
AccessControlList acl)
Sets the
CannedAccessControlList for the specified object. |
void |
setObjectAcl(String bucketName,
String key,
CannedAccessControlList acl)
Sets the
CannedAccessControlList for the specified object. |
SetObjectTaggingResult |
setObjectTagging(SetObjectTaggingRequest setObjectTaggingRequest)
Set the tags for the specified object.
|
void |
shutdown() |
MediaWorkflowListResponse |
triggerWorkflowList(MediaWorkflowListRequest mediaWorkflowListRequest) |
UpdataHLSPlayKeyResponse |
updataHLSPlayKey(UpdataHLSPlayKeyRequest customRequest) |
AuditingStrategyResponse |
updateAuditingStrategy(AuditingStrategyRequest auditingStrategyRequest) |
AuditingTextLibResponse |
updateAuditingTextLib(AuditingTextLibRequest libRequest) |
UpdateDatasetResponse |
updateDataset(UpdateDatasetRequest customRequest) |
boolean |
updateDocProcessQueue(DocQueueRequest docRequest)
UpdateDocProcessQueue 接口用于更新文档预览队列。https://cloud.tencent.com/document/product/460/46947
|
UpdateFileMetaIndexResponse |
updateFileMetaIndex(UpdateFileMetaIndexRequest customRequest) |
MediaQueueResponse |
updateMediaQueue(MediaQueueRequest mediaQueueRequest)
UpdateMediaQueue 接口用于更新队列。 https://cloud.tencent.com/document/product/460/42324
|
Boolean |
updateMediaTemplate(MediaTemplateRequest request)
UpdateMediaTemplate 用于更新模板。。 https://cloud.tencent.com/document/product/460/46992
|
void |
updateObjectMetaData(String bucketName,
String key,
ObjectMetadata objectMetadata)
update the object meta.
|
protected <UploadObjectRequest extends PutObjectRequest> |
uploadObjectInternal(UploadMode uploadMode,
UploadObjectRequest uploadObjectRequest) |
UploadPartResult |
uploadPart(UploadPartRequest uploadPartRequest)
Uploads a part in a multipart upload.
|
ZipPreviewResponse |
zipPreview(ZipPreviewRequest zipPreviewRequest) |
protected ClientConfig clientConfig
public COSClient(COSCredentials cred, ClientConfig clientConfig)
public COSClient(COSCredentialsProvider credProvider, ClientConfig clientConfig)
public void shutdown()
public void setCOSCredentials(COSCredentials cred)
public void setCOSCredentialsProvider(COSCredentialsProvider credProvider)
public ClientConfig getClientConfig()
COS
getClientConfig
in interface COS
protected <X extends CosServiceRequest> CosHttpRequest<X> createRequest(String bucketName, String key, X originalRequest, HttpMethodName httpMethod)
protected static void populateRequestMetadata(CosHttpRequest<?> request, ObjectMetadata metadata)
Populates the specified request object with the appropriate headers from the
ObjectMetadata
object.
request
- The request to populate with headers.metadata
- The metadata containing the header information to include in the request.public PutObjectResult putObject(PutObjectRequest putObjectRequest) throws CosClientException, CosServiceException
COS
Uploads a new object to the specified bucket. The PutObjectRequest
contains all
the details of the request, including the bucket to upload to, the key the object will be
uploaded under, and the file or input stream containing the data to upload.
never stores partial objects; if during this call an exception wasn't thrown, the entire object was stored.
Depending on whether a file or input stream is being uploaded, this method has slightly different behavior.
When uploading a file:
When uploading directly from an input stream:
The specified bucket must already exist and the caller must have Permission.Write
permission to the bucket to upload an object.
putObject
in interface COS
putObject
in interface COSDirectSpi
putObjectRequest
- The request object containing all the parameters to upload a new
object to .PutObjectResult
object containing the information returned by for the newly
created object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.putObject(String, String, File)
,
COS.putObject(String, String, InputStream, ObjectMetadata)
public AppendObjectResult appendObject(AppendObjectRequest appendObjectRequest) throws CosServiceException, CosClientException
COS
appendObject
in interface COS
CosServiceException
CosClientException
public void rename(RenameRequest renameRequest) throws CosServiceException, CosClientException
COS
rename
in interface COS
CosServiceException
CosClientException
protected <UploadObjectRequest extends PutObjectRequest> ObjectMetadata uploadObjectInternal(UploadMode uploadMode, UploadObjectRequest uploadObjectRequest) throws CosClientException, CosServiceException
public PutObjectResult putObject(String bucketName, String key, File file) throws CosClientException, CosServiceException
COS
Uploads the specified file to under the specified bucket and key name.
never stores partial objects; if during this call an exception wasn't thrown, the entire object was stored.
The client automatically computes a checksum of the file. uses checksums to validate the data in each file.
Using the file extension, attempts to determine the correct content type and content disposition to use for the object.
The specified bucket must already exist and the caller must have Permission.Write
permission to the bucket to upload an object.
putObject
in interface COS
bucketName
- The name of an existing bucket, to which you have Permission.Write
permission.key
- The key under which to store the specified file.file
- The file containing the data to be uploaded to .PutObjectResult
object containing the information returned by for the newly
created object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.putObject(PutObjectRequest)
,
COS.putObject(String, String, InputStream, ObjectMetadata)
public PutObjectResult putObject(String bucketName, String key, InputStream input, ObjectMetadata metadata) throws CosClientException, CosServiceException
COS
Uploads the specified file to under the specified bucket and key name.
never stores partial objects; if during this call an exception wasn't thrown, the entire object was stored.
When uploading directly from an input stream:
The specified bucket must already exist and the caller must have Permission.Write
permission to the bucket to upload an object.
putObject
in interface COS
bucketName
- The name of an existing bucket, to which you have Permission.Write
permission.key
- The key under which to store the specified file.input
- The input stream containing the data to be uploaded to .metadata
- Additional metadata instructing how to handle the uploaded data (e.g. custom
user metadata, hooks for specifying content type, etc.).PutObjectResult
object containing the information returned by for the newly
created object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.putObject(PutObjectRequest)
,
COS.putObject(String, String, File)
public PutObjectResult putObject(String bucketName, String key, String content) throws CosClientException, CosServiceException
COS
upload string content to a cos object. content will be encoded to bytes with UTF-8 encoding
putObject
in interface COS
bucketName
- The name of an existing bucket, to which you have Permission.Write
permission.key
- The key under which to store the specified file.content
- the object content, content will be encoded to bytes with UTF-8 encoding.PutObjectResult
object containing the information returned by for the newly
created object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.putObject(PutObjectRequest)
,
COS.putObject(String, String, File)
public COSObject getObject(String bucketName, String key) throws CosClientException, CosServiceException
COS
Gets the object stored in under the specified bucket and key.
Be extremely careful when using this method; the returned COS object contains a direct stream of data from the HTTP connection. The underlying HTTP connection cannot be closed until the user finishes reading the data and closes the stream. Therefore:
To get an object from , the caller must have Permission.Read
access to the object.
If the object fetched is publicly readable, it can also read it by pasting its URL into a browser.
For more advanced options (such as downloading only a range of an object's content, or
placing constraints on when the object should be downloaded) callers can use
COS.getObject(GetObjectRequest)
.
getObject
in interface COS
bucketName
- The name of the bucket containing the desired object.key
- The key under which the desired object is stored.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.getObject(GetObjectRequest)
,
COS.getObject(GetObjectRequest, File)
public COSObject getObject(GetObjectRequest getObjectRequest) throws CosClientException, CosServiceException
COS
Gets the object stored in under the specified bucket and key. Returns null
if
the specified constraints weren't met.
Be extremely careful when using this method; the returned COS object contains a direct stream of data from the HTTP connection. The underlying HTTP connection cannot be closed until the user finishes reading the data and closes the stream. Therefore:
If callers do not follow those rules, then the client can run out of resources if allocating too many open, but unused, HTTP connections.
To get an object from , the caller must have Permission.Read
access to the object.
If the object fetched is publicly readable, it can also read it by pasting its URL into a browser.
When specifying constraints in the request object, the client needs to be prepared to handle
this method returning null
if the provided constraints aren't met when Qcloud
COS receives the request.
If the advanced options provided in GetObjectRequest
aren't needed, use the simpler
COS.getObject(String bucketName, String key)
method.
getObject
in interface COS
getObject
in interface COSDirectSpi
getObjectRequest
- The request object containing all the options on how to download the
object.null
if
constraints were specified but not met.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.getObject(String, String)
,
COS.getObject(GetObjectRequest, File)
public ObjectMetadata getObject(GetObjectRequest getObjectRequest, File destinationFile) throws CosClientException, CosServiceException
COS
Gets the object metadata for the object stored in under the specified bucket and key, and
saves the object contents to the specified file. Returns null
if the specified
constraints weren't met.
Instead of using COS.getObject(GetObjectRequest)
, use this method to ensure that the
underlying HTTP stream resources are automatically closed as soon as possible. The clients
handles immediate storage of the object contents to the specified file.
To get an object from , the caller must have Permission.Read
access to the object.
If the object fetched is publicly readable, it can also read it by pasting its URL into a browser.
When specifying constraints in the request object, the client needs to be prepared to handle
this method returning null
if the provided constraints aren't met when Qcloud
COS receives the request.
getObject
in interface COS
getObject
in interface COSDirectSpi
getObjectRequest
- The request object containing all the options on how to download the
object content.destinationFile
- Indicates the file (which might already exist) where to save the
object content being downloading from .null
if
constraints were specified but not met.CosClientException
- If any errors are encountered in the client while making the
request, handling the response, or writing the incoming data from COS to the
specified destination file.CosServiceException
- If any errors occurred in while processing the request.COS.getObject(String, String)
,
COS.getObject(GetObjectRequest)
public PutSymlinkResult putSymlink(PutSymlinkRequest putSymlinkRequest)
COS
Create a Symlink for the specified object.
The PutSymlinkRequest
contains all the details of the request, including the bucket created to,
the symLink name referred to the target object, the target object key.
putSymlink
in interface COS
putSymlinkRequest
- the request object containing all the parameter to create a symlink.public GetSymlinkResult getSymlink(GetSymlinkRequest getSymlinkRequest)
COS
Get the object the symbolic link actually points to.
The GetSymlinkRequest
contains all the details of the request, including the bucket created to,
the symbolic link queried.
getSymlink
in interface COS
getSymlinkRequest
- the request object containing all the parameter to get a symlink.public boolean doesObjectExist(String bucketName, String objectName) throws CosClientException, CosServiceException
doesObjectExist
in interface COS
bucketName
- Name of bucket that presumably contains objectobjectName
- Name of object that has to be checkedCosClientException
- If any errors are encountered in the client while making the
request, handling the response, or writing the incoming data from COS to the
specified destination file.CosServiceException
- If any errors occurred in while processing the request.public ObjectMetadata getObjectMetadata(String bucketName, String key) throws CosClientException, CosServiceException
COS
Gets the metadata for the specified object without actually fetching the object itself. This is useful in obtaining only the object metadata, and avoids wasting bandwidth on fetching the object data.
The object metadata contains information such as content type, content disposition, etc., as well as custom user metadata that can be associated with an object in .
getObjectMetadata
in interface COS
bucketName
- bucket namekey
- cos pathCosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public ObjectMetadata getObjectMetadata(GetObjectMetadataRequest getObjectMetadataRequest) throws CosClientException, CosServiceException
COS
Gets the metadata for the specified object without actually fetching the object itself. This is useful in obtaining only the object metadata, and avoids wasting bandwidth on fetching the object data.
The object metadata contains information such as content type, content disposition, etc., as well as custom user metadata that can be associated with an object in .
getObjectMetadata
in interface COS
getObjectMetadataRequest
- The request object specifying the bucket, key and optional
version ID of the object whose metadata is being retrieved.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.getObjectMetadata(String, String)
public void deleteObject(String bucketName, String key) throws CosClientException, CosServiceException
COS
Deletes the specified object in the specified bucket. Once deleted, the object can only be restored if versioning was enabled when the object was deleted.
If attempting to delete an object that does not exist, will return a success message instead of an error message.
deleteObject
in interface COS
bucketName
- bucket namekey
- cos pathCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void deleteObject(DeleteObjectRequest deleteObjectRequest) throws CosClientException, CosServiceException
COS
Deletes the specified object in the specified bucket. Once deleted, the object can only be restored if versioning was enabled when the object was deleted.
If attempting to delete an object that does not exist, will return a success message instead of an error message.
deleteObject
in interface COS
deleteObjectRequest
- The request object containing all options for deleting an Qcloud
COS object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.deleteObject(String, String)
public DeleteObjectsResult deleteObjects(DeleteObjectsRequest deleteObjectsRequest) throws MultiObjectDeleteException, CosClientException, CosServiceException
COS
In some cases, some objects will be successfully deleted, while some attempts will cause an
error. If any object in the request cannot be deleted, this method throws a
MultiObjectDeleteException
with details of the error.
deleteObjects
in interface COS
deleteObjectsRequest
- The request object containing all options for deleting multiple
objects.MultiObjectDeleteException
- if one or more of the objects couldn't be deleted.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void deleteVersion(String bucketName, String key, String versionId) throws CosClientException, CosServiceException
COS
Deletes a specific version of the specified object in the specified bucket. Once deleted, there is no method to restore or undelete an object version. This is the only way to permanently delete object versions that are protected by versioning.
Deleting an object version is permanent and irreversible. It is a privileged operation that only the owner of the bucket containing the version can perform.
Users can only delete a version of an object if versioning is enabled for the bucket. For
more information about enabling versioning for a bucket, see
COS.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
If attempting to delete an object that does not exist, COS will return a success message instead of an error message.
deleteVersion
in interface COS
bucketName
- The name of the COS bucket containing the object to delete.key
- The key of the object to delete.versionId
- The version of the object to delete.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void deleteVersion(DeleteVersionRequest deleteVersionRequest) throws CosClientException, CosServiceException
COS
Deletes a specific version of the specified object in the specified bucket. Once deleted, there is no method to restore or undelete an object version. This is the only way to permanently delete object versions that are protected by versioning.
Deleting an object version is permanent and irreversible. It is a privileged operation that only the owner of the bucket containing the version can perform.
Users can only delete a version of an object if versioning is enabled for the bucket. For
more information about enabling versioning for a bucket, see
COS.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
If attempting to delete an object that does not exist, COS will return a success message instead of an error message.
deleteVersion
in interface COS
deleteVersionRequest
- The request object containing all options for deleting a specific
version of an COS object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public Bucket createBucket(String bucketName) throws CosClientException, CosServiceException
COS
Creates a new bucket in the region which is set in ClientConfig
Every object stored in is contained within a bucket. Appid and Bucket partition the namespace of objects stored in at the top level. Within a bucket, any name can be used for objects.
There are no limits to the number of objects that can be stored in a bucket. Performance does not vary based on the number of buckets used. Store all objects within a single bucket or organize them across several buckets.
Buckets cannot be nested; buckets cannot be created within other buckets.
Do not make bucket create or delete calls in the high availability code path of an application. Create or delete buckets in a separate initialization or setup routine that runs less often.
To create a bucket, authenticate with an account that has a valid Qcloud Access Key ID and is registered with . Anonymous requests are never allowed to create buckets.
createBucket
in interface COS
bucketName
- The name of the bucket to be createdCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public Bucket createBucket(CreateBucketRequest createBucketRequest) throws CosClientException, CosServiceException
COS
Creates a new bucket in the region which is set in ClientConfig
Every object stored in is contained within a bucket. Appid and Bucket partition the namespace of objects stored in at the top level. Within a bucket, any name can be used for objects.
There are no limits to the number of objects that can be stored in a bucket. Performance does not vary based on the number of buckets used. Store all objects within a single bucket or organize them across several buckets.
Buckets cannot be nested; buckets cannot be created within other buckets.
Do not make bucket create or delete calls in the high availability code path of an application. Create or delete buckets in a separate initialization or setup routine that runs less often.
To create a bucket, authenticate with an account that has a valid Qcloud Access Key ID and is registered with . Anonymous requests are never allowed to create buckets.
createBucket
in interface COS
createBucketRequest
- The request object containing all options for creating an Qcloud
COS bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public Bucket createMAZBucket(CreateBucketRequest createBucketRequest) throws CosClientException, CosServiceException
public void deleteBucket(String bucketName) throws CosClientException, CosServiceException
COS
Deletes the specified bucket. All objects (and all object versions, if versioning was ever enabled) in the bucket must be deleted before the bucket itself can be deleted.
Only the owner of a bucket can delete it, regardless of the bucket's access control policy (ACL).
deleteBucket
in interface COS
bucketName
- The name of the bucket to be deletedCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void deleteBucket(DeleteBucketRequest deleteBucketRequest) throws CosClientException, CosServiceException
COS
Deletes the specified bucket. All objects (and all object versions, if versioning was ever enabled) in the bucket must be deleted before the bucket itself can be deleted.
Only the owner of a bucket can delete it, regardless of the bucket's access control policy (ACL).
deleteBucket
in interface COS
deleteBucketRequest
- The request object containing all options for deleting an Qcloud
COS bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.deleteBucket(String)
public boolean doesBucketExist(String bucketName) throws CosClientException, CosServiceException
COS
Internally this uses the COS.getBucketAcl(String)
operation to determine whether the
bucket exists.
doesBucketExist
in interface COS
bucketName
- The name of the bucket to check.true
if the specified bucket exists ; the value
false
if there is no bucket with that name.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public HeadBucketResult headBucket(HeadBucketRequest headBucketRequest) throws CosClientException, CosServiceException
COS
headBucket
in interface COS
headBucketRequest
- The request containing the bucket name.HeadBucketResult
if the bucket exists and you have
permission to access it. Otherwise, the method will throw an
CosServiceException
with status code '404 Not Found'
if the bucket
does not exist, '403 Forbidden'
if the user does not have access to the
bucketCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public List<Bucket> listBuckets() throws CosClientException, CosServiceException
COS
Returns a list of all buckets that the authenticated sender of the request owns.
listBuckets
in interface COS
CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public List<Bucket> listBuckets(ListBucketsRequest listBucketsRequest) throws CosClientException, CosServiceException
COS
Returns a list of all buckets that the authenticated sender of the request owns.
listBuckets
in interface COS
listBucketsRequest
- The request containing all of the options related to the listing of
buckets.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public String getBucketLocation(String bucketName) throws CosClientException, CosServiceException
COS
Gets the geographical region where stores the specified bucket.
To view the location constraint of a bucket, the user must be the bucket owner.
getBucketLocation
in interface COS
bucketName
- The name of the bucket to get locationCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public String getBucketLocation(GetBucketLocationRequest getBucketLocationRequest) throws CosClientException, CosServiceException
COS
Gets the geographical region where stores the specified bucket.
To view the location constraint of a bucket, the user must be the bucket owner.
getBucketLocation
in interface COS
getBucketLocationRequest
- The request object containing the name of the bucket to look
up. This must be a bucket the user owns.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public InitiateMultipartUploadResult initiateMultipartUpload(InitiateMultipartUploadRequest initiateMultipartUploadRequest) throws CosClientException, CosServiceException
COS
COS.uploadPart(UploadPartRequest)
requests. You also include this
upload ID in the final request to either complete, or abort the multipart upload request.
Note: After you initiate a multipart upload and upload one or more parts, you must either complete or abort the multipart upload in order to stop getting charged for storage of the uploaded parts. Once you complete or abort the multipart upload will release the stored parts and stop charging you for their storage.
initiateMultipartUpload
in interface COS
initiateMultipartUpload
in interface COSDirectSpi
initiateMultipartUploadRequest
- The InitiateMultipartUploadRequest object that specifies all the parameters of
this operation.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public UploadPartResult uploadPart(UploadPartRequest uploadPartRequest) throws CosClientException, CosServiceException
COS
Your UploadPart request must include an upload ID and a part number. The upload ID is the ID returned by in response to your Initiate Multipart Upload request. Part number can be any number between 1 and 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being uploaded. If you upload a new part using the same part number that was specified in uploading a previous part, the previously uploaded part is overwritten.
To ensure data is not corrupted traversing the network, specify the Content-MD5 header in the Upload Part request. checks the part data against the provided MD5 value. If they do not match, returns an error.
When you upload a part, the returned UploadPartResult contains an ETag property. You should record this ETag property value and the part number. After uploading all parts, you must send a CompleteMultipartUpload request. At that time constructs a complete object by concatenating all the parts you uploaded, in ascending order based on the part numbers. The CompleteMultipartUpload request requires you to send all the part numbers and the corresponding ETag values.
Note: After you initiate a multipart upload and upload one or more parts, you must either complete or abort the multipart upload in order to stop getting charged for storage of the uploaded parts. Once you complete or abort the multipart upload will release the stored parts and stop charging you for their storage.
uploadPart
in interface COS
uploadPart
in interface COSDirectSpi
CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public PartListing listParts(ListPartsRequest listPartsRequest) throws CosClientException, CosServiceException
COS
This method must include the upload ID, returned by the
COS.initiateMultipartUpload(InitiateMultipartUploadRequest)
operation. This request
returns a maximum of 1000 uploaded parts by default. You can restrict the number of parts
returned by specifying the MaxParts property on the ListPartsRequest. If your multipart
upload consists of more parts than allowed in the ListParts response, the response returns a
IsTruncated field with value true, and a NextPartNumberMarker property. In subsequent
ListParts request you can include the PartNumberMarker property and set its value to the
NextPartNumberMarker property value from the previous response.
listParts
in interface COS
listPartsRequest
- The ListPartsRequest object that specifies all the parameters of this
operation.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void abortMultipartUpload(AbortMultipartUploadRequest abortMultipartUploadRequest) throws CosClientException, CosServiceException
COS
abortMultipartUpload
in interface COS
abortMultipartUpload
in interface COSDirectSpi
abortMultipartUploadRequest
- The AbortMultipartUploadRequest object that specifies all the parameters of
this operation.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public CompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest completeMultipartUploadRequest) throws CosClientException, CosServiceException
COS
You first upload all parts using the COS.uploadPart(UploadPartRequest)
method. After
successfully uploading all individual parts of an upload, you call this operation to complete
the upload. Upon receiving this request, concatenates all the parts in ascending order by
part number to create a new object. In the CompleteMultipartUpload request, you must provide
the parts list. For each part in the list, you provide the part number and the ETag header
value, returned after that part was uploaded.
Processing of a CompleteMultipartUpload request may take several minutes to complete.
completeMultipartUpload
in interface COS
completeMultipartUpload
in interface COSDirectSpi
completeMultipartUploadRequest
- The CompleteMultipartUploadRequest object that specifies all the parameters of
this operation.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public MultipartUploadListing listMultipartUploads(ListMultipartUploadsRequest listMultipartUploadsRequest) throws CosClientException, CosServiceException
COS
This operation returns at most 1,000 multipart uploads in the response by default. The number of multipart uploads can be further limited using the MaxUploads property on the request parameter. If there are additional multipart uploads that satisfy the list criteria, the response will contain an IsTruncated property with the value set to true. To list the additional multipart uploads use the KeyMarker and UploadIdMarker properties on the request parameters.
listMultipartUploads
in interface COS
listMultipartUploadsRequest
- The ListMultipartUploadsRequest object that specifies all the parameters of
this operation.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public ObjectListing listObjects(String bucketName) throws CosClientException, CosServiceException
COS
Returns a list of summary information about the objects in the specified buckets. List results are always returned in lexicographic (alphabetical) order.
Because buckets can contain a virtually unlimited number of keys, the complete results of a
list query can be extremely large. To manage large result sets, uses pagination to split them
into multiple responses. Always check the ObjectListing.isTruncated()
method to see
if the returned listing is complete or if additional calls are needed to get more results.
Alternatively, use the COS.listNextBatchOfObjects(ObjectListing)
method as an easy
way to get the next page of object listings.
The total number of keys in a bucket doesn't substantially affect list performance.
listObjects
in interface COS
bucketName
- The name of the bucket to list.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listObjects(String, String)
,
COS.listObjects(ListObjectsRequest)
public ObjectListing listObjects(String bucketName, String prefix) throws CosClientException, CosServiceException
COS
Returns a list of summary information about the objects in the specified bucket. Depending on request parameters, additional information is returned, such as common prefixes if a delimiter was specified. List results are always returned in lexicographic (alphabetical) order.
Because buckets can contain a virtually unlimited number of keys, the complete results of a
list query can be extremely large. To manage large result sets, uses pagination to split them
into multiple responses. Always check the ObjectListing.isTruncated()
method to see
if the returned listing is complete or if additional calls are needed to get more results.
Alternatively, use the COS.listNextBatchOfObjects(ObjectListing)
method as an easy
way to get the next page of object listings.
For example, consider a bucket that contains the following keys:
listObjects
with a prefix
value of "foo/" and a
delimiter
value of "/" on this bucket, an ObjectListing
is returned
that contains one key ("foo/boo") and one entry in the common prefixes list ("foo/bar/"). To
see deeper into the virtual hierarchy, make another call to listObjects
setting
the prefix parameter to any interesting common prefix to list the individual keys under that
prefix.
The total number of keys in a bucket doesn't substantially affect list performance.
listObjects
in interface COS
bucketName
- The name of the bucket to list.prefix
- An optional parameter restricting the response to keys beginning with the
specified prefix. Use prefixes to separate a bucket into different sets of keys,
similar to how a file system organizes files into directories.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listObjects(String)
,
COS.listObjects(ListObjectsRequest)
public ObjectListing listObjects(ListObjectsRequest listObjectsRequest) throws CosClientException, CosServiceException
COS
Returns a list of summary information about the objects in the specified bucket. Depending on the request parameters, additional information is returned, such as common prefixes if a delimiter was specified. List results are always returned in lexicographic (alphabetical) order.
Because buckets can contain a virtually unlimited number of keys, the complete results of a
list query can be extremely large. To manage large result sets, uses pagination to split them
into multiple responses. Always check the ObjectListing.isTruncated()
method to see
if the returned listing is complete or if additional calls are needed to get more results.
Alternatively, use the COS.listNextBatchOfObjects(ObjectListing)
method as an easy
way to get the next page of object listings.
Calling ListObjectsRequest.setDelimiter(String)
sets the delimiter, allowing groups
of keys that share the delimiter-terminated prefix to be included in the returned listing.
This allows applications to organize and browse their keys hierarchically, similar to how a
file system organizes files into directories. These common prefixes can be retrieved through
the ObjectListing.getCommonPrefixes()
method.
For example, consider a bucket that contains the following keys:
listObjects
with a prefix value of "foo/" and a delimiter value of
"/" on this bucket, an ObjectListing
is returned that contains one key
("foo/boo") and one entry in the common prefixes list ("foo/bar/"). To see deeper into the
virtual hierarchy, make another call to listObjects
setting the prefix parameter
to any interesting common prefix to list the individual keys under that prefix.
The total number of keys in a bucket doesn't substantially affect list performance.
listObjects
in interface COS
listObjectsRequest
- The request object containing all options for listing the objects
in a specified bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listObjects(String)
,
COS.listObjects(String, String)
public ObjectListing listNextBatchOfObjects(ObjectListing previousObjectListing) throws CosClientException, CosServiceException
COS
Provides an easy way to continue a truncated object listing and retrieve the next page of results.
To continue the object listing and retrieve the next page of results, call the initial
ObjectListing
from one of the listObjects
methods. If truncated
(indicated when ObjectListing.isTruncated()
returns true
), pass the
ObjectListing
back into this method in order to retrieve the next page of
results. Continue using this method to retrieve more results until the returned
ObjectListing
indicates that it is not truncated.
listNextBatchOfObjects
in interface COS
previousObjectListing
- The previous truncated ObjectListing
. If a
non-truncated ObjectListing
is passed in, an empty
ObjectListing
is returned without ever contacting .ObjectListing
results, beginning immediately after the
last result in the specified previous ObjectListing
.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listObjects(String)
,
COS.listObjects(String, String)
,
COS.listObjects(ListObjectsRequest)
,
COS.listNextBatchOfObjects(ListNextBatchOfObjectsRequest)
public ObjectListing listNextBatchOfObjects(ListNextBatchOfObjectsRequest listNextBatchOfObjectsRequest) throws CosClientException, CosServiceException
COS
Provides an easy way to continue a truncated object listing and retrieve the next page of results.
To continue the object listing and retrieve the next page of results, call the initial
ObjectListing
from one of the listObjects
methods. If truncated
(indicated when ObjectListing.isTruncated()
returns true
), pass the
ObjectListing
back into this method in order to retrieve the next page of
results. Continue using this method to retrieve more results until the returned
ObjectListing
indicates that it is not truncated.
listNextBatchOfObjects
in interface COS
listNextBatchOfObjectsRequest
- The request object for listing next batch of objects
using the previous truncated ObjectListing
. If a non-truncated
ObjectListing
is passed in by the request object, an empty
ObjectListing
is returned without ever contacting .ObjectListing
results, beginning immediately after the
last result in the specified previous ObjectListing
.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listObjects(String)
,
COS.listObjects(String, String)
,
COS.listObjects(ListObjectsRequest)
,
COS.listNextBatchOfObjects(ObjectListing)
public VersionListing listVersions(String bucketName, String prefix) throws CosClientException, CosServiceException
COS
Returns a list of summary information about the versions in the specified bucket.
The returned version summaries are ordered first by key and then by version. Keys are sorted lexicographically (alphabetically) while versions are sorted from most recent to least recent. Both versions with data and delete markers are included in the results.
Because buckets can contain a virtually unlimited number of versions, the complete results of
a list query can be extremely large. To manage large result sets, COS uses pagination to
split them into multiple responses. Always check the VersionListing.isTruncated()
method to determine if the returned listing is complete or if additional calls are needed to
get more results. Callers are encouraged to use
COS.listNextBatchOfVersions(VersionListing)
as an easy way to get the next page of
results.
For more information about enabling versioning for a bucket, see
COS.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
listVersions
in interface COS
bucketName
- The name of the COS bucket whose versions are to be listed.prefix
- An optional parameter restricting the response to keys beginning with the
specified prefix. Use prefixes to separate a bucket into different sets of keys,
similar to how a file system organizes files into directories.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listVersions(ListVersionsRequest)
,
COS.listVersions(String, String, String, String, String, Integer)
public VersionListing listVersions(String bucketName, String prefix, String keyMarker, String versionIdMarker, String delimiter, Integer maxResults) throws CosClientException, CosServiceException
COS
Returns a list of summary information about the versions in the specified bucket.
The returned version summaries are ordered first by key and then by version. Keys are sorted lexicographically (alphabetically) while versions are sorted from most recent to least recent. Both versions with data and delete markers are included in the results.
Because buckets can contain a virtually unlimited number of versions, the complete results of
a list query can be extremely large. To manage large result sets, COS uses pagination to
split them into multiple responses. Always check the VersionListing.isTruncated()
method to determine if the returned listing is complete or if additional calls are needed to
get more results. Callers are encouraged to use
COS.listNextBatchOfVersions(VersionListing)
as an easy way to get the next page of
results.
For more information about enabling versioning for a bucket, see
COS.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
listVersions
in interface COS
bucketName
- The name of the QCloud COS bucket whose versions are to be listed.prefix
- An optional parameter restricting the response to keys that begin with the
specified prefix. Use prefixes to separate a bucket into different sets of keys,
similar to how a file system organizes files into directories.keyMarker
- Optional parameter indicating where in the sorted list of all versions in
the specified bucket to begin returning results. Results are always ordered first
lexicographically (i.e. alphabetically) and then from most recent version to least
recent version. If a keyMarker is used without a versionIdMarker, results begin
immediately after that key's last version. When a keyMarker is used with a
versionIdMarker, results begin immediately after the version with the specified key
and version ID.
This enables pagination; to get the next page of results use the next key marker and
next version ID marker (from VersionListing.getNextKeyMarker()
and
VersionListing.getNextVersionIdMarker()
) as the markers for the next request
to list versions, or use the convenience method
COS.listNextBatchOfVersions(VersionListing)
versionIdMarker
- Optional parameter indicating where in the sorted list of all versions
in the specified bucket to begin returning results. Results are always ordered first
lexicographically (i.e. alphabetically) and then from most recent version to least
recent version. A keyMarker must be specified when specifying a versionIdMarker.
Results begin immediately after the version with the specified key and version ID.
This enables pagination; to get the next page of results use the next key marker and
next version ID marker (from VersionListing.getNextKeyMarker()
and
VersionListing.getNextVersionIdMarker()
) as the markers for the next request
to list versions, or use the convenience method
COS.listNextBatchOfVersions(VersionListing)
delimiter
- Optional parameter that causes keys that contain the same string between the
prefix and the first occurrence of the delimiter to be rolled up into a single result
element in the VersionListing.getCommonPrefixes()
list. These rolled-up keys
are not returned elsewhere in the response. The most commonly used delimiter is "/",
which simulates a hierarchical organization similar to a file system directory
structure.maxResults
- Optional parameter indicating the maximum number of results to include in
the response. QCloud COS might return fewer than this, but will not return more. Even
if maxKeys is not specified, QCloud COS will limit the number of results in the
response.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listVersions(ListVersionsRequest)
,
COS.listVersions(String, String)
public VersionListing listVersions(ListVersionsRequest listVersionsRequest) throws CosClientException, CosServiceException
COS
Returns a list of summary information about the versions in the specified bucket.
The returned version summaries are ordered first by key and then by version. Keys are sorted lexicographically (alphabetically) while versions are sorted from most recent to least recent. Both versions with data and delete markers are included in the results.
Because buckets can contain a virtually unlimited number of versions, the complete results of
a list query can be extremely large. To manage large result sets, COS uses pagination to
split them into multiple responses. Always check the VersionListing.isTruncated()
method to determine if the returned listing is complete or if additional calls are needed to
get more results. Callers are encouraged to use
COS.listNextBatchOfVersions(VersionListing)
as an easy way to get the next page of
results.
For more information about enabling versioning for a bucket, see
COS.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
listVersions
in interface COS
listVersionsRequest
- The request object containing all options for listing the versions
in a specified bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listVersions(String, String, String, String, String, Integer)
,
COS.listVersions(String, String)
public VersionListing listNextBatchOfVersions(VersionListing previousVersionListing) throws CosClientException, CosServiceException
COS
Provides an easy way to continue a truncated VersionListing
and retrieve the next
page of results.
Obtain the initial VersionListing
from one of the listVersions
methods. If the result is truncated (indicated when VersionListing.isTruncated()
returns true
), pass the VersionListing
back into this method in
order to retrieve the next page of results. From there, continue using this method to
retrieve more results until the returned VersionListing
indicates that it is not
truncated.
For more information about enabling versioning for a bucket, see
COS.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
listNextBatchOfVersions
in interface COS
previousVersionListing
- The previous truncated VersionListing
. If a
non-truncated VersionListing
is passed in, an empty
VersionListing
is returned without ever contacting COS.VersionListing
results, beginning immediately after the
last result in the specified previous VersionListing
.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listVersions(String, String)
,
COS.listVersions(ListVersionsRequest)
,
COS.listVersions(String, String, String, String, String, Integer)
,
COS.listNextBatchOfVersions(ListNextBatchOfVersionsRequest)
public VersionListing listNextBatchOfVersions(ListNextBatchOfVersionsRequest listNextBatchOfVersionsRequest) throws CosClientException, CosServiceException
COS
Provides an easy way to continue a truncated VersionListing
and retrieve the next
page of results.
Obtain the initial VersionListing
from one of the listVersions
methods. If the result is truncated (indicated when VersionListing.isTruncated()
returns true
), pass the VersionListing
back into this method in
order to retrieve the next page of results. From there, continue using this method to
retrieve more results until the returned VersionListing
indicates that it is not
truncated.
For more information about enabling versioning for a bucket, see
COS.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
listNextBatchOfVersions
in interface COS
listNextBatchOfVersionsRequest
- The request object for listing next batch of versions
using the previous truncated VersionListing
. If a non-truncated
VersionListing
is passed in by the request object, an empty
VersionListing
is returned without ever contacting COS.VersionListing
results, beginning immediately after the
last result in the specified previous VersionListing
.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.COS.listVersions(String, String)
,
COS.listVersions(ListVersionsRequest)
,
COS.listVersions(String, String, String, String, String, Integer)
,
COS.listNextBatchOfVersions(VersionListing)
public CopyObjectResult copyObject(String sourceBucketName, String sourceKey, String destinationBucketName, String destinationKey) throws CosClientException, CosServiceException
COS
Copy a source object to a new destination in COS.
To copy an object, the caller's account must have read access to the source object and write access to the destination bucket. cos support copy a object from a diff account, diff region, diff bucket
copyObject
in interface COS
sourceBucketName
- The name of the bucket containing the source object to copy.sourceKey
- The key in the source bucket under which the source object is stored.destinationBucketName
- The name of the bucket in which the new object will be created.
This can be the same name as the source bucket's.destinationKey
- The key in the destination bucket under which the new object will be
created.CopyObjectResult
object containing the information returned by about the
newly created object, or null
if constraints were specified that weren't
met when attempted to copy the object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public CopyObjectResult copyObject(CopyObjectRequest copyObjectRequest) throws CosClientException, CosServiceException
COS
Copy a source object to a new destination in COS.
To copy an object, the caller's account must have read access to the source object and write access to the destination bucket. cos support copy a object from a diff account, diff region, diff bucket
copyObject
in interface COS
copyObjectRequest
- The request object containing all the options for copying an QCloud
COS object.CopyObjectResult
object containing the information returned by about the
newly created object, or null
if constraints were specified that weren't
met when attempted to copy the object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public CopyPartResult copyPart(CopyPartRequest copyPartRequest) throws CosClientException, CosServiceException
COS
To copy an object, the caller's account must have read access to the source object and write access to the destination bucket.
copyPart
in interface COS
copyPart
in interface COSDirectSpi
copyPartRequest
- The request object containing all the options for copying an object.null
if constraints were specified that weren't met when COS
attempted to copy the object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setBucketLifecycleConfiguration(String bucketName, BucketLifecycleConfiguration bucketLifecycleConfiguration) throws CosClientException, CosServiceException
COS
setBucketLifecycleConfiguration
in interface COS
bucketName
- the bucket namebucketLifecycleConfiguration
- lifecycle config for the bucketCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setBucketLifecycleConfiguration(SetBucketLifecycleConfigurationRequest setBucketLifecycleConfigurationRequest) throws CosClientException, CosServiceException
COS
setBucketLifecycleConfiguration
in interface COS
setBucketLifecycleConfigurationRequest
- The request object containing all options for
setting the bucket lifecycle configuration.CosClientException
- If any errors are encountered in the client while making the
`------+++++++++++++++++++++++++++++++++++++++++++++++++* request or handling the
response.CosServiceException
- If any errors occurred in while processing the request.public BucketLifecycleConfiguration getBucketLifecycleConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
getBucketLifecycleConfiguration
in interface COS
bucketName
- the bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public BucketLifecycleConfiguration getBucketLifecycleConfiguration(GetBucketLifecycleConfigurationRequest getBucketLifecycleConfigurationRequest)
COS
getBucketLifecycleConfiguration
in interface COS
getBucketLifecycleConfigurationRequest
- The request object for retrieving the bucket
lifecycle configuration.public void deleteBucketLifecycleConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
deleteBucketLifecycleConfiguration
in interface COS
bucketName
- the bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void deleteBucketLifecycleConfiguration(DeleteBucketLifecycleConfigurationRequest deleteBucketLifecycleConfigurationRequest) throws CosClientException, CosServiceException
COS
deleteBucketLifecycleConfiguration
in interface COS
deleteBucketLifecycleConfigurationRequest
- The request object containing all options
for removing the bucket lifecycle configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws CosClientException, CosServiceException
COS
Sets the versioning configuration for the specified bucket.
A bucket's versioning configuration can be in one of three possible states:
BucketVersioningConfiguration.OFF
BucketVersioningConfiguration.ENABLED
BucketVersioningConfiguration.SUSPENDED
By default, new buckets are in the off
state. Once
versioning is enabled for a bucket the status can never be reverted to
off
.
Objects created before versioning was enabled or when versioning is suspended will be given
the default null
version ID. Note that
the null
version ID is a valid version ID and is not the same as not having a
version ID.
The versioning configuration of a bucket has different implications for each operation
performed on that bucket or for objects within that bucket. For example, when versioning is
enabled a PutObject
operation creates a unique object version-id for the object
being uploaded. The The PutObject
API guarantees that, if versioning is enabled
for a bucket at the time of the request, the new object can only be permanently deleted using
a DeleteVersion
operation. It can never be overwritten. Additionally, the
PutObject
API guarantees that, if versioning is enabled for a bucket the
request, no other object will be overwritten by that request. Refer to the documentation
sections for each API for information on how versioning status affects the semantics of that
particular API.
setBucketVersioningConfiguration
in interface COS
setBucketVersioningConfigurationRequest
- The request object containing all options for
setting the bucket versioning configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public BucketVersioningConfiguration getBucketVersioningConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
Returns the versioning configuration for the specified bucket.
A bucket's versioning configuration can be in one of three possible states:
BucketVersioningConfiguration.OFF
BucketVersioningConfiguration.ENABLED
BucketVersioningConfiguration.SUSPENDED
By default, new buckets are in the off
state. Once
versioning is enabled for a bucket the status can never be reverted to
off
.
The versioning configuration of a bucket has different implications for each operation
performed on that bucket or for objects within that bucket. For example, when versioning is
enabled a PutObject
operation creates a unique object version-id for the object
being uploaded. The The PutObject
API guarantees that, if versioning is enabled
for a bucket at the time of the request, the new object can only be permanently deleted using
a DeleteVersion
operation. It can never be overwritten. Additionally, the
PutObject
API guarantees that, if versioning is enabled for a bucket the
request, no other object will be overwritten by that request.
getBucketVersioningConfiguration
in interface COS
bucketName
- the bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public BucketVersioningConfiguration getBucketVersioningConfiguration(GetBucketVersioningConfigurationRequest getBucketVersioningConfigurationRequest) throws CosClientException, CosServiceException
COS
Returns the versioning configuration for the specified bucket.
A bucket's versioning configuration can be in one of three possible states:
BucketVersioningConfiguration.OFF
BucketVersioningConfiguration.ENABLED
BucketVersioningConfiguration.SUSPENDED
By default, new buckets are in the off
state. Once
versioning is enabled for a bucket the status can never be reverted to
off
.
The versioning configuration of a bucket has different implications for each operation
performed on that bucket or for objects within that bucket. For example, when versioning is
enabled a PutObject
operation creates a unique object version-id for the object
being uploaded. The The PutObject
API guarantees that, if versioning is enabled
for a bucket at the time of the request, the new object can only be permanently deleted using
a DeleteVersion
operation. It can never be overwritten. Additionally, the
PutObject
API guarantees that, if versioning is enabled for a bucket the
request, no other object will be overwritten by that request.
getBucketVersioningConfiguration
in interface COS
getBucketVersioningConfigurationRequest
- The request object for retrieving the bucket
versioning configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setObjectAcl(String bucketName, String key, AccessControlList acl) throws CosClientException, CosServiceException
COS
CannedAccessControlList
for the specified object.
Each bucket and object in has an ACL that defines its access control policy. When a request is made, authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, returns an error.
setObjectAcl
in interface COS
bucketName
- The name of the bucket containing the object whose ACL is being set.key
- The key of the object within the specified bucket whose ACL is being set.acl
- The new AccessControlList
for the specified object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setObjectAcl(String bucketName, String key, CannedAccessControlList acl) throws CosClientException, CosServiceException
COS
CannedAccessControlList
for the specified object.
Each bucket and object in has an ACL that defines its access control policy. When a request is made, authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, returns an error.
setObjectAcl
in interface COS
bucketName
- The name of the bucket containing the object whose ACL is being set.key
- The key of the object within the specified bucket whose ACL is being set.acl
- The new pre-configured CannedAccessControlList
for the specified
object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setObjectAcl(SetObjectAclRequest setObjectAclRequest) throws CosClientException, CosServiceException
COS
AccessControlList
for the specified object.
Each bucket and object in has an ACL that defines its access control policy. When a request is made, authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, returns an error.
setObjectAcl
in interface COS
setObjectAclRequest
- The request object containing the COS object to modify and the ACL
to set.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public AccessControlList getObjectAcl(String bucketName, String key) throws CosClientException, CosServiceException
COS
Gets the AccessControlList
(ACL) for the specified object in Qcloud COS.
Each bucket and object in Qcloud COS has an ACL that defines its access control policy. When a request is made, Qcloud COS authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, Qcloud COS returns an error.
getObjectAcl
in interface COS
bucketName
- The name of the bucket containing the object whose ACL is being retrieved.key
- The key of the object within the specified bucket whose ACL is being retrieved.AccessControlList
for the specified Qcloud COS object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public AccessControlList getObjectAcl(GetObjectAclRequest getObjectAclRequest) throws CosClientException, CosServiceException
COS
Gets the AccessControlList
(ACL) for the specified object in Qcloud COS.
Each bucket and object in Qcloud COS has an ACL that defines its access control policy. When a request is made, Qcloud COS authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, Qcloud COS returns an error.
getObjectAcl
in interface COS
getObjectAclRequest
- the request object containing all the information needed for
retrieving the object ACL.AccessControlList
for the specified Qcloud COS object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setBucketAcl(String bucketName, AccessControlList acl) throws CosClientException, CosServiceException
COS
AccessControlList
for the specified bucket.
Each bucket and object in COS has an ACL that defines its access control policy. When a request is made, COS authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, COS returns an error.
When constructing a custom AccessControlList
, callers typically retrieve the
existing AccessControlList
for a bucket .
setBucketAcl
in interface COS
bucketName
- The name of the bucket whose ACL is being setacl
- The new pre-configured CannedAccessControlList
for the specified COS
bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setBucketAcl(String bucketName, CannedAccessControlList acl) throws CosClientException, CosServiceException
COS
CannedAccessControlList
for the specified bucket.
Each bucket and object in COS has an ACL that defines its access control policy. When a request is made, COS authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, COS returns an error.
When constructing a custom AccessControlList
, callers typically retrieve the
existing AccessControlList
for a bucket .
setBucketAcl
in interface COS
bucketName
- The name of the bucket whose ACL is being setacl
- The AccessControlList
for the specified COS bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void setBucketAcl(SetBucketAclRequest setBucketAclRequest) throws CosClientException, CosServiceException
COS
AccessControlList
for the specified bucket.
Each bucket and object in COS has an ACL that defines its access control policy. When a request is made, COS authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, COS returns an error.
When constructing a custom AccessControlList
, callers typically retrieve the
existing AccessControlList
for a bucket .
setBucketAcl
in interface COS
setBucketAclRequest
- The request object containing the bucket to modify and the ACL to
set.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public AccessControlList getBucketAcl(String bucketName) throws CosClientException, CosServiceException
COS
AccessControlList
(ACL) for the specified bucket.
Each bucket and object in COS has an ACL that defines its access control policy. When a request is made, COS authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, COS returns an error.
getBucketAcl
in interface COS
bucketName
- The name of the bucket whose ACL is being retrieved.AccessControlList
for the specified COS bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public AccessControlList getBucketAcl(GetBucketAclRequest getBucketAclRequest) throws CosClientException, CosServiceException
COS
AccessControlList
(ACL) for the specified bucket.
Each bucket and object in COS has an ACL that defines its access control policy. When a request is made, COS authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, COS returns an error.
getBucketAcl
in interface COS
getBucketAclRequest
- The request containing the name of the bucket whose ACL is being
retrieved.AccessControlList
for the specified COS bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketCrossOriginConfiguration getBucketCrossOriginConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
getBucketCrossOriginConfiguration
in interface COS
bucketName
- the bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketCrossOriginConfiguration getBucketCrossOriginConfiguration(GetBucketCrossOriginConfigurationRequest getBucketCrossOriginConfigurationRequest) throws CosClientException, CosServiceException
COS
getBucketCrossOriginConfiguration
in interface COS
getBucketCrossOriginConfigurationRequest
- The request object for retrieving the bucket
cross origin configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketCrossOriginConfiguration(String bucketName, BucketCrossOriginConfiguration bucketCrossOriginConfiguration) throws CosClientException, CosServiceException
COS
setBucketCrossOriginConfiguration
in interface COS
bucketName
- the bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketCrossOriginConfiguration(SetBucketCrossOriginConfigurationRequest setBucketCrossOriginConfigurationRequest) throws CosClientException, CosServiceException
COS
setBucketCrossOriginConfiguration
in interface COS
setBucketCrossOriginConfigurationRequest
- The request object containing all options for
setting the bucket cross origin configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void deleteBucketCrossOriginConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
deleteBucketCrossOriginConfiguration
in interface COS
bucketName
- The bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void deleteBucketCrossOriginConfiguration(DeleteBucketCrossOriginConfigurationRequest deleteBucketCrossOriginConfigurationRequest) throws CosClientException, CosServiceException
COS
deleteBucketCrossOriginConfiguration
in interface COS
deleteBucketCrossOriginConfigurationRequest
- The request object containing all options
for deleting the bucket cross origin configuration.CosClientException
CosServiceException
public void setBucketReplicationConfiguration(String bucketName, BucketReplicationConfiguration configuration) throws CosClientException, CosServiceException
COS
setBucketReplicationConfiguration
in interface COS
bucketName
- The bucket name for which the replication configuration is set.configuration
- The replication configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketReplicationConfiguration(SetBucketReplicationConfigurationRequest setBucketReplicationConfigurationRequest) throws CosClientException, CosServiceException
COS
setBucketReplicationConfiguration
in interface COS
setBucketReplicationConfigurationRequest
- The request object containing all the options
for setting a replication configuration for QCloud bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketReplicationConfiguration getBucketReplicationConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
getBucketReplicationConfiguration
in interface COS
bucketName
- The bucket name for which the replication configuration is to be retrieved.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketReplicationConfiguration getBucketReplicationConfiguration(GetBucketReplicationConfigurationRequest getBucketReplicationConfigurationRequest) throws CosClientException, CosServiceException
COS
getBucketReplicationConfiguration
in interface COS
getBucketReplicationConfigurationRequest
- The request object for retrieving the bucket
replication configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void deleteBucketReplicationConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
deleteBucketReplicationConfiguration
in interface COS
bucketName
- The bucket name for which the replication configuration is to be deleted.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void deleteBucketReplicationConfiguration(DeleteBucketReplicationConfigurationRequest deleteBucketReplicationConfigurationRequest) throws CosClientException, CosServiceException
COS
deleteBucketReplicationConfiguration
in interface COS
deleteBucketReplicationConfigurationRequest
- The request object for delete bucket
replication configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public URL generatePresignedUrl(String bucketName, String key, Date expiration) throws CosClientException
generatePresignedUrl
in interface COS
CosClientException
public URL generatePresignedUrl(String bucketName, String key, Date expiration, HttpMethodName method) throws CosClientException
COS
Returns a pre-signed URL for accessing COS resource. you can specify the expiration time. Defaults, if you didn't set the expiration time, the expired time of ClientConfig will be used.
Pre-signed URLs allow clients to form a URL for an COS resource, and then sign it with the current COS security credentials. The pre-signed URL can be shared to other users, allowing access to the resource without providing an account's security credentials.
Pre-signed URLs are useful in many situations where COS security credentials aren't available from the client that needs to make the actual request to COS.
For example, an application may need remote users to upload files to the application owner's COS bucket, but doesn't need to ship the COS security credentials with the application. A pre-signed URL to PUT an object into the owner's bucket can be generated from a remote location with the owner's COS security credentials, then the pre-signed URL can be passed to the end user's application to use.
generatePresignedUrl
in interface COS
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the desired object is stored.expiration
- The time at which the returned pre-signed URL will expire.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.COS.generatePresignedUrl(String, String, Date)
,
COS.generatePresignedUrl(String, String, Date, HttpMethodName)
public URL generatePresignedUrl(String bucketName, String key, Date expiration, HttpMethodName method, Map<String,String> headers, Map<String,String> params) throws CosClientException
COS
Returns a pre-signed URL for accessing COS resource. you can specify the expiration time. Defaults, if you didn't set the expiration time, the expired time of ClientConfig will be used.
Pre-signed URLs allow clients to form a URL for an COS resource, and then sign it with the current COS security credentials. The pre-signed URL can be shared to other users, allowing access to the resource without providing an account's security credentials.
Pre-signed URLs are useful in many situations where COS security credentials aren't available from the client that needs to make the actual request to COS.
For example, an application may need remote users to upload files to the application owner's COS bucket, but doesn't need to ship the COS security credentials with the application. A pre-signed URL to PUT an object into the owner's bucket can be generated from a remote location with the owner's COS security credentials, then the pre-signed URL can be passed to the end user's application to use.
generatePresignedUrl
in interface COS
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the desired object is stored.expiration
- The time at which the returned pre-signed URL will expire.method
- The HTTP method verb to use for this URLheaders
- The HTTP headers to use for sign.params
- The HTTP params to use for sign.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.COS.generatePresignedUrl(String, String, Date)
,
COS.generatePresignedUrl(String, String, Date, HttpMethodName)
public URL generatePresignedUrl(String bucketName, String key, Date expiration, HttpMethodName method, Map<String,String> headers, Map<String,String> params, Boolean signPrefixMode, Boolean signHost) throws CosClientException
generatePresignedUrl
in interface COS
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the desired object is stored.expiration
- The time at which the returned pre-signed URL will expire.method
- The HTTP method verb to use for this URLheaders
- The HTTP headers to use for sign.params
- The HTTP params to use for sign.signPrefixMode
- The optional signPrefixMode decide the presigned url whether start with 'sign=' and encode value.signHost
- The optional signHost decide whether to sign with host header, by default it is true.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.COS.generatePresignedUrl(String, String, Date)
,
COS.generatePresignedUrl(String, String, Date, HttpMethodName)
public URL generatePresignedUrl(GeneratePresignedUrlRequest req) throws CosClientException
COS
Returns a pre-signed URL for accessing COS resource. you can specify the expiration time. Defaults, if you didn't set the expiration time, the expired time of ClientConfig will be used.
Pre-signed URLs allow clients to form a URL for an COS resource, and then sign it with the current COS security credentials. The pre-signed URL can be shared to other users, allowing access to the resource without providing an account's security credentials.
Pre-signed URLs are useful in many situations where COS security credentials aren't available from the client that needs to make the actual request to COS.
For example, an application may need remote users to upload files to the application owner's COS bucket, but doesn't need to ship the COS security credentials with the application. A pre-signed URL to PUT an object into the owner's bucket can be generated from a remote location with the owner's COS security credentials, then the pre-signed URL can be passed to the end user's application to use.
generatePresignedUrl
in interface COS
req
- The request object containing all the options for
generating a pre-signed URL (bucket name, key, expiration date, etc).CosClientException
- If any errors are encountered in the client while making the
request or handling the response.COS.generatePresignedUrl(String, String, Date)
,
COS#generatePresignedUrl(String, String, Date, HttpMethod)
public URL generatePresignedUrl(GeneratePresignedUrlRequest req, Boolean signHost) throws CosClientException
COS
Returns a pre-signed URL for accessing COS resource. you can specify the expiration time. Defaults, if you didn't set the expiration time, the expired time of ClientConfig will be used.
Pre-signed URLs allow clients to form a URL for an COS resource, and then sign it with the current COS security credentials. The pre-signed URL can be shared to other users, allowing access to the resource without providing an account's security credentials.
Pre-signed URLs are useful in many situations where COS security credentials aren't available from the client that needs to make the actual request to COS.
For example, an application may need remote users to upload files to the application owner's COS bucket, but doesn't need to ship the COS security credentials with the application. A pre-signed URL to PUT an object into the owner's bucket can be generated from a remote location with the owner's COS security credentials, then the pre-signed URL can be passed to the end user's application to use.
generatePresignedUrl
in interface COS
req
- The request object containing all the options for
generating a pre-signed URL (bucket name, key, expiration date, etc).signHost
- The optional signHost decide whether to sign with host header, by default it is true.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.COS.generatePresignedUrl(String, String, Date)
,
COS#generatePresignedUrl(String, String, Date, HttpMethod)
public void restoreObject(String bucketName, String key, int expirationInDays) throws CosClientException, CosServiceException
COS
restoreObject
in interface COS
bucketName
- The name of an existing bucket.key
- The key under which to store the specified file.expirationInDays
- The number of days after which the object will expire.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void restoreObject(RestoreObjectRequest restoreObjectRequest) throws CosClientException, CosServiceException
COS
restoreObject
in interface COS
restoreObjectRequest
- The request object containing all the options for restoring an COS object.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void updateObjectMetaData(String bucketName, String key, ObjectMetadata objectMetadata) throws CosClientException, CosServiceException
COS
updateObjectMetaData
in interface COS
bucketName
- The name of an existing bucket.key
- The key under which to store the specified file.objectMetadata
- object new metadata for the specified objectCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketPolicy(String bucketName, String policyText) throws CosClientException, CosServiceException
COS
Sets the policy associated with the specified bucket. Only the owner of the bucket can set a bucket policy. If a policy already exists for the specified bucket, the new policy replaces the existing policy.
setBucketPolicy
in interface COS
bucketName
- the bucket namepolicyText
- The policy to apply to the specified bucket.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
Gets the logging configuration for the specified bucket. The bucket logging configuration object indicates if server access logging is enabled for the specified bucket, the destination bucket where server access logs are delivered, and the optional log file prefix.
getBucketLoggingConfiguration
in interface COS
bucketName
- The name of the bucket whose bucket logging configuration is
being retrieved.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public BucketLoggingConfiguration getBucketLoggingConfiguration(GetBucketLoggingConfigurationRequest getBucketLoggingConfigurationRequest) throws CosClientException, CosServiceException
COS
Gets the logging configuration for the specified bucket. The bucket logging configuration object indicates if server access logging is enabled for the specified bucket, the destination bucket where server access logs are delivered, and the optional log file prefix.
getBucketLoggingConfiguration
in interface COS
getBucketLoggingConfigurationRequest
- The request object for retrieving the bucket logging
configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void setBucketLoggingConfiguration(SetBucketLoggingConfigurationRequest setBucketLoggingConfigurationRequest) throws CosClientException, CosServiceException
COS
Sets the logging configuration for the specified bucket. The bucket logging configuration object indicates whether server access logging is enabled or not for the specified bucket, the destination bucket where server access logs are delivered, and the optional log file prefix.
setBucketLoggingConfiguration
in interface COS
setBucketLoggingConfigurationRequest
- The request object containing all options for setting the
bucket logging configuration.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void setBucketPolicy(SetBucketPolicyRequest setBucketPolicyRequest) throws CosClientException, CosServiceException
COS
Sets the policy associated with the specified bucket. Only the owner of the bucket can set a bucket policy. If a policy already exists for the specified bucket, the new policy replaces the existing policy.
setBucketPolicy
in interface COS
setBucketPolicyRequest
- The request object containing the details of the bucket and
policy to update.CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public BucketPolicy getBucketPolicy(String bucketName) throws CosClientException, CosServiceException
COS
Gets the policy for the specified bucket. Only the owner of the bucket can retrieve the
policy. If no policy has been set for the bucket, then an empty result object with a
null
policy text field will be returned.
getBucketPolicy
in interface COS
bucketName
- the bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public BucketPolicy getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest) throws CosClientException, CosServiceException
COS
Gets the policy for the specified bucket. Only the owner of the bucket can retrieve the
policy. If no policy has been set for the bucket, then an empty result object with a
null
policy text field will be returned.
getBucketPolicy
in interface COS
getBucketPolicyRequest
- get bucket policy requestCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void deleteBucketPolicy(String bucketName) throws CosClientException, CosServiceException
COS
Deletes the policy associated with the specified bucket. Only the owner of the bucket can delete the bucket policy.
deleteBucketPolicy
in interface COS
bucketName
- the bucket nameCosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public void deleteBucketPolicy(DeleteBucketPolicyRequest deleteBucketPolicyRequest) throws CosClientException, CosServiceException
COS
Deletes the policy associated with the specified bucket. Only the owner of the bucket can delete the bucket policy.
deleteBucketPolicy
in interface COS
CosClientException
- If any errors are encountered in the client while making the
request or handling the response.CosServiceException
- If any errors occurred in while processing the request.public BucketWebsiteConfiguration getBucketWebsiteConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
getBucketWebsiteConfiguration
in interface COS
bucketName
- The name of the bucket whose website configuration is being
retrieved.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public BucketWebsiteConfiguration getBucketWebsiteConfiguration(GetBucketWebsiteConfigurationRequest getBucketWebsiteConfigurationRequest) throws CosClientException, CosServiceException
COS
getBucketWebsiteConfiguration
in interface COS
getBucketWebsiteConfigurationRequest
- The request object for retrieving the bucket website configuration.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void setBucketWebsiteConfiguration(String bucketName, BucketWebsiteConfiguration configuration) throws CosClientException, CosServiceException
COS
setBucketWebsiteConfiguration
in interface COS
bucketName
- The name of the bucket whose website configuration is being
set.configuration
- The configuration describing how the specified bucket will
serve web requests (i.e. default index page, error page).CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void setBucketWebsiteConfiguration(SetBucketWebsiteConfigurationRequest setBucketWebsiteConfigurationRequest) throws CosClientException, CosServiceException
COS
setBucketWebsiteConfiguration
in interface COS
setBucketWebsiteConfigurationRequest
- The request object containing the name of the bucket whose
website configuration is being updated, and the new website
configuration values.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void deleteBucketWebsiteConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
deleteBucketWebsiteConfiguration
in interface COS
bucketName
- The name of the bucket whose website configuration is being
deleted.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void deleteBucketWebsiteConfiguration(DeleteBucketWebsiteConfigurationRequest deleteBucketWebsiteConfigurationRequest) throws CosClientException, CosServiceException
COS
deleteBucketWebsiteConfiguration
in interface COS
deleteBucketWebsiteConfigurationRequest
- The request object specifying the name of the bucket whose
website configuration is to be deleted.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void deleteBucketDomainConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
deleteBucketDomainConfiguration
in interface COS
bucketName
- The name of the bucket whose domain configuration is being
deleted.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void deleteBucketDomainConfiguration(DeleteBucketDomainConfigurationRequest deleteBucketDomainConfigurationRequest)
COS
deleteBucketDomainConfiguration
in interface COS
deleteBucketDomainConfigurationRequest
- The request object specifying the name of the bucket whose
domain configuration is to be deleted.public void setBucketDomainConfiguration(String bucketName, BucketDomainConfiguration configuration) throws CosClientException, CosServiceException
COS
setBucketDomainConfiguration
in interface COS
bucketName
- The name of the bucket whose domain configuration is being set.configuration
- The configuration describing the specified bucket custom domainCosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketDomainConfiguration(SetBucketDomainConfigurationRequest setBucketDomainConfigurationRequest) throws CosClientException, CosServiceException
COS
setBucketDomainConfiguration
in interface COS
setBucketDomainConfigurationRequest
- The request object containing the name of the bucket whose
domain configuration is being updated, and the new domain
configuration values.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketDomainConfiguration getBucketDomainConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
getBucketDomainConfiguration
in interface COS
bucketName
- The name of the bucket whose domain configuration is being retrieved.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketDomainConfiguration getBucketDomainConfiguration(GetBucketDomainConfigurationRequest getBucketDomainConfigurationRequest) throws CosClientException, CosServiceException
COS
getBucketDomainConfiguration
in interface COS
getBucketDomainConfigurationRequest
- The request object for retrieving the bucket domain configuration.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketDomainCertificate(String bucketName, BucketPutDomainCertificate domainCertificate) throws CosClientException, CosServiceException
COS
setBucketDomainCertificate
in interface COS
bucketName
- The name of the bucket whose domain certificate is being set.domainCertificate
- The certificate describing the specified bucket custom domainCosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketDomainCertificate(SetBucketDomainCertificateRequest setBucketDomainCertificateRequest) throws CosClientException, CosServiceException
COS
setBucketDomainCertificate
in interface COS
setBucketDomainCertificateRequest
- The request object containing the name of the bucket whose
domain certificate is being updated, and the new domain
certificate values.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketGetDomainCertificate getBucketDomainCertificate(String bucketName, String domainName) throws CosClientException, CosServiceException
COS
getBucketDomainCertificate
in interface COS
bucketName
- The name of the bucket whose domain certificate is being retrieved.domainName
- The name of the bucket's domain whose certificate is being retrieved.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketGetDomainCertificate getBucketDomainCertificate(BucketDomainCertificateRequest getBucketDomainCertificateRequest) throws CosClientException, CosServiceException
COS
getBucketDomainCertificate
in interface COS
getBucketDomainCertificateRequest
- The request object for retrieving the bucket domain certificate.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void deleteBucketDomainCertificate(String bucketName, String domainName) throws CosClientException, CosServiceException
COS
deleteBucketDomainCertificate
in interface COS
bucketName
- The name of the bucket whose domain certificate is being
deleted.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void deleteBucketDomainCertificate(BucketDomainCertificateRequest deleteBucketDomainCertificateRequest) throws CosClientException, CosServiceException
COS
deleteBucketDomainCertificate
in interface COS
deleteBucketDomainCertificateRequest
- The request object specifying the name of the bucket whose
domain certificate is to be deleted.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the
request.public void setBucketRefererConfiguration(String bucketName, BucketRefererConfiguration configuration) throws CosClientException, CosServiceException
COS
setBucketRefererConfiguration
in interface COS
bucketName
- The name of the bucket whose referer configuration is being set.configuration
- The configuration describing the specified bucket refererCosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public void setBucketRefererConfiguration(SetBucketRefererConfigurationRequest setBucketRefererConfigurationRequest) throws CosClientException, CosServiceException
COS
setBucketRefererConfiguration
in interface COS
setBucketRefererConfigurationRequest
- The request object containing the name of the bucket whose
referer configuration is being updated, and the new referer
configuration values.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketRefererConfiguration getBucketRefererConfiguration(String bucketName) throws CosClientException, CosServiceException
COS
getBucketRefererConfiguration
in interface COS
bucketName
- The name of the bucket whose referer configuration is being retrieved.CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public BucketRefererConfiguration getBucketRefererConfiguration(GetBucketRefererConfigurationRequest getBucketRefererConfigurationRequest) throws CosClientException, CosServiceException
COS
getBucketRefererConfiguration
in interface COS
CosClientException
- If any errors are encountered on the client while making the
request or handling the response.CosServiceException
- If any errors occurred in COS while processing the request.public DeleteBucketInventoryConfigurationResult deleteBucketInventoryConfiguration(String bucketName, String id) throws CosClientException, CosServiceException
COS
deleteBucketInventoryConfiguration
in interface COS
bucketName
- The name of the bucket from which the inventory configuration is to be deleted.id
- The ID of the inventory configuration to delete.CosClientException
CosServiceException
public DeleteBucketInventoryConfigurationResult deleteBucketInventoryConfiguration(DeleteBucketInventoryConfigurationRequest deleteBucketInventoryConfigurationRequest) throws CosClientException, CosServiceException
COS
deleteBucketInventoryConfiguration
in interface COS
deleteBucketInventoryConfigurationRequest
- The request object for deleting an inventory configuration.CosClientException
CosServiceException
public GetBucketInventoryConfigurationResult getBucketInventoryConfiguration(String bucketName, String id) throws CosClientException, CosServiceException
COS
getBucketInventoryConfiguration
in interface COS
bucketName
- The name of the bucket to get the inventory configuration from.id
- The ID of the inventory configuration to delete.GetBucketInventoryConfigurationResult
object containing the inventory configuration.CosClientException
CosServiceException
public GetBucketInventoryConfigurationResult getBucketInventoryConfiguration(GetBucketInventoryConfigurationRequest getBucketInventoryConfigurationRequest) throws CosClientException, CosServiceException
COS
getBucketInventoryConfiguration
in interface COS
getBucketInventoryConfigurationRequest
- The request object to retreive an inventory configuration.GetBucketInventoryConfigurationResult
object containing the inventory configuration.CosClientException
CosServiceException
public SetBucketInventoryConfigurationResult setBucketInventoryConfiguration(String bucketName, InventoryConfiguration inventoryConfiguration) throws CosClientException, CosServiceException
COS
setBucketInventoryConfiguration
in interface COS
bucketName
- The name of the bucket to set the inventory configuration to.inventoryConfiguration
- The inventory configuration to set.CosClientException
CosServiceException
public SetBucketInventoryConfigurationResult setBucketInventoryConfiguration(SetBucketInventoryConfigurationRequest setBucketInventoryConfigurationRequest) throws CosClientException, CosServiceException
COS
setBucketInventoryConfiguration
in interface COS
setBucketInventoryConfigurationRequest
- The request object for setting an inventory configuration.CosClientException
CosServiceException
public ListBucketInventoryConfigurationsResult listBucketInventoryConfigurations(ListBucketInventoryConfigurationsRequest listBucketInventoryConfigurationsRequest) throws CosClientException, CosServiceException
COS
listBucketInventoryConfigurations
in interface COS
listBucketInventoryConfigurationsRequest
- The request object to list the inventory configurations in a bucket.ListBucketInventoryConfigurationsResult
object containing the list of InventoryConfiguration
s.CosClientException
CosServiceException
public BucketTaggingConfiguration getBucketTaggingConfiguration(String bucketName)
COS
getBucketTaggingConfiguration
in interface COS
bucketName
- The name of the bucket for which to retrieve tagging
configuration.getBucketTaggingConfiguration(GetBucketTaggingConfigurationRequest)
,
AWS API Documentationpublic BucketTaggingConfiguration getBucketTaggingConfiguration(GetBucketTaggingConfigurationRequest getBucketTaggingConfigurationRequest)
COS
getBucketTaggingConfiguration
in interface COS
getBucketTaggingConfigurationRequest
- The request object for retrieving the bucket tagging
configuration.getBucketTaggingConfiguration(String)
,
AWS API Documentationpublic void setBucketTaggingConfiguration(String bucketName, BucketTaggingConfiguration bucketTaggingConfiguration)
COS
setBucketTaggingConfiguration
in interface COS
bucketName
- The name of the bucket for which to set the tagging
configuration.bucketTaggingConfiguration
- The new tagging configuration for this bucket, which
completely replaces any existing configuration.public void setBucketTaggingConfiguration(SetBucketTaggingConfigurationRequest setBucketTaggingConfigurationRequest)
COS
setBucketTaggingConfiguration
in interface COS
setBucketTaggingConfigurationRequest
- The request object containing all options for setting the
bucket tagging configuration.public void deleteBucketTaggingConfiguration(String bucketName)
COS
deleteBucketTaggingConfiguration
in interface COS
bucketName
- The name of the bucket for which to remove the tagging
configuration.public void deleteBucketTaggingConfiguration(DeleteBucketTaggingConfigurationRequest deleteBucketTaggingConfigurationRequest)
COS
deleteBucketTaggingConfiguration
in interface COS
deleteBucketTaggingConfigurationRequest
- The request object containing all options for removing the
bucket tagging configuration.public SelectObjectContentResult selectObjectContent(SelectObjectContentRequest selectRequest) throws CosClientException, CosServiceException
COS
selectObjectContent
in interface COS
selectRequest
- The request object for selecting object content.SelectObjectContentResult
.CosClientException
CosServiceException
public GetObjectTaggingResult getObjectTagging(GetObjectTaggingRequest getObjectTaggingRequest)
COS
getObjectTagging
in interface COS
getObjectTaggingRequest
- The request object containing all the options on how to
retrieve the COS object tags.public SetObjectTaggingResult setObjectTagging(SetObjectTaggingRequest setObjectTaggingRequest)
COS
setObjectTagging
in interface COS
setObjectTaggingRequest
- The request object containing all the options for setting the
tags for the specified object.public DeleteObjectTaggingResult deleteObjectTagging(DeleteObjectTaggingRequest deleteObjectTaggingRequest)
COS
deleteObjectTagging
in interface COS
deleteObjectTaggingRequest
- The request object containing all the options for deleting
the tags for the specified object.DeleteObjectTaggingResult
object containing the
information returned by COS for the the tag deletion.public BucketIntelligentTierConfiguration getBucketIntelligentTierConfiguration(GetBucketIntelligentTierConfigurationRequest getBucketIntelligentTierConfigurationRequest)
COS
getBucketIntelligentTierConfiguration
in interface COS
public BucketIntelligentTierConfiguration getBucketIntelligentTierConfiguration(String bucketName)
COS
getBucketIntelligentTierConfiguration
in interface COS
public void setBucketIntelligentTieringConfiguration(SetBucketIntelligentTierConfigurationRequest setBucketIntelligentTierConfigurationRequest)
COS
setBucketIntelligentTieringConfiguration
in interface COS
setBucketIntelligentTierConfigurationRequest
- The request object containing all options for setting the
bucket intelligent configuration.public MediaJobResponse createMediaJobs(MediaJobsRequest req)
COS
createMediaJobs
in interface COS
public MediaJobResponseV2 createMediaJobsV2(MediaJobsRequestV2 req)
createMediaJobsV2
in interface COS
public Boolean cancelMediaJob(MediaJobsRequest req)
COS
cancelMediaJob
in interface COS
public MediaJobResponse describeMediaJob(MediaJobsRequest req)
COS
describeMediaJob
in interface COS
public MediaListJobResponse describeMediaJobs(MediaJobsRequest req)
COS
describeMediaJobs
in interface COS
public MediaListQueueResponse describeMediaQueues(MediaQueueRequest req)
COS
describeMediaQueues
in interface COS
public MediaQueueResponse updateMediaQueue(MediaQueueRequest mediaQueueRequest)
COS
updateMediaQueue
in interface COS
public MediaBucketResponse describeMediaBuckets(MediaBucketRequest mediaBucketRequest)
COS
describeMediaBuckets
in interface COS
public MediaTemplateResponse createMediaTemplate(MediaTemplateRequest templateRequest)
COS
createMediaTemplate
in interface COS
public Boolean deleteMediaTemplate(MediaTemplateRequest request)
COS
deleteMediaTemplate
in interface COS
public MediaListTemplateResponse describeMediaTemplates(MediaTemplateRequest request)
COS
describeMediaTemplates
in interface COS
public Boolean updateMediaTemplate(MediaTemplateRequest request)
COS
updateMediaTemplate
in interface COS
public SnapshotResponse generateSnapshot(SnapshotRequest request)
COS
generateSnapshot
in interface COS
public MediaInfoResponse generateMediainfo(MediaInfoRequest request)
COS
generateMediainfo
in interface COS
public Boolean deleteWorkflow(MediaWorkflowListRequest request)
COS
deleteWorkflow
in interface COS
public MediaWorkflowListResponse describeWorkflow(MediaWorkflowListRequest request)
COS
describeWorkflow
in interface COS
public MediaWorkflowExecutionResponse describeWorkflowExecution(MediaWorkflowListRequest request)
COS
describeWorkflowExecution
in interface COS
public MediaWorkflowExecutionsResponse describeWorkflowExecutions(MediaWorkflowListRequest request)
COS
describeWorkflowExecutions
in interface COS
public DocJobResponse createDocProcessJobs(DocJobRequest request)
COS
createDocProcessJobs
in interface COS
public DocJobResponse describeDocProcessJob(DocJobRequest request)
COS
describeDocProcessJob
in interface COS
public DocJobListResponse describeDocProcessJobs(DocJobListRequest request)
COS
describeDocProcessJobs
in interface COS
public DocListQueueResponse describeDocProcessQueues(DocQueueRequest docRequest)
COS
describeDocProcessQueues
in interface COS
public boolean updateDocProcessQueue(DocQueueRequest docRequest)
COS
updateDocProcessQueue
in interface COS
public DocBucketResponse describeDocProcessBuckets(DocBucketRequest docRequest)
COS
describeDocProcessBuckets
in interface COS
public CIUploadResult processImage(ImageProcessRequest imageProcessRequest)
COS
processImage
in interface COS
public ImageAuditingResponse imageAuditing(ImageAuditingRequest imageAuditingRequest)
COS
imageAuditing
in interface COS
public VideoAuditingResponse createVideoAuditingJob(VideoAuditingRequest videoAuditingRequest)
COS
createVideoAuditingJob
in interface COS
public VideoAuditingResponse describeAuditingJob(VideoAuditingRequest videoAuditingRequest)
COS
describeAuditingJob
in interface COS
public AudioAuditingResponse createAudioAuditingJobs(AudioAuditingRequest audioAuditingRequest)
COS
createAudioAuditingJobs
in interface COS
public AudioAuditingResponse describeAudioAuditingJob(AudioAuditingRequest audioAuditingRequest)
COS
describeAudioAuditingJob
in interface COS
public ImageLabelResponse getImageLabel(ImageLabelRequest imageLabelRequest)
COS
getImageLabel
in interface COS
public ImageLabelV2Response getImageLabelV2(ImageLabelV2Request imageLabelV2Request)
COS
getImageLabelV2
in interface COS
public TextAuditingResponse createAuditingTextJobs(TextAuditingRequest textAuditingRequest)
COS
createAuditingTextJobs
in interface COS
public TextAuditingResponse describeAuditingTextJob(TextAuditingRequest textAuditingRequest)
COS
describeAuditingTextJob
in interface COS
public DocumentAuditingResponse createAuditingDocumentJobs(DocumentAuditingRequest documentAuditingRequest)
COS
createAuditingDocumentJobs
in interface COS
public DocumentAuditingResponse describeAuditingDocumentJob(DocumentAuditingRequest documentAuditingRequest)
COS
describeAuditingDocumentJob
in interface COS
public BatchImageAuditingResponse batchImageAuditing(BatchImageAuditingRequest batchImageAuditingRequest)
COS
batchImageAuditing
in interface COS
public Boolean createDocProcessBucket(DocBucketRequest docBucketRequest)
COS
createDocProcessBucket
in interface COS
public Boolean createMediaProcessBucket(MediaBucketRequest mediaBucketRequest)
createMediaProcessBucket
in interface COS
public String GenerateDocPreviewUrl(DocHtmlRequest docJobRequest) throws URISyntaxException
URISyntaxException
public String generateDocPreviewUrl(DocHtmlRequest docJobRequest) throws URISyntaxException
COS
generateDocPreviewUrl
in interface COS
URISyntaxException
public WebpageAuditingResponse createWebpageAuditingJob(WebpageAuditingRequest webpageAuditingRequest)
COS
createWebpageAuditingJob
in interface COS
public WebpageAuditingResponse describeWebpageAuditingJob(WebpageAuditingRequest webpageAuditingRequest)
COS
describeWebpageAuditingJob
in interface COS
public String reportBadCase(ReportBadCaseRequest reportBadCaseRequest)
reportBadCase
in interface COS
public URL getObjectUrl(GetObjectRequest getObjectRequest)
@Deprecated public PutAsyncFetchTaskResult putAsyncFetchTask(PutAsyncFetchTaskRequest putAsyncFetchTaskRequest)
putAsyncFetchTask
in interface COS
@Deprecated public GetAsyncFetchTaskResult getAsyncFetchTask(GetAsyncFetchTaskRequest getAsyncFetchTaskRequest)
getAsyncFetchTask
in interface COS
public ImageAuditingResponse describeAuditingImageJob(DescribeImageAuditingRequest imageAuditingRequest)
describeAuditingImageJob
in interface COS
public PrivateM3U8Response getPrivateM3U8(PrivateM3U8Request privateM3U8Request)
getPrivateM3U8
in interface COS
public DetectCarResponse detectCar(AIRecRequest AIRecRequest)
public boolean openImageSearch(OpenImageSearchRequest imageSearchRequest)
openImageSearch
in interface COS
public boolean addGalleryImages(ImageSearchRequest imageSearchRequest)
addGalleryImages
in interface COS
public boolean deleteGalleryImages(ImageSearchRequest imageSearchRequest)
deleteGalleryImages
in interface COS
public ImageSearchResponse searchGalleryImages(ImageSearchRequest imageSearchRequest)
searchGalleryImages
in interface COS
public MediaWorkflowListResponse triggerWorkflowList(MediaWorkflowListRequest mediaWorkflowListRequest)
triggerWorkflowList
in interface COS
public InputStream getSnapshot(CosSnapshotRequest snapshotRequest)
getSnapshot
in interface COS
public String generateQrcode(GenerateQrcodeRequest generateQrcodeRequest)
generateQrcode
in interface COS
public Boolean addImageStyle(ImageStyleRequest imageStyleRequest)
addImageStyle
in interface COS
public ImageStyleResponse getImageStyle(ImageStyleRequest imageStyleRequest)
getImageStyle
in interface COS
public Boolean deleteImageStyle(ImageStyleRequest imageStyleRequest)
deleteImageStyle
in interface COS
public String getObjectDecompressionStatus(String bucketName, String objectKey)
getObjectDecompressionStatus
in interface COS
public DecompressionResult postObjectDecompression(DecompressionRequest decompressionRequest)
COS
postObjectDecompression
in interface COS
decompressionRequest
- 解压请求体public DecompressionResult getObjectDecompressionStatus(String bucketName, String objectKey, String jobId)
COS
getObjectDecompressionStatus
in interface COS
bucketName
- 桶名objectKey
- 对象的keyjobId
- 指定jobId(可以是null)public ListJobsResult listObjectDecompressionJobs(String bucketName, String jobStatus, String sortBy, String maxResults, String nextToken)
COS
listObjectDecompressionJobs
in interface COS
bucketName
- 桶名称jobStatus
- 支持Running|Success|Failed|Pending等选项进行查询过滤(可以是null)sortBy
- 支持asc/dsc两个选项, 分别代表升序和降序(可以是null)maxResults
- 每一页最多列出的项数(可以是null)nextToken
- 可选项,用于翻页(可以是null)public MediaJobResponse createPicProcessJob(MediaJobsRequest req)
createPicProcessJob
in interface COS
public MediaListQueueResponse describePicProcessQueues(MediaQueueRequest req)
describePicProcessQueues
in interface COS
public boolean processImage2(CImageProcessRequest imageProcessRequest)
processImage2
in interface COS
public FileProcessJobResponse createFileProcessJob(FileProcessRequest req)
createFileProcessJob
in interface COS
public FileProcessJobResponse describeFileProcessJob(FileProcessRequest request)
describeFileProcessJob
in interface COS
public BatchJobResponse createInventoryTriggerJob(BatchJobRequest req)
createInventoryTriggerJob
in interface COS
public BatchJobResponse describeInventoryTriggerJob(BatchJobRequest request)
describeInventoryTriggerJob
in interface COS
public AutoTranslationBlockResponse autoTranslationBlock(AutoTranslationBlockRequest translationBlockRequest)
autoTranslationBlock
in interface COS
public DetectFaceResponse detectFace(DetectFaceRequest detectFaceRequest)
detectFace
in interface COS
public AIGameRecResponse aiGameRec(AIRecRequest aiRecRequest)
public Boolean cancelLiveAuditing(VideoAuditingRequest videoAuditingRequest)
cancelLiveAuditing
in interface COS
public AuditingStrategyResponse addAuditingStrategy(AuditingStrategyRequest auditingStrategyRequest)
addAuditingStrategy
in interface COS
public AuditingStrategyResponse updateAuditingStrategy(AuditingStrategyRequest auditingStrategyRequest)
updateAuditingStrategy
in interface COS
public AuditingStrategyResponse describeAuditingStrategy(AuditingStrategyRequest auditingStrategyRequest)
describeAuditingStrategy
in interface COS
public AuditingStrategyListResponse describeAuditingStrategyList(AuditingStrategyRequest auditingStrategyRequest)
describeAuditingStrategyList
in interface COS
public AuditingTextLibResponse addAuditingTextLib(AuditingTextLibRequest libRequest)
addAuditingTextLib
in interface COS
public AuditingTextLibResponse describeAuditingTextLib(AuditingTextLibRequest libRequest)
describeAuditingTextLib
in interface COS
public AuditingTextLibResponse updateAuditingTextLib(AuditingTextLibRequest libRequest)
updateAuditingTextLib
in interface COS
public AuditingTextLibResponse deleteAuditingTextLib(AuditingTextLibRequest libRequest)
deleteAuditingTextLib
in interface COS
public AuditingKeywordResponse addAuditingLibKeyWord(AuditingKeywordRequest keywordRequest)
addAuditingLibKeyWord
in interface COS
public AuditingKeywordResponse describeAuditingKeyWordList(AuditingKeywordRequest keywordRequest)
describeAuditingKeyWordList
in interface COS
public AuditingKeywordResponse deleteAuditingKeyWord(AuditingKeywordRequest keywordRequest)
deleteAuditingKeyWord
in interface COS
public ImageInspectResponse getImageInspect(ImageInspectRequest inspectRequest)
getImageInspect
in interface COS
public MediaJobResponseV2 describeMediaJobV2(MediaJobsRequestV2 req)
describeMediaJobV2
in interface COS
public InputStream aIImageColoring(AIImageColoringRequest aIImageColoringRequest)
aIImageColoring
in interface COS
public PostSpeechRecognitionResponse postSpeechRecognition(PostSpeechRecognitionRequest postSpeechRecognitionRequest)
postSpeechRecognition
in interface COS
public boolean faceSearchBucket(FaceSearchBucketRequest customRequest)
faceSearchBucket
in interface COS
public CreatePersonResponse createPerson(CreatePersonRequest createPersonRequest)
createPerson
in interface COS
public AddPersonFaceResponse addPersonFace(AddPersonFaceRequest addPersonFaceRequest)
addPersonFace
in interface COS
public SearchPersonFaceResponse searchPersonFace(SearchPersonFaceRequest customRequest)
searchPersonFace
in interface COS
public boolean deletePersonFace(DeletePersonFaceRequest customRequest)
deletePersonFace
in interface COS
public DNADbFilesResponse describeMediaDnaDbFiles(DNADbFilesRequest dnaDbFilesRequest)
describeMediaDnaDbFiles
in interface COS
public DNADbConfigsResponse describeMediaDnaDbs(DNADbConfigsRequest dnaDbConfigsRequest)
describeMediaDnaDbs
in interface COS
public ZipPreviewResponse zipPreview(ZipPreviewRequest zipPreviewRequest)
zipPreview
in interface COS
public GoodsMattingResponse goodsMatting(GoodsMattingRequest customRequest)
goodsMatting
in interface COS
public CreateHLSPlayKeyResponse createHLSPlayKey(CreateHLSPlayKeyRequest customRequest)
createHLSPlayKey
in interface COS
public GetHLSPlayKeyResponse getHLSPlayKey(GetHLSPlayKeyRequest customRequest)
getHLSPlayKey
in interface COS
public UpdataHLSPlayKeyResponse updataHLSPlayKey(UpdataHLSPlayKeyRequest customRequest)
updataHLSPlayKey
in interface COS
public MediaListTemplateResponse describeMediaTemplatesV2(MediaTemplateRequest request)
describeMediaTemplatesV2
in interface COS
public InputStream getPlayList(GetPlayListRequest getPlayListRequest)
getPlayList
in interface COS
public RecognizeLogoResponse recognizeLogo(RecognizeLogoRequest customRequest)
recognizeLogo
in interface COS
public CreateDatasetResponse createDataset(CreateDatasetRequest customRequest)
createDataset
in interface COS
public CreateDatasetBindingResponse createDatasetBinding(CreateDatasetBindingRequest customRequest)
createDatasetBinding
in interface COS
public CreateFileMetaIndexResponse createFileMetaIndex(CreateFileMetaIndexRequest customRequest)
createFileMetaIndex
in interface COS
public DatasetFaceSearchResponse datasetFaceSearch(DatasetFaceSearchRequest customRequest)
datasetFaceSearch
in interface COS
public DatasetSimpleQueryResponse datasetSimpleQuery(DatasetSimpleQueryRequest customRequest)
datasetSimpleQuery
in interface COS
public DeleteDatasetResponse deleteDataset(DeleteDatasetRequest customRequest)
deleteDataset
in interface COS
public DeleteDatasetBindingResponse deleteDatasetBinding(DeleteDatasetBindingRequest customRequest)
deleteDatasetBinding
in interface COS
public DeleteFileMetaIndexResponse deleteFileMetaIndex(DeleteFileMetaIndexRequest customRequest)
deleteFileMetaIndex
in interface COS
public DescribeDatasetResponse describeDataset(DescribeDatasetRequest customRequest)
describeDataset
in interface COS
public DescribeDatasetBindingResponse describeDatasetBinding(DescribeDatasetBindingRequest customRequest)
describeDatasetBinding
in interface COS
public DescribeDatasetBindingsResponse describeDatasetBindings(DescribeDatasetBindingsRequest customRequest)
describeDatasetBindings
in interface COS
public DescribeDatasetsResponse describeDatasets(DescribeDatasetsRequest customRequest)
describeDatasets
in interface COS
public DescribeFileMetaIndexResponse describeFileMetaIndex(DescribeFileMetaIndexRequest customRequest)
describeFileMetaIndex
in interface COS
public SearchImageResponse searchImage(SearchImageRequest customRequest)
searchImage
in interface COS
public UpdateDatasetResponse updateDataset(UpdateDatasetRequest customRequest)
updateDataset
in interface COS
public UpdateFileMetaIndexResponse updateFileMetaIndex(UpdateFileMetaIndexRequest customRequest)
updateFileMetaIndex
in interface COS
public MediaTemplateResponseV2 createMediaTemplateV2(MediaTemplateRequestV2 templateRequest)
createMediaTemplateV2
in interface COS
public ImageOCRResponse imageOCR(ImageOCRRequest ocrRequest)
public String generateCosDomainPrivateM3U8Url(PrivateM3U8Request privateM3U8Request)
Copyright © 2024. All rights reserved.