Your security team asks you to configure a lifecycle rule for a Cloud Storage bucket that receives thousands of objects every day under the path prefix "logs/". Compliance requires that these log objects be removed automatically 30 days after they are created, while any other objects stored in the bucket must remain untouched. Which lifecycle configuration will satisfy this requirement?
Create a lifecycle rule with action Delete and condition: age = 30, matchesStorageClass = ["STANDARD"]
Create two lifecycle rules: (1) SetStorageClass to Nearline at age 30; (2) Delete at age 365 for all objects
Enable Object Versioning and add a lifecycle rule that deletes noncurrent object versions after 30 days
Create a lifecycle rule with action Delete and condition: age = 30, matchesPrefix = ["logs/"]
A lifecycle rule that specifies a Delete action with an Age condition of 30 days and restricts the rule to objects whose name starts with the "logs/" prefix meets the requirement. The Age condition ensures objects are eligible for deletion 30 days after creation, and the matchesPrefix filter limits the rule's scope so only log objects are affected. A rule that filters on storage class would delete any Standard-class object, regardless of name. Using SetStorageClass plus a later Delete action does not meet the 30-day deletion mandate. Object Versioning with a noncurrent-version rule only applies to older versions of objects and would not automatically delete the current live objects after 30 days.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a lifecycle rule in Google Cloud Storage?
Open an interactive chat with Bash
How does the matchesPrefix condition work in lifecycle rules?
Open an interactive chat with Bash
What is the difference between SetStorageClass and Delete actions in lifecycle rules?
Open an interactive chat with Bash
What is a lifecycle rule in Cloud Storage?
Open an interactive chat with Bash
What is the purpose of the `matchesPrefix` condition in a lifecycle rule?
Open an interactive chat with Bash
How does the `age` condition work in a lifecycle rule?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .