pub struct Storage {
pub id: String,
pub public_read: bool,
pub versioning: bool,
pub lifecycle_rules: Vec<LifecycleRule>,
pub cors_allowed_origins: Vec<String>,
pub encryption_key: Option<ResourceRef>,
}Expand description
Represents an object storage bucket.
Fields§
§id: StringName of the the storage bucket. For names with dots, each dot-separated label must be ≤ 63 characters.
public_read: boolAllows public read access to objects without authentication.
Default: false
versioning: boolEnables object versioning.
Default: false
lifecycle_rules: Vec<LifecycleRule>List of rules for automatic object management (e.g., expiration).
Default: [] (empty list)
cors_allowed_origins: Vec<String>Browser origins allowed to read objects through signed URLs.
When non-empty, providers configure CORS for GET and HEAD requests.
An origin of * is appropriate for private buckets whose signed URLs
are bearer credentials and do not use browser cookies.
Default: [] (CORS disabled).
encryption_key: Option<ResourceRef>Customer-managed Key used by the provider’s native storage encryption.
Implementations§
Source§impl Storage
impl Storage
Sourcepub fn new(id: String) -> StorageBuilder
pub fn new(id: String) -> StorageBuilder
Create an instance of Storage using the builder syntax
Source§impl Storage
impl Storage
Sourcepub const RESOURCE_TYPE: ResourceType
pub const RESOURCE_TYPE: ResourceType
The resource type identifier for Storage
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Storage
impl<'de> Deserialize<'de> for Storage
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>,
impl Eq for Storage
Source§impl ResourceDefinition for Storage
impl ResourceDefinition for Storage
Source§fn get_resource_type(&self) -> ResourceType
fn get_resource_type(&self) -> ResourceType
Source§fn get_dependencies(&self) -> Vec<ResourceRef>
fn get_dependencies(&self) -> Vec<ResourceRef>
Source§fn validate_update(&self, new_config: &dyn ResourceDefinition) -> Result<()>
fn validate_update(&self, new_config: &dyn ResourceDefinition) -> Result<()>
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn box_clone(&self) -> Box<dyn ResourceDefinition>
fn box_clone(&self) -> Box<dyn ResourceDefinition>
Source§fn resource_eq(&self, other: &dyn ResourceDefinition) -> bool
fn resource_eq(&self, other: &dyn ResourceDefinition) -> bool
Source§fn to_json_value(&self) -> Result<Value>
fn to_json_value(&self) -> Result<Value>
impl StructuralPartialEq for Storage
Auto Trait Implementations§
impl Freeze for Storage
impl RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnsafeUnpin for Storage
impl UnwindSafe for Storage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.