Associate Cloud Engineer Exam QuestionsBrowse all questions from this exam

Associate Cloud Engineer Exam - Question 18


You need to set up a policy so that videos stored in a specific Cloud Storage Regional bucket are moved to Coldline after 90 days, and then deleted after one year from their creation. How should you set up the policy?

Show Answer
Correct Answer: AB

To set up a policy where videos are moved to Coldline after 90 days and then deleted after one year from their creation, use Cloud Storage Object Lifecycle Management with age conditions. Set the 'SetStorageClass' action to 90 days to move the videos to Coldline, and the 'Delete' action to 365 days. This ensures the videos are deleted one year from their creation date without needing to recalculate the remaining duration after changing the storage class.

Discussion

17 comments
Sign in to comment
SammigboOption: B
May 31, 2020

Answer is B. There should be no reason to recalculate the time needed to delete after a year.

JKRowlings
Dec 2, 2020

The correct ans is A.

yvinisiupacuando
May 3, 2021

Right answer is clearly B, "A" does not make any sense.

cloudenthu01Option: B
Jun 25, 2020

Correct is B. You only re-calculate expiry date when objects are re-written using re-write option to another storage class in which case creation date is rest. But in this case objects is moveed to Coldline class after 90 days and then we want to delete the object after 365 days.

T_T_M
Aug 29, 2020

You can change the storage class of an existing object either by rewriting the object or by using Object Lifecycle Management...Since Object Life cycle management was used there was no need to recalculate the expiration date and delete action still remains 365 days. https://cloud.google.com/storage/docs/storage-classes

YourCloudGuruOption: B
Sep 25, 2023

The correct answer is B. Cloud Storage Object Lifecycle Management is a feature that allows you to automatically transition objects to different storage classes or delete them based on user-defined rules. To set up a lifecycle management policy to move videos to Coldline after 90 days and then delete them after one year, you would create a rule with the following conditions and actions: * Condition: Age is greater than 90 days * Action: Set storage class to Coldline * Condition: Age is greater than 365 days * Action: Delete This policy will ensure that your videos are automatically moved to Coldline after 90 days, where they will be stored at a lower cost. After one year, the videos will be automatically deleted. Here is an example of how to create a lifecycle management policy using the gcloud command-line tool: gcloud storage lifecycle management policies set my-bucket my-policy --action-set-storage-class coldline --condition-age-days 90 --action-delete --condition-age-days 365

lights4lifeOption: B
Feb 27, 2023

Answer is B. There is term called AGE, always GCP refers AGE by default which is since creation of the object.

Partha117Option: B
Mar 22, 2023

NO need to recalculate as it is from object original creation date

Jelly_WangOption: B
Mar 24, 2023

The answer is B. When using Age, it is calculated from when the object is written to the bucket. The age do not get affected when you change the storage class .https://cloud.google.com/storage/docs/lifecycle#age

Ashish_TayalOption: B
Apr 3, 2023

In GCP Storage, any rule either life cycle management or retention policy applies based on the creation date and time of the object. Even in the question they mention " from their creation". So ans is B.

gsmasadOption: B
Nov 1, 2023

Time of creation is the reference NOT the time of movement

PB78Option: A
Feb 27, 2023

Answer is A as The age condition is satisfied when a resource reaches the specified age (in days). Age is measured from the resource's creation time. For objects, the creation time is the time when the object is successfully written to the bucket, such as when an upload completes. The age of an object is unaffected by the object becoming a noncurrent version.

KerolesKhalilOption: B
Jun 2, 2023

Answer is B . Age condition : The age condition is satisfied when a resource reaches the specified age (in days). Age is measured from the resource's creation time. For objects, the creation time is the time when the object is successfully written to the bucket, such as when an upload completes. https://cloud.google.com/storage/docs/lifecycle#age

rosh199Option: B
Jul 19, 2023

Answer is B

ExamsFROption: B
Jul 20, 2023

Answer is B

CarlosMarinOption: A
Sep 8, 2023

"... and then deleted after one year FROM THEIR CREATION". I vote for A.

Evan7557Option: B
Oct 11, 2023

Answer B

Rahaf99Option: B
Nov 10, 2023

Answer is B

torresbyteaOption: B
Feb 29, 2024

A is wrong cause there is no need of re-calculating. B is the right choice

sh00001Option: A
Jun 30, 2024

Option A Cloud Storage Object Lifecycle Management allows you to define a set of rules that manage the lifecycle of your objects. The Age condition specifies the number of days since the object's creation. The SetStorageClass action changes the storage class of objects within the bucket. Setting it to 90 days means that 90 days after the object's creation, it will be moved to Coldline Storage. The Delete action specifies when the object should be deleted. Because the SetStorageClass action occurs at 90 days, you would set the Delete action at 275 days (365 total days from the creation - 90 days already passed until the class change), resulting in the object being deleted one year from its creation.