pub struct OssBucket { /* private fields */ }Expand description
OSS bucket implementing APIs for creating buckets, retrieving bucket information, listing objects, and more
Implementations§
Source§impl OssBucket
impl OssBucket
Sourcepub fn with_security_token(self, token: impl Into<String>) -> Self
pub fn with_security_token(self, token: impl Into<String>) -> Self
Attach a temporary security token for STS authentication
Sourcepub fn set_security_token(&mut self, token: impl Into<String>)
pub fn set_security_token(&mut self, token: impl Into<String>)
Update security token without consuming the bucket
Sourcepub fn set_custom_domain(
self,
custom_domain: impl ToString,
enable_https: bool,
) -> Self
pub fn set_custom_domain( self, custom_domain: impl ToString, enable_https: bool, ) -> Self
Set a custom domain
Sourcepub fn put_bucket(&self) -> PutBucket
pub fn put_bucket(&self) -> PutBucket
Create a bucket
Sourcepub fn del_bucket(&self) -> DelBucket
pub fn del_bucket(&self) -> DelBucket
Delete a bucket
Sourcepub fn list_objects(&self) -> ListObjects
pub fn list_objects(&self) -> ListObjects
List all objects in the bucket
Sourcepub fn get_bucket_info(&self) -> GetBucketInfo
pub fn get_bucket_info(&self) -> GetBucketInfo
Retrieve detailed information of the bucket
Sourcepub fn get_bucket_stat(&self) -> GetBucketStat
pub fn get_bucket_stat(&self) -> GetBucketStat
Retrieve the bucket’s storage size and file count
Sourcepub fn get_bucket_lifecycle(&self) -> GetBucketLifecycle
pub fn get_bucket_lifecycle(&self) -> GetBucketLifecycle
Retrieve the lifecycle rules configured on the bucket
Sourcepub fn put_bucket_lifecycle(&self) -> PutBucketLifecycle
pub fn put_bucket_lifecycle(&self) -> PutBucketLifecycle
Configure lifecycle rules for the bucket
Sourcepub fn del_bucket_lifecycle(&self) -> DelBucketLifecycle
pub fn del_bucket_lifecycle(&self) -> DelBucketLifecycle
Delete all lifecycle rules for the bucket
Sourcepub fn get_bucket_location(&self) -> GetBucketLocation
pub fn get_bucket_location(&self) -> GetBucketLocation
Retrieve the bucket location
Sourcepub fn get_bucket_acl(&self) -> GetBucketAcl
pub fn get_bucket_acl(&self) -> GetBucketAcl
Get the bucket access control
Sourcepub fn put_bucket_acl(&self) -> PutBucketAcl
pub fn put_bucket_acl(&self) -> PutBucketAcl
Set the bucket access control
Sourcepub fn get_bucket_referer(&self) -> GetBucketReferer
pub fn get_bucket_referer(&self) -> GetBucketReferer
Retrieve the referer configuration
Sourcepub fn put_bucket_referer(&self) -> PutBucketReferer
pub fn put_bucket_referer(&self) -> PutBucketReferer
Configure the referer whitelist
Sourcepub fn del_bucket_referer(&self) -> DelBucketReferer
pub fn del_bucket_referer(&self) -> DelBucketReferer
Delete the referer configuration
Sourcepub fn get_bucket_policy(&self) -> GetBucketPolicy
pub fn get_bucket_policy(&self) -> GetBucketPolicy
Retrieve the bucket policy
Sourcepub fn put_bucket_policy(&self) -> PutBucketPolicy
pub fn put_bucket_policy(&self) -> PutBucketPolicy
Configure the bucket policy
Sourcepub fn del_bucket_policy(&self) -> DelBucketPolicy
pub fn del_bucket_policy(&self) -> DelBucketPolicy
Delete the bucket policy
Sourcepub fn get_bucket_encryption(&self) -> GetBucketEncryption
pub fn get_bucket_encryption(&self) -> GetBucketEncryption
Retrieve the bucket encryption configuration
Sourcepub fn put_bucket_encryption(&self) -> PutBucketEncryption
pub fn put_bucket_encryption(&self) -> PutBucketEncryption
Configure default bucket encryption
Sourcepub fn del_bucket_encryption(&self) -> DelBucketEncryption
pub fn del_bucket_encryption(&self) -> DelBucketEncryption
Delete the bucket encryption configuration
Sourcepub fn initiate_bucket_worm(&self) -> InitiateBucketWorm
pub fn initiate_bucket_worm(&self) -> InitiateBucketWorm
Initiate a WORM retention configuration
Sourcepub fn get_bucket_worm(&self) -> GetBucketWorm
pub fn get_bucket_worm(&self) -> GetBucketWorm
Retrieve the WORM configuration
Sourcepub fn complete_bucket_worm(&self, worm_id: impl ToString) -> CompleteBucketWorm
pub fn complete_bucket_worm(&self, worm_id: impl ToString) -> CompleteBucketWorm
Complete a WORM configuration
Sourcepub fn extend_bucket_worm(&self, worm_id: impl ToString) -> ExtendBucketWorm
pub fn extend_bucket_worm(&self, worm_id: impl ToString) -> ExtendBucketWorm
Extend a WORM configuration
Sourcepub fn abort_bucket_worm(&self, worm_id: impl ToString) -> AbortBucketWorm
pub fn abort_bucket_worm(&self, worm_id: impl ToString) -> AbortBucketWorm
Abort a WORM configuration
Sourcepub fn put_bucket_inventory(
&self,
inventory_id: impl ToString,
) -> PutBucketInventory
pub fn put_bucket_inventory( &self, inventory_id: impl ToString, ) -> PutBucketInventory
Configure an inventory task
Sourcepub fn get_bucket_inventory(
&self,
inventory_id: impl ToString,
) -> GetBucketInventory
pub fn get_bucket_inventory( &self, inventory_id: impl ToString, ) -> GetBucketInventory
Retrieve an inventory task configuration
Sourcepub fn del_bucket_inventory(
&self,
inventory_id: impl ToString,
) -> DelBucketInventory
pub fn del_bucket_inventory( &self, inventory_id: impl ToString, ) -> DelBucketInventory
Delete an inventory task configuration
Sourcepub fn list_bucket_inventory(&self) -> ListBucketInventory
pub fn list_bucket_inventory(&self) -> ListBucketInventory
List inventory task configurations
Sourcepub fn get_bucket_website(&self) -> GetBucketWebsite
pub fn get_bucket_website(&self) -> GetBucketWebsite
Retrieve the static website configuration
Sourcepub fn put_bucket_website(&self) -> PutBucketWebsite
pub fn put_bucket_website(&self) -> PutBucketWebsite
Configure the static website behavior
Sourcepub fn del_bucket_website(&self) -> DelBucketWebsite
pub fn del_bucket_website(&self) -> DelBucketWebsite
Delete the static website configuration
Sourcepub fn get_bucket_cors(&self) -> GetBucketCors
pub fn get_bucket_cors(&self) -> GetBucketCors
Retrieve the CORS rules configured on the bucket
Sourcepub fn put_bucket_cors(&self) -> PutBucketCors
pub fn put_bucket_cors(&self) -> PutBucketCors
Replace the CORS rules configured on the bucket
Sourcepub fn del_bucket_cors(&self) -> DelBucketCors
pub fn del_bucket_cors(&self) -> DelBucketCors
Delete all CORS rules configured on the bucket
Sourcepub fn get_bucket_logging(&self) -> GetBucketLogging
pub fn get_bucket_logging(&self) -> GetBucketLogging
Get the bucket logging configuration
Sourcepub fn put_bucket_logging(
&self,
target_bucket: impl ToString,
target_prefix: impl ToString,
) -> PutBucketLogging
pub fn put_bucket_logging( &self, target_bucket: impl ToString, target_prefix: impl ToString, ) -> PutBucketLogging
Configure the bucket logging
Sourcepub fn del_bucket_logging(&self) -> DelBucketLogging
pub fn del_bucket_logging(&self) -> DelBucketLogging
Delete the bucket logging configuration
Sourcepub fn del_objects(&self, files: Vec<impl ToString>) -> DelObjects
pub fn del_objects(&self, files: Vec<impl ToString>) -> DelObjects
Delete multiple objects
Sourcepub fn multipart_list_uploads(&self) -> ListUploads
pub fn multipart_list_uploads(&self) -> ListUploads
List multipart uploads that have been initiated but not completed