1Z0-1067-25 Question 15
Select 3Your team has just finished developing a new application for the dev environment. You are asked to provision a Compute instance named 'TestInstance' using the Oracle Cloud Infrastructure CLI, confirm that it is up and running, and then remove it after testing. Which three commands will accomplish these tasks?
- A
oci compute instance launch --compartment-id
--display-name TestInstance --shape VM.Standard.E4.Flex --image-id --assign-public-ip true - B
oci compute instance stop --instance-id
- C
oci compute instance get --instance-id
- D
oci compute instance delete --instance-id
- E
oci compute instance terminate --instance-id
Show answer and explanation
Correct answers: A, C, E
Explanation
To create a new Compute instance, you must use the 'launch' command with appropriate parameters such as shape, image, and network settings (for example, assigning a public IP). After the instance is launched, using the 'get' command is a direct way to verify its status. Finally, to remove the instance, the 'terminate' command is used. References: Oracle's official OCI CLI documentation outlines the proper syntax and best practices for provisioning and managing resources via the command line.
- A. Correct.
Correct. This command provisions a new Compute instance in the specified compartment with the chosen shape, image, and a public IP.
- B. Incorrect.
Incorrect. The 'stop' command only stops the instance temporarily and does not remove it. It also does not verify that the instance was launched.
- C. Correct.
Correct. 'oci compute instance get' allows you to confirm the instance� lifecycle state (e.g., RUNNING) and ensures that it was launched successfully.
- D. Incorrect.
Incorrect. 'oci compute instance delete' is not a valid OCI CLI command for terminating or removing a Compute instance. The correct command for removal is 'terminate'.
- E. Correct.
Correct. 'terminate' permanently removes the instance, fulfilling the requirement to destroy it after testing.