Add an Orchestration
/orchestration/
After adding an orchestration, you can start the orchestration by using the HTTP request /orchestration/{name}?action=START to create all the objects you have defined in the orchestration JSON file. See Update an Orchestration.
Required Role: To complete this task, you must have the Compute_Operations
role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Request
- application/oracle-compute-v3+json
-
Cookie: string
The Cookie: header must be included with every request to the service. It must be set to the value of the set-cookie header in the response received to the POST /authenticate/ call.
For more information about parameters of the request body, see Attributes in Orchestrations in Using Oracle Cloud Infrastructure Compute Classic.
object
For more information about parameters of the request body, see Attributes in Orchestrations in Using Oracle Cloud Infrastructure Compute Classic.
-
description(optional):
string
Description of this orchestration plan.
-
name(optional):
string
The three-part name of the object (
/Compute-identity_domain/user/object
). -
oplans:
array oplans
List of oplans. An object plan, or oplan, is a top-level orchestration attribute.
-
relationships(optional):
array relationships
A list of relationship specifications to be satisfied on this orchestration. For more information, see Relationships Between Object Plans in Using Oracle Cloud Infrastructure Compute Classic
-
schedule(optional):
object schedule
The schedule for an orchestration consists of the start and stop dates and times.
array
-
Array of:
object OPlan-post-request
The request body contains details of the oplan that you want to create.
array
-
Array of:
object items
Additional Properties Allowed: additionalProperties
object
object
-
ha_policy(optional):
string
-
label:
string
Description of this object plan.
-
obj_type:
string
Type of the object.
-
objects:
array objects
List of object dictionaries or object names.
object
Response
- application/oracle-compute-v3+json
201 Response
-
set-cookie: string
The cookie value is returned if the session is extended
object
-
account(optional):
string
Shows the default account for your identity domain.
-
description(optional):
string
Description of this orchestration plan.
-
info(optional):
object info
Additional Properties Allowed: additionalPropertiesThe nested parameter
errors
shows which object in the orchestration has encountered an error. Empty if there are no errors. -
name(optional):
string
The three-part name of the object (
/Compute-identity_domain/user/object
). -
oplans(optional):
array oplans
List of oplans. An object plan, or oplan, is a top-level orchestration attribute.
-
relationships(optional):
array relationships
The relationship between the objects that are created by this orchestration.
-
schedule(optional):
object schedule
The schedule for an orchestration consists of the start and stop dates and times.
-
status(optional):
string
Shows the current status of the orchestration.
-
status_timestamp(optional):
string
This information is generally displayed at the end of the orchestration JSON. It indicates the time that the current view of the orchestration was generated. This information shows only when the orchestration is running.
-
uri(optional):
string
Uniform Resource Identifier
-
user(optional):
string
Two-part name of the user (
/Compute-identity_domain/user
) who has most recently taken an action on the orchestration.
object
errors
shows which object in the orchestration has encountered an error. Empty if there are no errors.array
array
-
Array of:
object items
Additional Properties Allowed: additionalProperties
object
object
object
-
ha_policy(optional):
string
-
info(optional):
object info
Additional Properties Allowed: additionalPropertiesInfo dictionary for the oplan.
-
label(optional):
string
Description of this object plan.
-
obj_type(optional):
string
Type of the object.
-
objects(optional):
array objects
List of object dictionaries or object names.
-
status(optional):
string
Most recent status.
-
status_timestamp(optional):
string
Timestamp of the most-recent status change.
object
object
object
Examples
cURL Command
The following example shows how to create an orchestration by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.
Enter the command on a single line. Line breaks are used in this example for readability.
curl -i -X POST -H "Cookie: $COMPUTE_COOKIE" -H "Content-Type: application/oracle-compute-v3+json" -H "Accept: application/oracle-compute-v3+json" -d "@requestbody.json" https://api-z999.compute.us0.oraclecloud.com/orchestration/
-
COMPUTE_COOKIE
is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication. -
api-z999.compute.us0.oraclecloud.com
is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.
Example of Request Body
The following shows an example of the request body content in the requestbody.json
file.
{ "relationships": [], "account": "/acme/default", "description": "simple orchestration", "schedule": {"start_time": null, "stop_time": null}, "uri": null, "oplans": [ { "status": "unknown", "info": {}, "obj_type": "launchplan", "ha_policy": "active", "label": "webserver_lp", "objects": [ { "instances": [ {"shape": "medium", "label": "primary_webserver", "imagelist": "/oracle/public/compute_oel_6.4_2GB", "name": "/acme/jack.jones@example.com/primary_webserver" } ] } ] } ], "name": "/acme/jack.jones@example.com/webportal" }
Example of Response Body
The following example shows the response body in JSON format.
Some lines may be truncated with ellipses (...) for readability.
{ "relationships": [ ], "status": "stopped", "account": "/acme/default", "description": "simple orchestration", "schedule": { "start_time": null, "stop_time": null }, "uri": "https://api-z999.compute.us0.oraclecloud.com/orchestration/Compute-acme/jack.jones@example.com/webportal", "oplans": [ { "status": "stopped", "info": { }, "obj_type": "launchplan", "ha_policy": "active", "label": "webserver_lp", "objects": [ { "instances": [ { "shape": "medium", "label": "primary_webserver", "imagelist": "/oracle/public/compute_oel_6.4_2GB", "name": "/acme/jack.jones@example.com/primary_webserver" } ] } ] } ], "info": {}, "name": "/acme/jack.jones@example.com/webportal" }