pub struct OssClient { /* private fields */ }Expand description
Entry point for OSS, implementing APIs to query available regions and list buckets
Implementations§
Source§impl OssClient
impl OssClient
Sourcepub fn new(ak_id: &str, ak_secret: &str) -> Self
pub fn new(ak_id: &str, ak_secret: &str) -> Self
Initialize an OssClient for subsequent use
- ak_id: Alibaba Cloud AccessKey ID
- ak_secret: Alibaba Cloud AccessKey Secret
Sourcepub fn disable_https(self) -> Self
pub fn disable_https(self) -> Self
Disable HTTPS
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 the security token in place for reuse
Sourcepub fn describe_regions(&self) -> DescribeRegions
pub fn describe_regions(&self) -> DescribeRegions
Query the endpoint information of all regions
Sourcepub fn list_buckets(&self) -> ListBuckets
pub fn list_buckets(&self) -> ListBuckets
List all created buckets
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OssClient
impl RefUnwindSafe for OssClient
impl Send for OssClient
impl Sync for OssClient
impl Unpin for OssClient
impl UnwindSafe for OssClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more