Google Associate Cloud Engineer Question 235
Select 2Google Cloud PlatformAs a Google Cloud Associate Cloud Engineer, you have been tasked with setting up a lifecycle management policy for a Cloud Storage bucket that stores log files. The logs need to be archived to Coldline storage after 30 days, and deleted after 365 days. Which of the following steps would you take to achieve this?
- A
Create a lifecycle rule to change the storage class of objects to Coldline after 30 days.
- B
Create a lifecycle rule to delete objects after 365 days.
- C
Set the default storage class of the bucket to Coldline.
- D
Create a lifecycle rule to delete objects after 30 days.
- E
Create a lifecycle rule to change the storage class of objects to Nearline after 30 days.
Show answer and explanation
Correct answers: A, B
Explanation
To manage the lifecycle of objects in a Cloud Storage bucket according to specific requirements, you need to create lifecycle rules that automate the transition of objects between storage classes and their eventual deletion. In this scenario, the correct approach involves setting a rule to change the storage class to Coldline after 30 days for cost-effective archiving and another rule to delete the objects after 365 days to manage storage costs and data retention policies.
- A. Correct.
This option correctly sets a rule to change the storage class to Coldline after 30 days, matching the requirement to archive logs.
- B. Correct.
This option correctly sets a rule to delete objects after 365 days, fulfilling the requirement to delete logs after one year.
- C. Incorrect.
Setting the default storage class affects new objects, not existing ones, and does not address the archival requirement after 30 days.
- D. Incorrect.
This option incorrectly suggests deleting objects after 30 days, which does not meet the requirement to archive logs after 30 days.
- E. Incorrect.
This option incorrectly suggests changing the storage class to Nearline, whereas the requirement is to change it to Coldline.