Add an Orchestration

post

/orchestration/

Adds an orchestration to Compute Classic.

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

Supported Media Types
Header Parameters
Body ()
The request body contains details of the orchestration that you want to create.

For more information about parameters of the request body, see Attributes in Orchestrations in Using Oracle Cloud Infrastructure Compute Classic.

Root Schema : Orchestration-post-request
Type: object
The request body contains details of the orchestration that you want to create.

For more information about parameters of the request body, see Attributes in Orchestrations in Using Oracle Cloud Infrastructure Compute Classic.

Show Source
Nested Schema : oplans
Type: array
List of oplans. An object plan, or oplan, is a top-level orchestration attribute.
Show Source
Nested Schema : relationships
Type: array
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
Show Source
Nested Schema : schedule
Type: object
The schedule for an orchestration consists of the start and stop dates and times.
Nested Schema : OPlan-post-request
Type: object
The request body contains details of the oplan that you want to create.
Show Source
Nested Schema : objects
Type: array
List of object dictionaries or object names.
Show Source
Nested Schema : items
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: object

Response

Supported Media Types

201 Response

Created. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : Orchestration-response
Type: object
Show Source
Nested Schema : info
Type: object
Additional Properties Allowed
Show Source
The nested parameter errors shows which object in the orchestration has encountered an error. Empty if there are no errors.
Nested Schema : oplans
Type: array
List of oplans. An object plan, or oplan, is a top-level orchestration attribute.
Show Source
Nested Schema : relationships
Type: array
The relationship between the objects that are created by this orchestration.
Show Source
Nested Schema : schedule
Type: object
The schedule for an orchestration consists of the start and stop dates and times.
Nested Schema : additionalProperties
Type: object
Nested Schema : OPlan-response
Type: object
Show Source
Nested Schema : info
Type: object
Additional Properties Allowed
Show Source
Info dictionary for the oplan.
Nested Schema : objects
Type: array
List of object dictionaries or object names.
Show Source
Nested Schema : additionalProperties
Type: object
Nested Schema : items
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: 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"
}