Combines multiple LifecycleRule conditions using conjunction.
Create a condition that require all the condition parameters to be met to take effect.
Example
// Affect objects that are in the STANDARD storage class, have at
// least 2 new versions, are at least 7 days old, and are alive.
LifecycleRuleCondition condition = LifecycleRule::ConditionConjunction(
LifecycleRule::NumNewerVersions(2),
LifecycleRule::MatchesStorageClassStandard(),
LifecycleRule::MaxAge(7), LifecycleRule::IsLive(true));
Parameters
Name
Description
condition
Condition &&...
typename...
Exceptions
Type
Description
std::invalid_argument
if the list of parameters is contradictory, for example, `IsLive(true)` and `IsLive(false)` are in the `condition` list.
Returns
Type
Description
LifecycleRuleCondition
a LifecycleRuleCondition that is satisfied when all the condition conditions are satisfied.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["This document outlines the `LifecycleRule` class, which is used to manage Object Lifecycle Rules in Google Cloud Storage, allowing for automatic deletion or storage class changes based on lifecycle events."],["The `LifecycleRule` class has constructors that allow for the creation of rules by defining a `LifecycleRuleCondition` and a `LifecycleRuleAction`, controlling when a rule is triggered and what action it will take."],["A variety of static methods are available to create both actions, such as `Delete()` or `SetStorageClassStandard()`, and conditions, such as `MaxAge()` or `IsLive()`, for defining the lifecycle rules."],["The `ConditionConjunction` static method enables the combination of multiple `LifecycleRule` conditions, requiring all conditions to be met for the associated action to take effect, providing advanced customization of lifecycle rules."],["A comprehensive list of available versions of the `LifecycleRule` class, starting from version 2.11.0 and going all the way up to the latest, 2.37.0-rc, is readily available for developers to access."]]],[]]