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 for Google Cloud Storage, which allows for the configuration of automated actions on objects based on their lifecycle."],["The `LifecycleRule` class supports various actions like deleting objects, aborting incomplete multipart uploads, and changing storage classes to Standard, Multi-Regional, Regional, Nearline, Coldline, Durable Reduced Availability, or Archive."],["The `LifecycleRule` class allows specifying conditions based on parameters such as an objects maximum age, creation date, live status, storage class, number of newer versions, days since noncurrent time or custom time, and the ability to match prefixes and suffixes of objects."],["Multiple `LifecycleRule` conditions can be combined using the `ConditionConjunction` method, which enforces that all specified conditions must be met for the rule to apply."],["The document provides a list of available versions, with the latest being 2.37.0-rc and also includes all the parameters, returns, exceptions, and description of the class's constructors and functions."]]],[]]