Google Professional Cloud Security Engineer Question 348
Select 2Google Cloud PlatformYour organization has a Google Cloud Storage bucket that stores archived logs which must be retained for 180 days before being deleted. You are tasked with configuring an object lifecycle policy to automatically delete these objects after the retention period. Which components must you include in the lifecycle policy configuration to meet this requirement?
- A
A condition specifying the 'age' of the object in days.
- B
A condition specifying the 'storage class' of the object to be 'NEARLINE'.
- C
An action specifying 'Delete' for objects matching the condition.
- D
An action specifying 'SetStorageClass' to move objects to 'COLDLINE'.
- E
A condition specifying the 'createdBefore' date of the objects.
Show answer and explanation
Correct answers: A, C
Explanation
To configure a lifecycle policy for automatically deleting objects after they have been retained for 180 days, you need to specify a condition for the object's 'age' (e.g., 180 days) and an action to 'Delete' objects that match this condition. Other conditions or actions, such as specifying storage class or using 'createdBefore', do not align with the requirements of this scenario.
- A. Correct.
Correct: To delete objects after a specific retention period, you must specify a condition based on the 'age' of the objects in days, such as 180 days.
- B. Incorrect.
Incorrect: Specifying the storage class, such as 'NEARLINE', is not necessary for this use case as the requirement is based on age, not storage class.
- C. Correct.
Correct: The 'Delete' action is required to remove objects that match the specified condition (e.g., objects older than 180 days).
- D. Incorrect.
Incorrect: The 'SetStorageClass' action changes the storage class of objects but does not delete them. This action is unrelated to the task of deleting objects after 180 days.
- E. Incorrect.
Incorrect: While 'createdBefore' can be used as a condition, it requires a specific date and is less suitable for a recurring retention policy based on object age.