pub struct UpdateBucketBuilder { /* private fields */ }Expand description
A builder to create an UpdateBucket request.
Implementations§
Source§impl UpdateBucketBuilder
impl UpdateBucketBuilder
Sourcepub fn bucket_id(self, bucket_id: impl Into<String>) -> Self
pub fn bucket_id(self, bucket_id: impl Into<String>) -> Self
The ID of the bucket to update.
This is required.
Sourcepub fn bucket_type(self, typ: BucketType) -> Result<Self, ValidationError>
pub fn bucket_type(self, typ: BucketType) -> Result<Self, ValidationError>
Change the bucket’s type to the one provided.
Sourcepub fn bucket_info(self, info: Value) -> Self
pub fn bucket_info(self, info: Value) -> Self
Replace the current bucket information with the specified information.
This can contain arbitrary metadata for your own use. You can also set
cache-control settings from here (but see
cache_control). If Cache-Control is set here and
via the cache-control method, the latter will override this value.
Sourcepub fn cache_control(self, cache_control: CacheControl) -> Self
pub fn cache_control(self, cache_control: CacheControl) -> Self
Set the default Cache-Control header value for files downloaded from the bucket.
Sourcepub fn cors_rules(
self,
rules: impl Into<Vec<CorsRule>>,
) -> Result<Self, ValidationError>
pub fn cors_rules( self, rules: impl Into<Vec<CorsRule>>, ) -> Result<Self, ValidationError>
Replace the bucket’s current provided CORS rules with the provided rules.
See https://www.backblaze.com/b2/docs/cors_rules.html for further information.
Sourcepub fn retention_policy(self, policy: FileRetentionPolicy) -> Self
pub fn retention_policy(self, policy: FileRetentionPolicy) -> Self
Replace the bucket’s default retention policy.
The Authorization must have Capability::WriteBucketRetentions.
Sourcepub fn encryption_settings(self, settings: ServerSideEncryption) -> Self
pub fn encryption_settings(self, settings: ServerSideEncryption) -> Self
Replace the bucket’s server-side encryption settings.
The Authorization must have Capability::WriteBucketEncryption.
Sourcepub fn lifecycle_rules(
self,
rules: impl Into<Vec<LifecycleRule>>,
) -> Result<Self, LifecycleRuleValidationError>
pub fn lifecycle_rules( self, rules: impl Into<Vec<LifecycleRule>>, ) -> Result<Self, LifecycleRuleValidationError>
Replace the bucket’s lifecycle rules with the provided list.
See the documentation for CreateBucketBuilder::lifecycle_rules for the lifecycle requirements and examples.
Sourcepub fn if_revision_is(self, revision: u16) -> Self
pub fn if_revision_is(self, revision: u16) -> Self
Only perform the update if the bucket’s current revision is the provided version.