Google Associate Cloud Engineer Question 238
Select 2Google Cloud PlatformYou are tasked with setting up an object lifecycle management policy for a Cloud Storage bucket in your company's Google Cloud Platform project. The requirement is to delete objects that are older than 365 days and to change the storage class of objects that haven't been accessed for 90 days to Coldline storage. How can you achieve this?
- A
Create a lifecycle rule with the Age condition set to 365 days to delete objects.
- B
Create a lifecycle rule with the Age condition set to 90 days and the Action set to change storage class to Coldline.
- C
Create a lifecycle rule with the Noncurrent Time condition set to 365 days to delete objects.
- D
Create a lifecycle rule with the Days Since Custom Time condition set to 90 days to change storage class to Coldline.
Show answer and explanation
Correct answers: A, B
Explanation
To meet the requirements of the scenario, you need to set up two lifecycle rules: one to delete objects older than 365 days using the Age condition, and another to change the storage class of objects that haven't been accessed for 90 days to Coldline using the Age condition with a storage class change action.
- A. Correct.
This option is correct because setting the Age condition to 365 days will delete objects that are older than 365 days.
- B. Correct.
This option is correct because setting the Age condition to 90 days along with an action to change storage class will move objects to Coldline storage if they haven't been accessed for 90 days.
- C. Incorrect.
This option is incorrect because the Noncurrent Time condition is used for versioned objects that are noncurrent, which is not specified in the scenario.
- D. Incorrect.
This option is incorrect because the Days Since Custom Time condition is used for specific custom time conditions and is unrelated to the access time or direct age of the object.