One of your development teams has asked for your help to standardize the creation of several compute instances that must be provisioned each day of the week.
You initially write several Command Line Interface (CLI) commands with all appropriate configuration parameters to achieve this task later determining this method lacks flexibility.
Which command generates a JSON-based template that Oracle Cloud Infrastructure (OCI) CLI can use to provision these instances on a regular basis? (Choose the best answer.)
Click on the arrows to vote for the correct answer
A. B. C. D.D.
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliusing.htmThe command that generates a JSON-based template that Oracle Cloud Infrastructure (OCI) CLI can use to provision compute instances on a regular basis is option D, which is oci compute instance launch " "generate"full"command"json"input
.
The oci compute instance launch
command creates a new compute instance in an existing compartment or VCN. This command takes various parameters as input such as image, shape, and networking details. The generate
option with the full
and command
parameters is used to generate a JSON-based template that can be used for creating the compute instances regularly with the same configuration.
The generate
option with full
parameter generates the complete set of parameters required to create the instance, whereas command
parameter formats the output in JSON syntax. This JSON template can be saved and modified as required to create similar compute instances regularly, with the same configuration. By modifying the values of the parameters in the JSON template, new compute instances can be created with different configurations as needed.
Option A (oci compute instance create " "generate"cli"skeleton
) uses the cli
parameter to generate a skeleton OCI CLI command that includes only the required parameters to create a compute instance, while leaving out optional parameters and their values. This method provides less flexibility and requires manually editing the CLI command to add optional parameters.
Option B (oci compute instance launch " "generate"cli"skeleton
) is similar to option A, except that it uses generate
with cli
to generate a skeleton OCI CLI command.
Option C (oci compute provision"instance " "generate"full"command"json"input
) is not a valid OCI CLI command. It contains a syntax error and does not generate a JSON template for creating compute instances.