类 BosClient


  • public class BosClient
    extends AbstractBceClient
    Provides the client for accessing the Baidu Object Service.
    • 字段详细资料

      • STORAGE_CLASS_STANDARD

        public static final String STORAGE_CLASS_STANDARD
        Standard BOS storage class
        另请参阅:
        常量字段值
      • STORAGE_CLASS_STANDARD_IA

        public static final String STORAGE_CLASS_STANDARD_IA
        Infrequent access BOS storage class
        另请参阅:
        常量字段值
      • STORAGE_CLASS_COLD

        public static final String STORAGE_CLASS_COLD
        Cold access BOS storage class
        另请参阅:
        常量字段值
      • STORAGE_CLASS_ARCHIVE

        public static final String STORAGE_CLASS_ARCHIVE
        Archive access BOS storage class
        另请参阅:
        常量字段值
      • RESTORE_TIER_STANDARD

        public static final String RESTORE_TIER_STANDARD
        Standard restore tier
        另请参阅:
        常量字段值
      • RESTORE_TIER_EXPEDITED

        public static final String RESTORE_TIER_EXPEDITED
        Expedited restore tier
        另请参阅:
        常量字段值
      • RESTORE_TIER_LOWCOST

        public static final String RESTORE_TIER_LOWCOST
        LowCost restore tier
        另请参阅:
        常量字段值
    • 构造器详细资料

      • BosClient

        public BosClient()
        Constructs a new client to invoke service methods on Bos.
      • BosClient

        public BosClient​(BosClientConfiguration clientConfiguration)
        Constructs a new Bos client using the client configuration to access Bos.
        参数:
        clientConfiguration - The bos client configuration options controlling how this client connects to Bos (e.g. proxy settings, retry counts, etc).
    • 方法详细资料

      • getBosAccountOwner

        public User getBosAccountOwner()
        Gets the current owner of the Bos account that the authenticated sender of the request is using.

        The caller must authenticate with a valid BCE Access Key ID that is registered with Bos.

        返回:
        The account of the authenticated sender
      • getBosAccountOwner

        public User getBosAccountOwner​(GetBosAccountOwnerRequest request)
        Gets the current owner of the Bos account that the authenticated sender of the request is using.

        The caller must authenticate with a valid BCE Access Key ID that is registered with Bos.

        参数:
        request - This request containing the credentials for getting the account of the authenticated sender.
        返回:
        The account of the authenticated sender
      • listBuckets

        public ListBucketsResponse listBuckets()
        Returns a list of all Bos buckets that the authenticated sender of the request owns.

        Users must authenticate with a valid BCE Access Key ID that is registered with Bos. Anonymous requests cannot list buckets, and users cannot list buckets that they did not create.

        返回:
        All of the Bos buckets owned by the authenticated sender of the request.
      • listBuckets

        public ListBucketsResponse listBuckets​(ListBucketsRequest request)
        Returns a list of all Bos buckets that the authenticated sender of the request owns.

        Users must authenticate with a valid BCE Access Key ID that is registered with Bos. Anonymous requests cannot list buckets, and users cannot list buckets that they did not create.

        参数:
        request - The request containing all of the options related to the listing of buckets.
        返回:
        All of the Bos buckets owned by the authenticated sender of the request.
      • createBucket

        public CreateBucketResponse createBucket​(String bucketName)
        Creates a new Bos bucket with the specified name.
        参数:
        bucketName - The name of the bucket to create. All buckets in Bos share a single namespace; ensure the bucket is given a unique name.
        返回:
        The newly created bucket.
      • createBucket

        public CreateBucketResponse createBucket​(CreateBucketRequest request)
        Creates a new Bos bucket with the specified name.
        参数:
        request - The request object containing all options for creating a Bos bucket.
        返回:
        The newly created bucket.
      • doesBucketExist

        public boolean doesBucketExist​(String bucketName)
        Checks if the specified bucket exists. Bos buckets are named in a global namespace; use this method to determine if a specified bucket name already exists, and therefore can't be used to create a new bucket.

        If invalid security credentials are used to execute this method, the client is not able to distinguish between bucket permission errors and invalid credential errors, and this method could return an incorrect result.

        参数:
        bucketName - The name of the bucket to check.
        返回:
        The value true if the specified bucket exists in Bos; the value false if there is no bucket in Bos with that name.
      • doesBucketExist

        public boolean doesBucketExist​(DoesBucketExistRequest request)
        Checks if the specified bucket exists. Bos buckets are named in a global namespace; use this method to determine if a specified bucket name already exists, and therefore can't be used to create a new bucket.

        If invalid security credentials are used to execute this method, the client is not able to distinguish between bucket permission errors and invalid credential errors, and this method could return an incorrect result.

        参数:
        request - The request object containing all options for checking a Bos bucket.
        返回:
        The value true if the specified bucket exists in Bos; the value false if there is no bucket in Bos with that name.
      • getBucketAcl

        public GetBucketAclResponse getBucketAcl​(String bucketName)
        Gets the ACL for the specified Bos bucket.

        Each bucket and object in Bos has an ACL that defines its access control policy. When a request is made, Bos 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, Bos returns an error.

        参数:
        bucketName - The name of the bucket whose ACL is being retrieved.
        返回:
        The GetBuckeetAclResponse for the specified Bos bucket.
      • getBucketAcl

        public GetBucketAclResponse getBucketAcl​(GetBucketAclRequest request)
        Gets the ACL for the specified Bos bucket.

        Each bucket and object in Bos has an ACL that defines its access control policy. When a request is made, Bos 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, Bos returns an error.

        参数:
        request - The request containing the name of the bucket whose ACL is being retrieved.
        返回:
        The GetBuckeetAclResponse for the specified Bos bucket.
      • getBucketLocation

        public GetBucketLocationResponse getBucketLocation​(String bucketName)
        Gets the Location for the specified Bos bucket.

        Each bucket and object in Bos has an Location that defines its location

        参数:
        bucketName - The name of the bucket whose Location is being retrieved.
        返回:
        The GetBuckeetLocationResponse for the specified Bos bucket.
      • getBucketLocation

        public GetBucketLocationResponse getBucketLocation​(GetBucketLocationRequest request)
        Gets the Location for the specified Bos bucket.

        Each bucket and object in Bos has an Location that defines its location

        参数:
        request - The request containing the name of the bucket whose Location is being retrieved.
        返回:
        The GetBuckeetLocationResponse for the specified Bos bucket.
      • putBucketStorageClass

        public void putBucketStorageClass​(String bucketName,
                                          String storageClass)
        Sets the default storageClass for the specified Bos bucket.

        A json style of bucket storageClass provides a storageClass to configure an bucket.

        参数:
        bucketName - The name of the bucket whose storageClass is being set.
        storageClass - The pre-configured storageClass to set for the specified bucket.
      • putBucketStorageClass

        public void putBucketStorageClass​(PutBucketStorageClassRequest request)
        Sets the default storageClass for the specified Bos bucket.

        A json style of bucket storageClass provides a storageClass to configure an bucket.

        参数:
        request - The request containing the name of the bucket and the default storageClass.
      • getBucketStorageClass

        public GetBucketStorageClassResponse getBucketStorageClass​(String bucketName)
        Gets the default storageClass for the specified Bos bucket.
        参数:
        bucketName - The bucket whose storageClass to to get.
      • setBucketAcl

        public void setBucketAcl​(String bucketName,
                                 String jsonAcl)
        Sets the json style of bucket acl for the specified Bos bucket using one of the pre-configured CannedAccessControlLists.

        A json style of bucket acl provides a quick way to configure an object or bucket with commonly used access control policies.

        参数:
        bucketName - The name of the bucket whose ACL is being set.
        jsonAcl - The pre-configured CannedAccessControlLists to set for the specified bucket.
      • setBucketAcl

        public void setBucketAcl​(String bucketName,
                                 CannedAccessControlList acl)
        Sets the CannedAccessControlList for the specified Bos bucket using one of the pre-configured CannedAccessControlLists.

        A CannedAccessControlList provides a quick way to configure an object or bucket with commonly used access control policies.

        参数:
        bucketName - The name of the bucket whose ACL is being set.
        acl - The pre-configured CannedAccessControlLists to set for the specified bucket.
      • setBucketAcl

        public void setBucketAcl​(SetBucketAclRequest request)
        Sets the Acl for the specified Bos bucket.
        参数:
        request - The request object containing the bucket to modify and the ACL to set.
      • setBucketLogging

        public void setBucketLogging​(SetBucketLoggingRequest request)
        Sets the Logging for the specified Bos bucket.
        参数:
        request - The request object containing the Logging to set into specified bucket.
      • getBucketLogging

        public GetBucketLoggingResponse getBucketLogging​(GetBucketLoggingRequest request)
        Gets the Logging for the specified Bos bucket.
        参数:
        request - The request object containing the specified bucket to get bucket logging.
      • deleteBucketLogging

        public void deleteBucketLogging​(DeleteBucketLoggingRequest request)
        Delete the Logging for the specified Bos bucket.
        参数:
        request - The request object containing the specified bucket to delete bucket logging.
      • setBucketCors

        public void setBucketCors​(SetBucketCorsRequest request)
        Sets the CORS for the specified Bos bucket.
        参数:
        request - The request object containing the CORS to set into specified bucket.
      • getBucketCros

        public GetBucketCorsResponse getBucketCros​(GetBucketCorsRequest request)
        Gets the CORS for the specified Bos bucket.
        参数:
        request - The request object containing the specified bucket to get bucket CORS.
      • deleteBucketCors

        public void deleteBucketCors​(DeleteBucketCorsRequest request)
        Delete the CORS for the specified Bos bucket.
        参数:
        request - The request object containing the specified bucket to delete bucket CORS.
      • setBucketReplication

        public void setBucketReplication​(SetBucketReplicationRequest request)
        Sets the replication for the specified Bos bucket with specified replicationId.
        参数:
        request -
      • deleteBucketReplication

        public void deleteBucketReplication​(DeleteBucketReplicationRequest request)
        Deletes the replication for the specified Bos bucket with specified replicationId.
      • setBucketBucketLifecycle

        public void setBucketBucketLifecycle​(SetBucketLifecycleRequest request)
        Sets the Lifecycle for the specified Bos bucket.
        参数:
        request - The request object containing the Lifecycle to set into specified bucket.
      • deleteBucketLifecycle

        public void deleteBucketLifecycle​(DeleteBucketLifecycleRequest request)
        Delete the Lifecycle for the specified Bos bucket.
        参数:
        request - The request object containing the specified bucket to delete bucket Lifecycle.
      • deleteBucket

        public void deleteBucket​(String bucketName)
        Deletes the specified bucket. All objects 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.

        参数:
        bucketName - The name of the bucket to delete.
      • deleteBucket

        public void deleteBucket​(DeleteBucketRequest request)
        Deletes the specified bucket. All objects 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.

        参数:
        request - The request object containing all options for deleting a Bos bucket.
      • generatePresignedUrl

        public URL generatePresignedUrl​(String bucketName,
                                        String key,
                                        int expirationInSeconds)
        Returns a pre-signed URL for accessing a Bos resource.
        参数:
        bucketName - The name of the bucket containing the desired object.
        key - The key in the specified bucket under which the desired object is stored.
        expirationInSeconds - The expiration after which the returned pre-signed URL will expire.
        返回:
        A pre-signed URL which expires at the specified time, and can be used to allow anyone to download the specified object from Bos, without exposing the owner's Bce secret access key.
      • generatePresignedUrl

        public URL generatePresignedUrl​(String bucketName,
                                        String key,
                                        int expirationInSeconds,
                                        HttpMethodName method)
        Returns a pre-signed URL for accessing a Bos resource.
        参数:
        bucketName - The name of the bucket containing the desired object.
        key - The key in the specified bucket under which the desired object is stored.
        expirationInSeconds - The expiration after which the returned pre-signed URL will expire.
        method - The HTTP method verb to use for this URL
        返回:
        A pre-signed URL which expires at the specified time, and can be used to allow anyone to download the specified object from Bos, without exposing the owner's Bce secret access key.
      • generatePresignedUrl

        public URL generatePresignedUrl​(GeneratePresignedUrlRequest request)
        Returns a pre-signed URL for accessing a Bos resource.
        参数:
        request - The request object containing all the options for generating a pre-signed URL (bucket name, key, expiration date, etc).
        返回:
        A pre-signed URL which expires at the specified time, and can be used to allow anyone to download the specified object from Bos, without exposing the owner's Bce secret access key.
      • listObjects

        public ListObjectsResponse listObjects​(String bucketName)
        Returns ListObjectsResponse containing a list of summary information about the objects in the specified buckets. List results are always returned in lexicographic (alphabetical) order.
        参数:
        bucketName - The name of the Bos bucket to list.
        返回:
        ListObjectsResponse containing a listing of the objects in the specified bucket, along with any other associated information, such as common prefixes (if a delimiter was specified), the original request parameters, etc.
      • listObjects

        public ListObjectsResponse listObjects​(String bucketName,
                                               String prefix)
        Returns ListObjectsResponse containing a list of summary information about the objects in the specified buckets. List results are always returned in lexicographic (alphabetical) order.
        参数:
        bucketName - The name of the Bos 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.
        返回:
        ListObjectsResponse containing a listing of the objects in the specified bucket, along with any other associated information, such as common prefixes (if a delimiter was specified), the original request parameters, etc.
      • listObjects

        public ListObjectsResponse listObjects​(ListObjectsRequest request)
        Returns ListObjectsResponse containing a list of summary information about the objects in the specified buckets. List results are always returned in lexicographic (alphabetical) order.
        参数:
        request - The request object containing all options for listing the objects in a specified bucket.
        返回:
        ListObjectsResponse containing a listing of the objects in the specified bucket, along with any other associated information, such as common prefixes (if a delimiter was specified), the original request parameters, etc.
      • listNextBatchOfObjects

        public ListObjectsResponse listNextBatchOfObjects​(ListObjectsResponse previousResponse)
        Provides an easy way to continue a truncated object listing and retrieve the next page of results.
        参数:
        previousResponse - The previous truncated ListObjectsResponse. If a non-truncated ListObjectsResponse is passed in, an empty ListObjectsResponse is returned without ever contacting Bos.
        返回:
        The next set of ListObjectsResponse results, beginning immediately after the last result in the specified previous ListObjectsResponse.
      • getObject

        public BosObject getObject​(String bucketName,
                                   String key)
        Gets the object stored in Bos under the specified bucket and key.
        参数:
        bucketName - The name of the bucket containing the desired object.
        key - The key under which the desired object is stored.
        返回:
        The object stored in Bos in the specified bucket and key.
      • getObject

        public ObjectMetadata getObject​(String bucketName,
                                        String key,
                                        File destinationFile)
        Gets the object metadata for the object stored in Bos under the specified bucket and key, and saves the object contents to the specified file. Returns null if the specified constraints weren't met.
        参数:
        bucketName - The name of the bucket containing the desired object.
        key - The key under which the desired object is stored.
        destinationFile - Indicates the file (which might already exist) where to save the object content being downloading from Bos.
        返回:
        All Bos object metadata for the specified object. Returns null if constraints were specified but not met.
      • getObject

        public BosObject getObject​(GetObjectRequest request)
        Gets the object stored in Bos under the specified bucket and key.
        参数:
        request - The request object containing all the options on how to download the object.
        返回:
        The object stored in Bos in the specified bucket and key.
      • getObject

        public ObjectMetadata getObject​(GetObjectRequest request,
                                        File destinationFile)
        Gets the object metadata for the object stored in Bos under the specified bucket and key, and saves the object contents to the specified file. Returns null if the specified constraints weren't met.
        参数:
        request - The request object containing all the options on how to download the Bos object content.
        destinationFile - Indicates the file (which might already exist) where to save the object content being downloading from Bos.
        返回:
        All Bos object metadata for the specified object. Returns null if constraints were specified but not met.
      • getObjectContent

        public byte[] getObjectContent​(String bucketName,
                                       String key)
        Gets the object content stored in Bos under the specified bucket and key.
        参数:
        bucketName - The name of the bucket containing the desired object.
        key - The key under which the desired object is stored.
        返回:
        The object content stored in Bos in the specified bucket and key.
      • getObjectContent

        public byte[] getObjectContent​(GetObjectRequest request)
        Gets the object content stored in Bos under the specified bucket and key.
        参数:
        request - The request object containing all the options on how to download the Bos object content.
        返回:
        The object content stored in Bos in the specified bucket and key.
      • doesObjectExist

        public boolean doesObjectExist​(String bucketName,
                                       String key)
        Checks if the specified object exists. use this method to determine if a specified object already exists

        If invalid security credentials are used to execute this method, the client is not able to distinguish between bucket permission errors and invalid credential errors, and this method could return an incorrect result.

        参数:
        bucketName - The name of the bucket
        key - The name of the object to check.
        返回:
        The value true if the specified object exists in Bos; the value false if there is no object in Bos with that name.
      • getObjectMetadata

        public ObjectMetadata getObjectMetadata​(String bucketName,
                                                String key)
        Gets the metadata for the specified Bos 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 Bos.

        参数:
        bucketName - The name of the bucket containing the object's whose metadata is being retrieved.
        key - The key of the object whose metadata is being retrieved.
        返回:
        All Bos object metadata for the specified object.
      • getObjectMetadata

        public ObjectMetadata getObjectMetadata​(GetObjectMetadataRequest request)
        Gets the metadata for the specified Bos 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 Bos.

        参数:
        request - The request object specifying the bucket, key whose metadata is being retrieved.
        返回:
        All Bos object metadata for the specified object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           File file)
        Uploads the specified file to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        file - The file containing the data to be uploaded to Bos.
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           File file,
                                           ObjectMetadata metadata)
        Uploads the specified file and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        file - The file containing the data to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           String value)
        Uploads the specified string to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The string containing the value to be uploaded to Bos.
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           String value,
                                           ObjectMetadata metadata)
        Uploads the specified string and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The string containing the value to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           byte[] value)
        Uploads the specified bytes to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The bytes containing the value to be uploaded to Bos.
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           byte[] value,
                                           ObjectMetadata metadata)
        Uploads the specified bytes and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The bytes containing the value to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           InputStream input)
        Uploads the specified input stream to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        input - The input stream containing the value to be uploaded to Bos.
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           InputStream input,
                                           ObjectMetadata metadata)
        Uploads the specified input stream and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        input - The input stream containing the value to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(String bucketName,
                                           String key,
                                           InputStream input,
                                           BosProgressCallback progressCallback)
        Uploads the specified input stream and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        input - The input stream containing the value to be uploaded to Bos.
        progressCallback - The BosProgressCallback, which used for get progress information. (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • putObject

        public PutObjectResponse putObject​(PutObjectRequest request)
        Uploads a new object to the specified Bos 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.
        参数:
        request - The request object containing all the parameters to upload a new object to Bos.
        返回:
        A PutObjectResponse object containing the information returned by Bos for the newly created object.
      • copyObject

        public CopyObjectResponse copyObject​(String sourceBucketName,
                                             String sourceKey,
                                             String destinationBucketName,
                                             String destinationKey)
        Copies a source object to a new destination in Bos.
        参数:
        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.
        返回:
        A CopyObjectResponse object containing the information returned by Bos for the newly created object.
      • copyObject

        public CopyObjectResponse copyObject​(CopyObjectRequest request)
        Copies a source object to a new destination in Bos.
        参数:
        request - The request object containing all the options for copying an Bos object.
        返回:
        A CopyObjectResponse object containing the information returned by Bos for the newly created object.
      • fetchObject

        public FetchObjectResponse fetchObject​(String bucketName,
                                               String key,
                                               String sourceUrl)
        Fetches a source object to a new destination in Bos.
        参数:
        bucketName - The name of the bucket in which the new object will be created.
        key - The key in the destination bucket under which the new object will be created.
        sourceUrl - The url full path for fetching.
        返回:
        A FetchObjectResponse object containing the information returned by Bos for the newly fetching.
      • fetchObject

        public FetchObjectResponse fetchObject​(String bucketName,
                                               String key,
                                               String sourceUrl,
                                               String mode)
        Fetches a source object to a new destination in Bos.
        参数:
        bucketName - The name of the bucket in which the new object will be created.
        key - The key in the destination bucket under which the new object will be created.
        sourceUrl - The url full path for fetching.
        mode - The mode path for fetching.
        返回:
        A FetchObjectResponse object containing the information returned by Bos for the newly fetching.
      • fetchObject

        public FetchObjectResponse fetchObject​(FetchObjectRequest request)
        Fetches a source object to a new destination in Bos.
        参数:
        request - The request object containing all the options for fetching url to a Bos object.
        返回:
        A FetchObjectResponse object containing the information returned by Bos for the newly fetching.
      • deleteObject

        public void deleteObject​(String bucketName,
                                 String key)
        Deletes the specified object in the specified bucket.
        参数:
        bucketName - The name of the Bos bucket containing the object to delete.
        key - The key of the object to delete.
      • deleteObject

        public void deleteObject​(DeleteObjectRequest request)
        Deletes the specified object in the specified bucket.
        参数:
        request - The request object containing all options for deleting a Bos object.
      • setObjectSymlink

        public SetObjectSymlinkResponse setObjectSymlink​(String bucketName,
                                                         String key,
                                                         String symlinkTarget)
        Set the specified object symlink in the specified bucket.
        参数:
        bucketName - The name of the Bos bucket containing the object
        key - The object's symlink name
        symlinkTarget - The target object of the symlink
        返回:
      • setObjectSymlink

        public SetObjectSymlinkResponse setObjectSymlink​(SetObjectSymlinkRequest request)
        Set the specified object symlink in the specified bucket.
        参数:
        request - The request object containing all options for setting a symlink of target object.
        返回:
      • getObjectSymlink

        public GetObjectSymlinkResponse getObjectSymlink​(String bucketName,
                                                         String key)
        Gets the specified object symlink in the specified bucket
        参数:
        bucketName - The name of the Bos bucket containing the symlink object
        key - The symlink name
        返回:
        The symlink target Object
      • getObjectSymlink

        public GetObjectSymlinkResponse getObjectSymlink​(GetObjectSymlinkRequest request)
        Gets the specified object symlink in the specified bucket
        参数:
        request - The request object containing all options for getting a symlink of target object.
        返回:
        The symlink target Object
      • deleteMultipleObjects

        public DeleteMultipleObjectsResponse deleteMultipleObjects​(DeleteMultipleObjectsRequest request)
        Deletes the multiple specified objects in the specified bucket.
        参数:
        request - The request object containing all options for deleting a Bos multiple objects.
      • setObjectAcl

        public void setObjectAcl​(String bucketName,
                                 String objectKey,
                                 String jsonObjectAcl)
        Set Object Acl for specified object in the specified bucket.
        参数:
        bucketName -
        objectKey -
        jsonObjectAcl - The json format of specified object.
      • setObjectAcl

        public void setObjectAcl​(String bucketName,
                                 String objectKey,
                                 CannedAccessControlList acl)
        Set Object Acl for specified object in the specified bucket.
        参数:
        bucketName -
        objectKey -
        acl - The CannedAccessControlList of specified object.
      • setObjectAcl

        public void setObjectAcl​(SetObjectAclRequest request)
        Set Object Acl for specified object in the specified bucket.
        参数:
        request - The request object containing all options for setting a Bos object acl.
      • getObjectAcl

        public GetObjectAclResponse getObjectAcl​(GetObjectAclRequest request)
        Get Object Acl for specified object in the specified bucket.
        参数:
        request - The request object containing all options for getting a Bos object acl.
      • deleteObjectAcl

        public void deleteObjectAcl​(DeleteObjectAclRequest request)
        Delete Object Acl for specified object in the specified bucket.
        参数:
        request - The request object containing all options for deleting a Bos object acl.
      • initiateMultipartUpload

        public InitiateMultipartUploadResponse initiateMultipartUpload​(String bucketName,
                                                                       String key)
        Initiates a multipart upload and returns an InitiateMultipartUploadResponse which contains an upload ID. This upload ID associates all the parts in the specific upload and is used in each of your subsequent uploadPart requests. You also include this upload ID in the final request to either complete, or abort the multipart upload request.
        参数:
        bucketName - The name of the Bos bucket containing the object to initiate.
        key - The key of the object to initiate.
        返回:
        An InitiateMultipartUploadResponse from Bos.
      • initiateMultipartUpload

        public InitiateMultipartUploadResponse initiateMultipartUpload​(InitiateMultipartUploadRequest request)
        Initiates a multipart upload and returns an InitiateMultipartUploadResponse which contains an upload ID. This upload ID associates all the parts in the specific upload and is used in each of your subsequent uploadPart requests. You also include this upload ID in the final request to either complete, or abort the multipart upload request.
        参数:
        request - The InitiateMultipartUploadRequest object that specifies all the parameters of this operation.
        返回:
        An InitiateMultipartUploadResponse from Bos.
      • uploadPart

        public UploadPartResponse uploadPart​(UploadPartRequest request)
        Uploads a part in a multipart upload. You must initiate a multipart upload before you can upload any part.
        参数:
        request - The UploadPartRequest object that specifies all the parameters of this operation.
        返回:
        An UploadPartResponse from Bos containing the part number and ETag of the new part.
      • uploadPartCopy

        public UploadPartCopyResponse uploadPartCopy​(UploadPartCopyRequest request)
        Uploads a copy part in a multipart upload. You must initiate a multipart upload before you can upload any part.
        参数:
        request - The UploadPartCopyRequest object that specifies all the parameters of this operation.
        返回:
        An UploadPartCopyResponse from Bos containing the part number and ETag of the new part.
      • listParts

        public ListPartsResponse listParts​(String bucketName,
                                           String key,
                                           String uploadId)
        Lists the parts that have been uploaded for a specific multipart upload.
        参数:
        bucketName - The name of the bucket containing the multipart upload whose parts are being listed.
        key - The key of the associated multipart upload whose parts are being listed.
        uploadId - The ID of the multipart upload whose parts are being listed.
        返回:
        Returns a ListPartsResponse from Bos.
      • listParts

        public ListPartsResponse listParts​(ListPartsRequest request)
        Lists the parts that have been uploaded for a specific multipart upload.
        参数:
        request - The ListPartsRequest object that specifies all the parameters of this operation.
        返回:
        Returns a ListPartsResponse from Bos.
      • completeMultipartUpload

        public CompleteMultipartUploadResponse completeMultipartUpload​(String bucketName,
                                                                       String key,
                                                                       String uploadId,
                                                                       List<PartETag> partETags)
        Completes a multipart upload by assembling previously uploaded parts.
        参数:
        bucketName - The name of the bucket containing the multipart upload to complete.
        key - The key of the multipart upload to complete.
        uploadId - The ID of the multipart upload to complete.
        partETags - The list of part numbers and ETags to use when completing the multipart upload.
        返回:
        A CompleteMultipartUploadResponse from Bos containing the ETag for the new object composed of the individual parts.
      • completeMultipartUpload

        public CompleteMultipartUploadResponse completeMultipartUpload​(String bucketName,
                                                                       String key,
                                                                       String uploadId,
                                                                       List<PartETag> partETags,
                                                                       ObjectMetadata metadata)
        Completes a multipart upload by assembling previously uploaded parts.
        参数:
        bucketName - The name of the bucket containing the multipart upload to complete.
        key - The key of the multipart upload to complete.
        uploadId - The ID of the multipart upload to complete.
        partETags - The list of part numbers and ETags to use when completing the multipart upload.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        A CompleteMultipartUploadResponse from Bos containing the ETag for the new object composed of the individual parts.
      • completeMultipartUpload

        public CompleteMultipartUploadResponse completeMultipartUpload​(CompleteMultipartUploadRequest request)
        Completes a multipart upload by assembling previously uploaded parts.
        参数:
        request - The CompleteMultipartUploadRequest object that specifies all the parameters of this operation.
        返回:
        A CompleteMultipartUploadResponse from Bos containing the ETag for the new object composed of the individual parts.
      • abortMultipartUpload

        public void abortMultipartUpload​(String bucketName,
                                         String key,
                                         String uploadId)
        Aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads may or may not succeed. As a result, it may be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.
        参数:
        bucketName - The name of the bucket containing the multipart upload to abort.
        key - The key of the multipart upload to abort.
        uploadId - The ID of the multipart upload to abort.
      • abortMultipartUpload

        public void abortMultipartUpload​(AbortMultipartUploadRequest request)
        Aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads may or may not succeed. As a result, it may be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.
        参数:
        request - The AbortMultipartUploadRequest object that specifies all the parameters of this operation.
      • listMultipartUploads

        public ListMultipartUploadsResponse listMultipartUploads​(String bucketName)
        Lists in-progress multipart uploads. An in-progress multipart upload is a multipart upload that has been initiated, using the InitiateMultipartUpload request, but has not yet been completed or aborted.
        参数:
        bucketName - The name of the bucket containing the uploads to list.
        返回:
        A ListMultipartUploadsResponse from Bos.
      • listMultipartUploads

        public ListMultipartUploadsResponse listMultipartUploads​(ListMultipartUploadsRequest request)
        Lists in-progress multipart uploads. An in-progress multipart upload is a multipart upload that has been initiated, using the InitiateMultipartUpload request, but has not yet been completed or aborted.
        参数:
        request - The ListMultipartUploadsRequest object that specifies all the parameters of this operation.
        返回:
        A ListMultipartUploadsResponse from Bos.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 File file)
        Uploads the specified appendable file to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        file - The appendable file containing the data to be uploaded to Bos.
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 File file,
                                                 ObjectMetadata metadata)
        Uploads the specified appendable file to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        file - The file containing the data to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 String value)
        Uploads the specified string to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The string containing the value to be uploaded to Bos.
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 String value,
                                                 ObjectMetadata metadata)
        Uploads the specified string and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The string containing the value to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 byte[] value)
        Uploads the specified bytes to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The bytes containing the value to be uploaded to Bos.
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 byte[] value,
                                                 ObjectMetadata metadata)
        Uploads the appendable bytes and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        value - The bytes containing the value to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 InputStream input)
        Uploads the appendable input stream to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        input - The input stream containing the value to be uploaded to Bos.
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(String bucketName,
                                                 String key,
                                                 InputStream input,
                                                 ObjectMetadata metadata)
        Uploads the appendable input stream and object metadata to Bos under the specified bucket and key name.
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        key - The key under which to store the specified file.
        input - The input stream containing the value to be uploaded to Bos.
        metadata - Additional metadata instructing Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • appendObject

        public AppendObjectResponse appendObject​(AppendObjectRequest request)
        Uploads a new object to the specified Bos bucket. The AppendObjectRequest 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.
        参数:
        request - The request object containing all the parameters to upload a new appendable object to Bos.
        返回:
        An AppendObjectResponse object containing the information returned by Bos for the newly created object.
      • restoreObject

        public void restoreObject​(String bucketName,
                                  String key)
        Restore an archive object to the specified Bos bucket
        参数:
        bucketName - The name of rsestore an archive object.
        key - The key of rsestore an archive object.
      • restoreObject

        public void restoreObject​(String bucketName,
                                  String key,
                                  int restoreDays,
                                  String restoreTier)
        Restore an archive object to the specified Bos bucket
        参数:
        bucketName - The name of rsestore an archive object.
        key - The key of rsestore an archive object.
        restoreDays - The times after restore an archive object.
        restoreTier - The speed of rsestore an archive object.
      • restoreObject

        public void restoreObject​(RestoreObjectRequest request)
        Restore an archive object to the specified Bos bucket
        参数:
        request - The request object containing all the parameters to restore an archive object
      • setBucketEncryption

        public void setBucketEncryption​(String bucketName,
                                        BucketEncryption encryption)
        Set bucket encryption
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        encryption - The encryption of bucket
      • getBucketEncryption

        public GetBucketEncryptionResponse getBucketEncryption​(String bucketName)
        Get Bucket Encryption
        参数:
        bucketName - The name of an existing bucket
        返回:
      • deleteBucketEncryption

        public void deleteBucketEncryption​(String bucketName)
        Delete Bucket Encryption
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
      • deleteBucketEncryption

        public void deleteBucketEncryption​(DeleteBucketEncryptionRequest request)
        Delete Bucket Encryption
        参数:
        request -
      • setBucketStaticWebSite

        public void setBucketStaticWebSite​(String bucketName,
                                           String index,
                                           String notfound)
        Set bucket website
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        index - The index page for staticwebsite
        notfound - The notFound page for staticwebsite
      • getBucketStaticWebsite

        public GetBucketStaticWebsiteResponse getBucketStaticWebsite​(String bucketName)
        Get bucket static website
        参数:
        bucketName - The name of an existing bucket, to which you have Read permission.
        返回:
      • deleteBucketStaticWebSite

        public void deleteBucketStaticWebSite​(String bucketName)
        Delete bucket static website
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
      • deleteBucketStaticWebSite

        public void deleteBucketStaticWebSite​(DeleteBucketStaticWebsiteRequest request)
        Delete bucket static website
        参数:
        request -
      • setBucketCopyrightProtection

        public void setBucketCopyrightProtection​(String bucketName,
                                                 List<String> resources)
        Set bucket CopyrightProtection
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission
        resources - The resourceList of Bucket CopyrightProtection
      • getBucketCopyrightProtection

        public GetBucketCopyrightProtectionResponse getBucketCopyrightProtection​(String bucketName)
        Get bucket copyrightprotection
        参数:
        bucketName - The name of an existing bucket, to which you have Read permission
        返回:
      • deleteBucketCopyrightProtection

        public void deleteBucketCopyrightProtection​(String bucketName)
        Delete Bucket copyrightprotection
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission
      • putSuperObjectFromFile

        public boolean putSuperObjectFromFile​(File file,
                                              String bucketName,
                                              String objectKey)
        The Encapsulation of three-step upload when put Super Object from file
        参数:
        file - super object
        bucketName - The name of an existing bucket, to which you have Write permission.
        objectKey - The key under which to store the specified file.
        返回:
      • putSuperObjectFromFile

        public boolean putSuperObjectFromFile​(File file,
                                              String bucketName,
                                              String objectKey,
                                              long chunksize)
        The Encapsulation of three-step upload when put Super Object from file
        参数:
        file - super object
        bucketName - The name of an existing bucket, to which you have Write permission.
        objectKey - The key under which to store the specified file.
        chunksize - the part size when upload super object file
        返回:
      • putSuperObjectFromFile

        public boolean putSuperObjectFromFile​(File file,
                                              String bucketName,
                                              String objectKey,
                                              int nThreads)
        The Encapsulation of three-step upload when put Super Object from file
        参数:
        file - super object
        bucketName - The name of an existing bucket, to which you have Write permission.
        objectKey - The key under which to store the specified file.
        nThreads - The num of threads in thread pool
        返回:
      • putSuperObjectFromFile

        public boolean putSuperObjectFromFile​(File file,
                                              String bucketName,
                                              String objectKey,
                                              long chunksize,
                                              int nThreads)
        The Encapsulation of three-step upload when put Super Object from file
        参数:
        file - super object
        bucketName - The name of an existing bucket, to which you have Write permission.
        objectKey - The key under which to store the specified file.
        chunksize - the part size when upload super object file
        nThreads - The num of threads in thread pool
        返回:
      • putSuperObjectFromFile

        public boolean putSuperObjectFromFile​(PutSuperObjectRequest putSuperObjectRequest)
      • headBucket

        public HeadBucketResponse headBucket​(String bucketName)
        Gets the res whether the bucket exists, bucket type
        参数:
        bucketName - The name of the checked bucket
        返回:
        The HeadBucketResponse for the specified Bos bucket.
      • headBucket

        public HeadBucketResponse headBucket​(HeadBucketRequest request)
        Gets the res whether the bucket exists, bucket type
        参数:
        request - containing the name the checked bucket
        返回:
        The HeadBucketResponse for the specified Bos bucket.
      • getBucketMirroring

        public GetBucketMirroringResponse getBucketMirroring​(String bucketName)
        Gets the Bos bucket mirroring description.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
        返回:
        The GetBucketMirroringResponse for the Bos bucket.
      • getBucketMirroring

        public GetBucketMirroringResponse getBucketMirroring​(GetBucketMirroringRequest request)
        Gets the Bos bucket mirroring description.
        参数:
        request - The GetBucketMirroringRequest you create
        返回:
        The GetBucketMirroringResponse for the Bos bucket.
      • putBucketMirroring

        public void putBucketMirroring​(String bucketName,
                                       List<BucketMirroringConfiguration> bucketMirroringConfigurations)
        Set the Bos bucket mirroring.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
        bucketMirroringConfigurations - The bucketMirroringConfigurations object that your create
      • putBucketMirroring

        public void putBucketMirroring​(String bucketName,
                                       String jsonBucketMirroringConfigurations)
        Set the Bos bucket mirroring.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
        jsonBucketMirroringConfigurations - The bucketMirroringConfigurations json string that your create
      • putBucketMirroring

        public void putBucketMirroring​(PutBucketMirroringRequest request)
        Set the Bos bucket mirroring.
        参数:
        request - The PutBucketMirroringRequest you create
      • deleteBucketMirroring

        public void deleteBucketMirroring​(String bucketName)
        Delete the Bos bucket mirroring setting.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
      • deleteBucketMirroring

        public void deleteBucketMirroring​(DeleteBucketMirroringRequest request)
        Delete the Bos bucket mirroring setting.
        参数:
        request - The DeleteBucketMirroringRequest you create
      • getBucketTagging

        public GetBucketTaggingResponse getBucketTagging​(String bucketName)
        Gets the Bos bucket tagging description.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
        返回:
        The GetBucketTaggingResponse for the Bos bucket.
      • getBucketTagging

        public GetBucketTaggingResponse getBucketTagging​(GetBucketTaggingRequest request)
        Gets the Bos bucket tagging description.
        参数:
        request - The GetBucketTaggingRequest you create
        返回:
        The GetBucketTaggingResponse for the Bos bucket.
      • deleteBucketTagging

        public void deleteBucketTagging​(String bucketName)
        Delete the Bos bucket tagging setting.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
      • deleteBucketTagging

        public void deleteBucketTagging​(DeleteBucketTaggingRequest request)
        Delete the Bos bucket tagging setting.
        参数:
        request - The DeleteBucketTaggingRequest you create
      • putBucketTagging

        public void putBucketTagging​(String bucketName,
                                     String jsonBucketTags)
        Set the Bos bucket tagging.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
        jsonBucketTags - The bucket tagging json string that your create
      • putBucketTagging

        public void putBucketTagging​(String bucketName,
                                     List<BucketTag> tags)
        Set the Bos bucket tagging.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
        tags - The bucket tagging object that your create
      • putBucketTagging

        public void putBucketTagging​(PutBucketTaggingRequest request)
        Set the Bos bucket tagging.
        参数:
        request - The PutBucketTaggingRequest you create
      • putBucketTrash

        public void putBucketTrash​(String bucketName,
                                   String trashDir)
        Set the Bos bucket trash.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
        trashDir - The bucket trash name that your want to create
      • putBucketTrash

        public void putBucketTrash​(String bucketName)
        Set the Bos bucket trash.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
      • putBucketTrash

        public void putBucketTrash​(PutBucketTrashRequest request)
        Set the Bos bucket trash.
        参数:
        request - The PutBucketTrashRequest you create
      • getBucketTrash

        public GetBucketTrashResponse getBucketTrash​(String bucketName)
        Get the Bos bucket trash.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
      • deleteBucketTrash

        public void deleteBucketTrash​(String bucketName)
        Delete the Bos bucket trash.
        参数:
        bucketName - The name of an existing bucket, to which you have permission
      • deleteBucketTrash

        public void deleteBucketTrash​(DeleteBucketTrashRequest request)
        Delete the Bos bucket trash.
        参数:
        request - The DeleteBucketTrashRequest you create
      • renameObject

        public RenameObjectResponse renameObject​(String bucketName,
                                                 String sourceKey,
                                                 String destinationKey)
        renameObject support rename one object key to another
        参数:
        bucketName - The name of an existing bucket, to which you have Write permission.
        sourceKey - The origin key of object
        destinationKey - The destination key of object
        返回:
        An RenameObjectResponse containing the information returned by Bos for rename operation
      • renameObject

        public RenameObjectResponse renameObject​(RenameObjectRequest request)
        renameObject support rename one object key to another. The ARenameObjectRequest contains all the details of the request, including the source key and destination key
        参数:
        request - The request object containing all the parameters to rename object
        返回:
        An RenameObjectResponse object containing the information returned by Bos for for rename operation