0
0
GCPcloud~20 mins

Lifecycle management rules in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Lifecycle Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Understanding GCS Lifecycle Rule Effect

You have a Google Cloud Storage bucket with this lifecycle rule:

{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 30}}]}

What happens to objects in this bucket?

AObjects older than 30 days are automatically deleted.
BObjects are archived to Nearline storage after 30 days.
CObjects are encrypted after 30 days.
DObjects are made publicly readable after 30 days.
Attempts:
2 left
💡 Hint

Think about what the 'Delete' action means in lifecycle rules.

Configuration
intermediate
2:00remaining
Correct Lifecycle Rule to Archive Objects

Which lifecycle rule configuration archives objects to Coldline storage after 60 days?

A{"rule": [{"action": {"type": "SetStorageClass", "storageClass": "NEARLINE"}, "condition": {"age": 60}}]}
B{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 60}}]}
C{"rule": [{"action": {"type": "SetStorageClass", "storageClass": "COLDLINE"}, "condition": {"age": 60}}]}
D{"rule": [{"action": {"type": "SetStorageClass", "storageClass": "ARCHIVE"}, "condition": {"age": 30}}]}
Attempts:
2 left
💡 Hint

Look for the action type that changes storage class and the correct target class.

Architecture
advanced
2:30remaining
Designing Lifecycle Rules for Cost Optimization

You want to design lifecycle rules for a bucket storing logs. Logs should be stored in Standard storage for 7 days, then moved to Nearline for 30 days, then to Coldline for 90 days, and finally deleted after 365 days. Which lifecycle rule set achieves this?

A[{"action": {"type": "SetStorageClass", "storageClass": "NEARLINE"}, "condition": {"age": 7}}, {"action": {"type": "SetStorageClass", "storageClass": "COLDLINE"}, "condition": {"age": 37}}, {"action": {"type": "Delete"}, "condition": {"age": 365}}]
B[{"action": {"type": "SetStorageClass", "storageClass": "NEARLINE"}, "condition": {"age": 7}}, {"action": {"type": "SetStorageClass", "storageClass": "COLDLINE"}, "condition": {"age": 37}}, {"action": {"type": "Delete"}, "condition": {"age": 90}}]
C[{"action": {"type": "SetStorageClass", "storageClass": "NEARLINE"}, "condition": {"age": 7}}, {"action": {"type": "SetStorageClass", "storageClass": "COLDLINE"}, "condition": {"age": 97}}, {"action": {"type": "Delete"}, "condition": {"age": 365}}]
D]}}563 :"ega"{ :"noitidnoc" ,}"eteleD" :"epyt"{ :"noitca"{ ,}}73 :"ega"{ :"noitidnoc" ,}"ENILDLOC" :"ssalCegarots" ,"ssalCegarotSteS" :"epyt"{ :"noitca"{ ,}}7 :"ega"{ :"noitidnoc" ,}"ENILRAEN" :"ssalCegarots" ,"ssalCegarotSteS" :"epyt"{ :"noitca"{[
Attempts:
2 left
💡 Hint

Calculate cumulative days for each storage class transition.

security
advanced
2:00remaining
Lifecycle Rule Impact on Object Versioning

A bucket has object versioning enabled. It has this lifecycle rule:

{"rule": [{"action": {"type": "Delete"}, "condition": {"isLive": false, "age": 30}}]}

What happens to noncurrent object versions?

AAll object versions are deleted after 30 days.
BNo versions are deleted because versioning is enabled.
COnly live versions older than 30 days are deleted.
DNoncurrent versions older than 30 days are deleted automatically.
Attempts:
2 left
💡 Hint

Check the condition 'isLive': false and what it means.

Best Practice
expert
3:00remaining
Choosing Lifecycle Rules for Compliance and Cost

Your company must retain data for 7 years for compliance. Data should be stored cost-effectively after 1 year. Which lifecycle rule strategy meets compliance and cost goals?

ASet lifecycle rule to delete objects after 1 year and transition to Coldline storage after 7 years.
BSet lifecycle rule to delete objects after 7 years and transition to Coldline storage after 1 year.
CSet lifecycle rule to delete objects after 7 years and transition to Nearline storage after 7 years.
DSet lifecycle rule to delete objects after 7 years and transition to Archive storage after 1 year.
Attempts:
2 left
💡 Hint

Think about when to move data to cheaper storage and when to delete it.