Google Associate Cloud Engineer Question 236
Select 2Google Cloud PlatformAs a Google Cloud Engineer, you are tasked with setting up a lifecycle management policy for a Cloud Storage bucket. The policy needs to automatically delete objects that are older than 365 days and transition objects to Coldline storage class if they haven't been accessed for 30 days. Which of the following actions should you take to correctly configure this policy?
- A
Create a lifecycle rule with an action to delete objects with a 'Matches Age' condition set to 365 days.
- B
Create a lifecycle rule with an action to change storage class to Coldline with a 'Matches Age' condition set to 30 days.
- C
Create a lifecycle rule with an action to change storage class to Coldline with a 'Matches Storage Class' condition set to Standard.
- D
Create a lifecycle rule with an action to delete objects with a 'Matches Storage Class' condition set to Archive.
- E
Create a lifecycle rule with an action to change storage class to Coldline with a 'Matches CreatedBefore' condition set to 30 days ago.
Show answer and explanation
Correct answers: A, C
Explanation
To fulfill the requirements, you need to configure a lifecycle rule that deletes objects older than 365 days and transitions objects to Coldline storage after 30 days of no access. The correct rules involve setting an age-based condition for deletion and a storage class change condition for transitioning objects based on the current storage class.
- A. Correct.
This option correctly sets up a condition to delete objects older than 365 days.
- B. Incorrect.
This option incorrectly uses 'Matches Age' for transitioning to Coldline. Access conditions should be used instead.
- C. Correct.
This option correctly sets up a rule to transition objects from Standard to Coldline, which aligns with the scenario requirements.
- D. Incorrect.
This option is irrelevant to the scenario as it deals with deleting objects in the Archive class, not based on age.
- E. Incorrect.
This option incorrectly uses 'CreatedBefore' for transitioning to Coldline, while the requirement is based on last access time.