pub struct BucketLifecycleRuleCondition {
    pub age: Option<i32>,
    pub created_before: Option<NaiveDate>,
    pub custom_time_before: Option<NaiveDate>,
    pub days_since_custom_time: Option<i32>,
    pub days_since_noncurrent_time: Option<i32>,
    pub is_live: Option<bool>,
    pub matches_pattern: Option<String>,
    pub matches_prefix: Option<Vec<String>>,
    pub matches_storage_class: Option<Vec<String>>,
    pub matches_suffix: Option<Vec<String>>,
    pub noncurrent_time_before: Option<NaiveDate>,
    pub num_newer_versions: Option<i32>,
}
Expand description

The condition(s) under which the action will be taken.

This type is not used in any activity, and only used as part of another schema.

Fields§

§age: Option<i32>

Age of an object (in days). This condition is satisfied when an object reaches the specified age.

§created_before: Option<NaiveDate>

A date in RFC 3339 format with only the date part (for instance, “2013-01-15”). This condition is satisfied when an object is created before midnight of the specified date in UTC.

§custom_time_before: Option<NaiveDate>

A date in RFC 3339 format with only the date part (for instance, “2013-01-15”). This condition is satisfied when the custom time on an object is before this date in UTC.

§days_since_custom_time: Option<i32>

Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply.

§days_since_noncurrent_time: Option<i32>

Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it’s zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.

§is_live: Option<bool>

Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.

§matches_pattern: Option<String>

A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the “Early Access” launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released.

§matches_prefix: Option<Vec<String>>

List of object name prefixes. This condition will be satisfied when at least one of the prefixes exactly matches the beginning of the object name.

§matches_storage_class: Option<Vec<String>>

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

§matches_suffix: Option<Vec<String>>

List of object name suffixes. This condition will be satisfied when at least one of the suffixes exactly matches the end of the object name.

§noncurrent_time_before: Option<NaiveDate>

A date in RFC 3339 format with only the date part (for instance, “2013-01-15”). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects.

§num_newer_versions: Option<i32>

Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.

Trait Implementations§

source§

impl Clone for BucketLifecycleRuleCondition

source§

fn clone(&self) -> BucketLifecycleRuleCondition

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BucketLifecycleRuleCondition

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BucketLifecycleRuleCondition

source§

fn default() -> BucketLifecycleRuleCondition

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BucketLifecycleRuleCondition

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for BucketLifecycleRuleCondition

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl NestedType for BucketLifecycleRuleCondition

source§

impl Part for BucketLifecycleRuleCondition

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,