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?
A.
Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 275 days (365 ג€" 90)
B.
Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 365 days.
C.
Use gsutil rewrite and set the Delete action to 275 days (365-90).
D.
Use gsutil rewrite and set the Delete action to 365 days.
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.
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
La gestión del ciclo de vida de objetos en Google Cloud Storage permite automatizar el cambio de la clase de almacenamiento y la eliminación de los objetos en función de su antigüedad. Para este caso:
Después de 90 días, se debe cambiar la clase de almacenamiento a Coldline, lo que se hace usando la acción SetStorageClass.
Luego, después de 365 días (1 año), los objetos deben ser eliminados usando la acción Delete.
A es incorrecta porque sugiere eliminar los objetos a los 275 días, lo cual no coincide con el requisito de eliminar los videos después de un año.
C y D son incorrectas porque gsutil rewrite no es la herramienta correcta para gestionar políticas de ciclo de vida.
option A can be misguiding but you don't have to specify 275 days since the rule would be implemented based on the creation of object not after the effect of the previous rule. Hence option B
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.
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
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
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.
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
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Sammigbo
Highly Voted 4 years, 5 months agoJKRowlings
3 years, 11 months agoyvinisiupacuando
3 years, 6 months agocloudenthu01
Highly Voted 4 years, 5 months agoT_T_M
4 years, 2 months agonubelukita45852
Most Recent 2 months, 1 week agoJackSkeletonCoder
2 months, 1 week agosh00001
4 months, 4 weeks agotorresbytea
9 months agoRahaf99
1 year agogsmasad
1 year agoEvan7557
1 year, 1 month agoYourCloudGuru
1 year, 2 months agoCarlosMarin
1 year, 2 months agoExamsFR
1 year, 4 months agorosh199
1 year, 4 months agoKerolesKhalil
1 year, 5 months agoAshish_Tayal
1 year, 7 months agoJelly_Wang
1 year, 8 months agoPartha117
1 year, 8 months ago