PROFESSIONAL-CLOUD-DEVELOPER · Question #366
PROFESSIONAL-CLOUD-DEVELOPER Question #366: Real Exam Question with Answer & Explanation
The correct answer is A: Add a final step in the job that deletes all the objects in the bucket in bulk by using batch. Using batch requests to the Cloud Storage API in a final step of your job allows you to delete all objects in the bucket efficiently and immediately after the job completes. This approach minimizes the time required to delete the objects, as batch requests allow for bulk deletion
Question
Your team runs a Python job that reads millions of customer record files stored in a Cloud Storage bucket. To comply with regulatory requirements, you need to ensure that customer data is immediately deleted once the job is completed. You want to minimize the time required to complete this task. What should you do?
Options
- AAdd a final step in the job that deletes all the objects in the bucket in bulk by using batch
- BConfigure Object Lifecycle Management on the Cloud Storage bucket that deletes all the objects
- CRemove the bucket from the Google Cloud console when the job is completed
- DUse the gcloud CLI to execute the gcloud storage rm --recursive gs://BUCKET_NAME/ command.
Explanation
Using batch requests to the Cloud Storage API in a final step of your job allows you to delete all objects in the bucket efficiently and immediately after the job completes. This approach minimizes the time required to delete the objects, as batch requests allow for bulk deletion, reducing the need for individual API calls for each object. Object Lifecycle Management is not suitable here because it operates on predefined schedules rather than immediately after job completion. Deleting the bucket directly from the console or using gcloud storage rm could introduce delays or manual dependencies, making them less efficient than an automated bulk deletion step.
Topics
Community Discussion
No community discussion yet for this question.