You can create and manage your orchestrations as well as objects within an orchestration using the REST API.
Use the following APIs to upload and manage orchestrations. See Orchestration v2 in REST API for Oracle Cloud Infrastructure Compute Classic.
To upload an orchestration, use the
Note that if you upload an orchestration with the
desired_stateattribute set to
active, the orchestration is activated automatically and all objects are created.
To view the details of all of the orchestrations in a container, use the
To view the details of an orchestration, use the
To start an orchestration, use the
To update an orchestration, use the
You can update an orchestration only if the orchestration is not in a transient state (
When you update an orchestration, the orchestration attempts to update the objects that you’ve modified without deleting the object or stopping the orchestration. Remember, however, that various attributes of any object are immutable and modifying those attributes isn’t permitted. For example, the
nameof an object, the
bootableattribute of a storage volume, or the
shapeof a running instance are immutable. If you attempt to modify immutable attributes of any object, the update will fail and the orchestration will go into the
terminal_errorstate. If this happens, you must identify and fix the issues and then update or activate the orchestration again.
To delete all of the nonpersistent objects defined in the orchestration, use the
When you suspend an
activeorchestration, only the nonpersistent objects are deleted; the persistent objects are not deleted.
To delete all the objects in an orchestration, use the
Managing Objects in an Orchestration
Use the following APIs to manage the objects in orchestrations. See Orchestration Objects in REST API for Oracle Cloud Infrastructure Compute Classic.
To add an object to an orchestration, use the
In the JSON file, specify the orchestration to which you want to add the object.
To update an object in an orchestration, use the
If you want to modify the attributes of an instance, remember that some attributes can’t be updated while the instance is running. To modify these attributes, update the instance with the
shutdownto stop the instance. Then change the attributes as required and update the instance with the
Before you update an object, note the following:
In the JSON file, specify the
versionof the object.
You can’t update objects when the orchestration is in a transient state, such as
You can’t update the
typeof an object.
To update multiple objects in a single operation, update the orchestration.
To view the details of an object, use the
To delete an object from an orchestration, use the
If the object currently exists, specify the query argument
terminate=Trueto delete the object and then remove it from the orchestration.
See the following table for the appropriate method of deleting an object from an orchestration.
Desired State of the Orchestration Method
If object persistence is set to
If object persistence set to false
or not specified: