Update an Orchestration

put

/orchestration/{name}

Updates an orchestration. You can update an orchestration by modifying the orchestration JSON file. Ensure that you specify the name of the orchestration that you want to update in the updated orchestration JSON file.

You can update orchestrations when they are in one of the following states: stopped and running.

Depending on the state of an orchestration, you can make the following updates:

  • When an orchestration is in the stopped state, you can update all the oplan attributes, add oplans, or remove oplans.
  • When an orchestration is running, you can only modify the HA policy of the existing oplans. You cannot modify any other attributes of the existing oplans. You can add or remove oplans at runtime.

When you update an orchestration, the name of the orchestration must be specified in the PUT body.

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
Path Parameters
  • The three-part name of the object (/Compute-identity_domain/user/object).

Query Parameters
  • Use the query argument action=START/STOP to start/stop an orchestration immediately.
    • Specify the action=START query argument to immediately start an orchestration that has already been added to the system.

      Starting an orchestration creates all the objects defined in the orchestration. The status of the orchestration changes over time. You can view the details of the orchestration to see the status as the orchestration progresses.

      Note: If the orchestration is in a scheduled state, you must stop the orchestration to cancel the schedule before you can start the orchestration. See Stop an Orchestration. After stopping the orchestration, you can either start it immediately, or update the orchestration to specify a new start time.

    • Specify the action=STOP query argument to immediately stop a running orchestration. Stopping an orchestration deletes all objects that were created by the orchestration. The status of the orchestration changes over time. You can get the details of the orchestration to view the status as the orchestration stops.

      Note: If you want to stop an orchestration at some future time, you should update the orchestration object and specify the stop_time in the request body.

Header Parameters
Body ()
The request body contains details of the orchestration that you want to update.

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

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

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.
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

200 Response

OK. 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

Updating an Orchestration

cURL Command

The following example shows how to update an orchestration, /Compute-acme/jack.jones@example.com/webportal, by submitting a PUT 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 PUT
     -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-acme/jack.jones@example.com/webportal
  • 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.

  • acme and jack.jones@example.com are example values. Replace acme with the identity domain ID of your Compute Classic account, and jack.jones@example.com with your user name.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file to update an orchestration which is in the stopped state. The oplan is updated to define details for two instances instead of a single instance, and the relationship between the two instances is also defined.

{
  "relationships": [
    
  ],
  "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": "unknown",
      "info": {
        
      },
      "obj_type": "launchplan",
      "ha_policy": "active",
      "label": "webserver_lp",
      "objects": [
        {
          "relationships": [
            {
              "instances": [
                "primary_webserver",
                "secondary_webserver"
              ],
              "type": "different_node"
            }
          ],
          "instances": [
            {
              "shape": "medium",
              "label": "primary_webserver",
              "imagelist": "/oracle/public/compute_oel_6.4_2GB",
              "name": "/Compute-acme/jack.jones@example.com/primary_webserver"
            },
            {
              "shape": "medium",
              "label": "secondary_webserver",
              "imagelist": "/oracle/public/compute_oel_6.4_2GB",
              "name": "/Compute-acme/jack.jones@example.com/secondary_webserver"
            }
          ]
        }
      ]
    }
  ],
  "name": "/acme/jack.jones@example.com/webportal"
}

Example of Response Body

The following example shows the response body in JSON format when you update an orchestration.

{
  "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": [
        {
          "relationships": [
            {
              "instances": [
                "primary_webserver",
                "secondary_webserver"
              ],
              "type": "different_node"
            }
          ],
          "instances": [
            {
              "shape": "medium",
              "label": "primary_webserver",
              "imagelist": "/oracle/public/compute_oel_6.4_2GB",
              "name": "/Compute-acme/jack.jones@example.com/primary_webserver"
            },
            {
              "shape": "medium",
              "label": "secondary_webserver",
              "imagelist": "/oracle/public/compute_oel_6.4_2GB",
              "name": "/Compute-acme/jack.jones@example.com/secondary_webserver"
            }
          ]
        }
      ]
    }
  ],
  "info": {},
  "name": "/Compute-acme/jack.jones@example.com/webportal"
}

