Oracle Cloud Infrastructure 2021 Multicloud Architect Associate — Question 50
You have been asked to update the lifecycle policy for object storage using the Oracle Cloud Infrastructure (OCI) Command Line Interface (CLI).
Which command can successfully update the policy? (Choose the best answer.)
Answer options
- A. oci os object-lifecycle-policy delete ג€"ns <object_storage_namespace> ג€"bn <bucket_name>
- B. oci os object-lifecycle-policy put ג€"ns <object_storage_namespace> ג€"bn <bucket_name>
- C. oci os object-lifecycle-policy put ג€"ns <object_storage_namespace> ג€"bn <bucket_name> ג€" ג€"items <json_formatted_lifecycle_policy>
- D. oci os object-lifecycle-policy get ג€"ns <object_storage_namespace> ג€"bn <bucket_name>
Correct answer: C
Explanation
The correct answer is C because it includes the necessary command to update the lifecycle policy with the `put` action along with the required `items` parameter for the lifecycle policy in JSON format. Option A is incorrect as it deletes the policy instead of updating it, while B lacks the `items` parameter, making it insufficient for a complete update. Option D only retrieves the policy and does not modify it.