
Answer-first summary for fast verification
Answer: Transition objects to Coldline Storage after 365 days if they are in the Multi-regional storage class. The first rule has no effect on the bucket.
The correct answer is D. The first rule is designed to delete any object that is older than 30 days and is not the latest version (not live). However, since the bucket does not have versioning enabled, this rule has no effect. The second rule changes the storage class of live objects from Multi-regional to Coldline for objects older than 365 days. Refer to the GCP documentation on [Object Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more details. The conditions supported for a lifecycle rule include: - **Age**: The condition is met when an object reaches a specified age in days, measured from its creation time. - **IsLive**: If set to `true`, the condition matches only live objects; if `false`, it matches only archived objects. Objects in non-versioned buckets are always considered live. - **MatchesStorageClass**: The condition is met when an object is stored in the specified storage class. For Multi-Regional or Regional Storage objects, include `STANDARD` and `DURABLE_REDUCED_AVAILABILITY` in the condition to cover all objects of similar storage class. **Why not the others?** - Option A is incorrect because the first rule does not archive objects but deletes archived objects, and it has no impact on a versioning-disabled bucket. - Option B is incorrect because the first rule does not delete live objects, only archived ones. - Option C is incorrect because the first rule has no effect on a versioning-disabled bucket.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A SysOps admin has set up a lifecycle rule on a multi-regional bucket with object versioning disabled. What will be the effect of the following lifecycle configuration?
{
"rule": [
{
"action": {"type": "Delete"},
"condition": {"age": 30, "isLive": false}
},
{
"action": {"type": "SetStorageClass", "storageClass": "COLDLINE"},
"condition": {"age": 365, "matchesStorageClass": "MULTI_REGIONAL"}
}
]
}
{
"rule": [
{
"action": {"type": "Delete"},
"condition": {"age": 30, "isLive": false}
},
{
"action": {"type": "SetStorageClass", "storageClass": "COLDLINE"},
"condition": {"age": 365, "matchesStorageClass": "MULTI_REGIONAL"}
}
]
}
A
Archive objects older than 30 days and transition objects to Coldline Storage after 365 days if they are in the Multi-regional storage class.
B
Remove objects older than 30 days and transition objects to Coldline Storage after 365 days if they are in the Multi-regional storage class.
C
Delete archived objects older than 30 days and transition objects to Coldline Storage after 365 days if they are in the Multi-regional storage class.
D
Transition objects to Coldline Storage after 365 days if they are in the Multi-regional storage class. The first rule has no effect on the bucket.
No comments yet.