Starting an Orchestration

cURL Command

The following example shows how to start an orchestration, /Compute-acme/jack.jones@example.com/webportal, immediately by submitting a PUT 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 PUT
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
         https://api-z999.compute.us0.oraclecloud.com/orchestration/Compute-acme/jack.jones@example.com/webportal?action=START
  • 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.

  • acme and jack.jones@example.com are example values. Replace acme with the identity domain ID of your Compute Classic account, and jack.jones@example.com with your user name.

Example of Response Body

The following example shows the response body in JSON format when you start an orchestration.

{
    "relationships": [],
   "status": "starting",
    "account": "/Compute-acme/default",
    "description": "simple orchestration",
    "schedule": {
        "start_time": null,
        "stop_time": null
    },
    "uri": "https://api-z999.compute.us0.oraclecloud.com/orchestration/Compute-acme/administrator/webportal",
    "oplans": [
        {
            "status": "starting",
            "info": {},
            "obj_type": "launchplan",
            "ha_policy": "active",
            "label": "webserver_lp",
            "objects": [
                {
                    "relationships": [
                        {
                            "instances": [
                                "primary_webserver",
                                "secondary_webserver"
                            ],
                            "type": "different_node"
                        }
                    ],
                    "instances": [
                        {
                            "shape": "medium",
                            "imagelist": "/oracle/public/compute_oel_6.4_2GB",
                            "name": "/Compute-acme/administrator/primary_webserver",
                            "label": "primary_webserver"
                        },
                        {
                            "shape": "medium",
                            "imagelist": "/oracle/public/compute_oel_6.4_2GB",
                            "name": "/Compute-acme/administrator/secondary_webserver",
                            "label": "secondary_webserver"
                        }
                    ]
                }
            ]
        }
    ],
    "info": {},
    "name": "/Compute-acme/administrator/webportal"
}

Stopping an Orchestration

cURL Command

The following example shows how to stop an orchestration, /Compute-acme/jack.jones@example.com/webportal, immediately by submitting a PUT 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 PUT
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
         https://api-z999.compute.us0.oraclecloud.com/orchestration/Compute-acme/jack.jones@example.com/webportal?action=STOP
  • 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.

  • acme and jack.jones@example.com are example values. Replace acme with the identity domain ID of your Compute Classic account, and jack.jones@example.com with your user name.

Example of Response Body

The following example shows the response body in JSON format when you stop an orchestration.

{
  "relationships": [],
  "status": "stopping",
  "account": "/Compute-acme/default",
  "description": "simple orchestration",
  "schedule": {
    "start_time": "2015-09-12T14:40:09Z",
    "stop_time": null
  },
  "uri": "https://api-z999.compute.us0.oraclecloud.com/orchestration/Compute-acme/jack.jones@example.com/webportal",
  "oplans": [
    {
      "status": "ready",
      "info": {
        "errors": {}
      },
      "obj_type": "launchplan",
      "ha_policy": "active",
      "label": "webserver_lp",
      "objects": [
        {
          "relationships": [
            {
              "instances": [
                "primary_webserver",
                "secondary_webserver"
              ],
              "type": "different_node"
            }
          ],
          "instances": [
            {
              "name": "/Compute-acme/jack.jones@example.com/primary_webserver/df88ec78-05a4-4fe6-8178-cc44e2b91b24",
              "ip": "192.0.2.1",
              "state": "running",
              "label": "primary_webserver",
              "shape": "medium",
              "imagelist": "/oracle/public/compute_oel_6.4_2GB"
            },
            {
              "name": "/Compute-acme/jack.jones@example.com/secondary_webserver/70e1a128-6a29-4ef2-8354-30d71da6cf46",
              "ip": "192.0.2.2",
              "state": "running",
              "label": "secondary_webserver",
              "shape": "medium",
              "imagelist": "/oracle/public/compute_oel_6.4_2GB"
            }
          ]
        }
      ]
    }
  ],
  "info": {
    "errors": {}
  },
  "name": "/Compute-acme/jack.jones@example.com/webportal"
}