Question 2
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?
oci os object-lifecycle-policy delete -ns <object_storage_namespace> -bn <bucket_name>
oci os object-lifecycle-policy put -ns <object_storage_namespace> -bn <bucket_name> -Items <json_formated_lifecycle_policy>
oci os object-lifecycle-policy put -ns <object_storage_namespace> -bn <bucket_name> O
oci os object-lifecycle-policy get -ns <object_storage_namespace> -bn <bucket_name>
Correct answer: B
Explanation:
To create or replace a lifecycle policy for a bucket Open a command prompt and run oci os object-lifecycle-policy put to create or replace the object lifecycle policy for a bucket. To edit individual rules, replace the bucket's existing policy with a new version of the policy that includes the changes to your rules. oci os object-lifecycle-policy put -ns <object_storage_namespace> -bn <bucket_name> --items <json_formatted_lifecycle_policy> The --items option requires that you provide key-value pair input as valid formatted JSON https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/usinglifecyclepolicies.htm
To create or replace a lifecycle policy for a bucket
Open a command prompt and run oci os object-lifecycle-policy put to create or replace the object lifecycle policy for a bucket. To edit individual rules, replace the bucket's existing policy with a new version of the policy that includes the changes to your rules. oci os object-lifecycle-policy put -ns <object_storage_namespace> -bn <bucket_name> --items <json_formatted_lifecycle_policy> The --items option requires that you provide key-
value pair input as valid formatted JSON
https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/usinglifecyclepolicies.htm