pub struct ClientBuilder { /* private fields */ }Implementations§
Source§impl ClientBuilder
impl ClientBuilder
pub fn new() -> Self
Sourcepub fn public_endpoint<T: AsRef<str>>(self, public_endpoint: T) -> Self
pub fn public_endpoint<T: AsRef<str>>(self, public_endpoint: T) -> Self
Set the public OSS endpoint URL (optional, defaults to endpoint if not set)
Sourcepub fn access_key_id<T: AsRef<str>>(self, access_key_id: T) -> Self
pub fn access_key_id<T: AsRef<str>>(self, access_key_id: T) -> Self
Set the access key ID for authentication.
When combined with Self::access_key_secret (and optionally
Self::security_token) this installs a
StaticCredentialsProvider. For dynamic credentials (RRSA, ECS RAM
role, …) use Self::credentials_provider instead.
Sourcepub fn access_key_secret<T: AsRef<str>>(self, access_key_secret: T) -> Self
pub fn access_key_secret<T: AsRef<str>>(self, access_key_secret: T) -> Self
Set the access key secret for authentication. See
Self::access_key_id.
Sourcepub fn security_token<T: AsRef<str>>(self, security_token: T) -> Self
pub fn security_token<T: AsRef<str>>(self, security_token: T) -> Self
Set the security token (optional, for temporary STS credentials supplied out-of-band).
Sourcepub fn credentials_provider<P>(self, provider: P) -> Selfwhere
P: CredentialsProvider + 'static,
pub fn credentials_provider<P>(self, provider: P) -> Selfwhere
P: CredentialsProvider + 'static,
Use a custom CredentialsProvider. This takes precedence over
Self::access_key_id / Self::access_key_secret /
Self::security_token.
For RRSA (RAM Roles for Service Accounts) pass an instance of
credentials::RrsaCredentialsProvider; for a zero-config setup that
also reads credentials from environment variables use
credentials::DefaultCredentialsChain.
Sourcepub fn http_timeout(self, timeout: Duration) -> Self
pub fn http_timeout(self, timeout: Duration) -> Self
Set the HTTP timeout for requests
Sourcepub fn default_headers(self, headers: HeaderMap) -> Self
pub fn default_headers(self, headers: HeaderMap) -> Self
Set default headers to be sent with each request
Sourcepub fn url_style(self, style: UrlStyle) -> Self
pub fn url_style(self, style: UrlStyle) -> Self
Set the URL style for requests that use internal endpoint
Sourcepub fn public_url_style(self, style: UrlStyle) -> Self
pub fn public_url_style(self, style: UrlStyle) -> Self
Set the URL style for requests that use public endpoint