pub struct S3Config {Show 17 fields
pub endpoint: Option<String>,
pub access_key_id: Option<String>,
pub secret_access_key: Option<String>,
pub session_token: Option<String>,
pub region: Option<String>,
pub enable_virtual_host_style: bool,
pub server_side_encryption: Option<String>,
pub server_side_encryption_aws_kms_key_id: Option<String>,
pub server_side_encryption_customer_algorithm: Option<String>,
pub server_side_encryption_customer_key: Option<String>,
pub server_side_encryption_customer_key_md5: Option<String>,
pub role_arn: Option<String>,
pub external_id: Option<String>,
pub role_session_name: Option<String>,
pub allow_anonymous: bool,
pub disable_ec2_metadata: bool,
pub disable_config_load: bool,
}Expand description
Amazon S3 storage configuration.
This struct contains all the configuration options for connecting to Amazon S3.
Use the builder pattern via S3Config::builder() to construct instances.
Fields§
§endpoint: Option<String>S3 endpoint URL.
access_key_id: Option<String>S3 access key ID.
secret_access_key: Option<String>S3 secret access key.
session_token: Option<String>S3 session token.
region: Option<String>S3 region.
enable_virtual_host_style: boolEnable virtual host style (opposite of path style access).
server_side_encryption: Option<String>Server side encryption type.
server_side_encryption_aws_kms_key_id: Option<String>Server side encryption AWS KMS key ID.
server_side_encryption_customer_algorithm: Option<String>Server side encryption customer algorithm.
server_side_encryption_customer_key: Option<String>Server side encryption customer key.
server_side_encryption_customer_key_md5: Option<String>Server side encryption customer key MD5.
role_arn: Option<String>Role ARN for assuming a role.
external_id: Option<String>External ID for assuming a role.
role_session_name: Option<String>Session name for assuming a role.
allow_anonymous: boolAllow anonymous access.
disable_ec2_metadata: boolDisable EC2 metadata.
disable_config_load: boolDisable config load.
Implementations§
Source§impl S3Config
impl S3Config
Sourcepub fn builder() -> S3ConfigBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> S3ConfigBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building S3Config.
On the builder, call .endpoint(...)(optional), .access_key_id(...)(optional), .secret_access_key(...)(optional), .session_token(...)(optional), .region(...)(optional), .enable_virtual_host_style(...)(optional), .server_side_encryption(...)(optional), .server_side_encryption_aws_kms_key_id(...)(optional), .server_side_encryption_customer_algorithm(...)(optional), .server_side_encryption_customer_key(...)(optional), .server_side_encryption_customer_key_md5(...)(optional), .role_arn(...)(optional), .external_id(...)(optional), .role_session_name(...)(optional), .allow_anonymous(...)(optional), .disable_ec2_metadata(...)(optional), .disable_config_load(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of S3Config.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for S3Config
impl<'de> Deserialize<'de> for S3Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl TryFrom<&StorageConfig> for S3Config
impl TryFrom<&StorageConfig> for S3Config
impl Eq for S3Config
impl StructuralPartialEq for S3Config
Auto Trait Implementations§
impl Freeze for S3Config
impl RefUnwindSafe for S3Config
impl Send for S3Config
impl Sync for S3Config
impl Unpin for S3Config
impl UnwindSafe for S3Config
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more