Update an Orchestration Object

put

/platform/v1/object/{name}

Updates the specified orchestration object.

* You can update the following fields of an orchestration object: description, label, persistent, relationships, and template.

* You cannot update an object while the orchestration within which it is contained is in a transient state, such as activating, deactivating, and suspending.

* You cannot move an object from one orchestration to another.

To update an orchestration object:

1.Get the orchestration object by sending the GET /platform/v1/object/{name} request. The response body is in the JSON format.

2.Modify the JSON file as per your requirements.

3.Provide the modified JSON as the request body for the PUT /platform/v1/object/{name} request. Ensure that you specify the latest version of the orchestration object in the request 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 four-part name of the object (/Compute-identity_domain/user/object).
Header Parameters
Body ()
The request body contains details of the orchestration object that you want to update.
Root Schema : OrchestrationObject-put-request
Type: object
The request body contains details of the orchestration object that you want to update.
Show Source
  • /Compute-identity_domain/default
  • A text string describing the object.
  • The desired state of this object
  • A text string describing the object. Labels can't include spaces. In an orchestration, the label for each object must be unique. Maximum length is 256 characters.
  • The four-part name of the object (/Compute-identity_domain/user/orchestration/object). If you don't specify a name for this object, the name is generated automatically. Object names can contain only alphanumeric characters, hyphens, underscores, and periods. Object names are case-sensitive. When you specify the object name, ensure that an object of the same type and with the same name doesn't already exist. If such a object already exists, then another object of the same type and with the same name won't be created and the existing object won't be updated.
  • The three-part name (/Compute-identity_domain/user/object) of the orchestration to which the object belongs.
  • Specifies whether the object should persist when the orchestration is suspended. Specify one of the following:

    * true: The object persists when the orchestration is suspended.

    * false: The object is deleted when the orchestration is suspended.

    By default, persistent is set to false. It is recommended that you specify true for storage volumes and other critical objects. Persistence applies only when you're suspending an orchestration. When you terminate an orchestration, all the objects defined in it are deleted.

  • relationships
    The relationship between the objects that are created by this orchestration. The only supported relationship is depends, indicating that the specified target objects must be created first.

    Note that when recovering from a failure, the orchestration doesn't consider object relationships. Orchestrations v2 use object references to recover interdependent objects to a healthy state. SeeObject References and Relationships in Using Oracle Cloud Infrastructure Compute Classic.

  • template
    Additional Properties Allowed: additionalProperties
    The template attribute defines the properties or characteristics of the Compute Classic object that you want to create, as specified by the type attribute.

    The fields in the template section vary depending on the specified type. See Orchestration v2 Attributes Specific to Each Object Type in Using Oracle Cloud Infrastructure Compute Classic to determine the parameters that are specific to each object type that you want to create.

    For example, if you want to create a storage volume, the type would be StorageVolume, and the template would include size and bootable. If you want to create an instance, the type would be Instance, and the template would include instance-specific attributes, such as imagelist and shape.

  • Specify one of the following object types that you want to create.

    * Acl

    * Backup

    * BackupConfiguration

    * Instance

    * IpAddressAssociation

    * IpAddressPrefixSet

    * IpAddressReservation

    * IpNetwork

    * IpNetworkExchange

    * IPReservation

    * OSSContainer

    * Restore

    * Route

    * SecApplication

    * SecIPList

    * SecList

    * SecRule

    * SecurityProtocol

    * SecurityRule

    * SSHKey

    * StorageAttachment

    * StorageSnapshot

    * StorageSnapshot

    * StorageVolume

    * VirtualNicSet

    For the most up-to-date information about the supported object types, see Object Types in Orchestgations v2 in Using Oracle Cloud Infrastructure Compute Classic.

  • Specify the latest version of the orchestration object in the request body. Before updating the orchestration object, retrieve its details. This ensures that you only update the latest version of the orchestration object.
Nested Schema : relationships
Type: array
The relationship between the objects that are created by this orchestration. The only supported relationship is depends, indicating that the specified target objects must be created first.

Note that when recovering from a failure, the orchestration doesn't consider object relationships. Orchestrations v2 use object references to recover interdependent objects to a healthy state. SeeObject References and Relationships in Using Oracle Cloud Infrastructure Compute Classic.

Show Source
Nested Schema : template
Type: object
Additional Properties Allowed
Show Source
The template attribute defines the properties or characteristics of the Compute Classic object that you want to create, as specified by the type attribute.

The fields in the template section vary depending on the specified type. See Orchestration v2 Attributes Specific to Each Object Type in Using Oracle Cloud Infrastructure Compute Classic to determine the parameters that are specific to each object type that you want to create.

For example, if you want to create a storage volume, the type would be StorageVolume, and the template would include size and bootable. If you want to create an instance, the type would be Instance, and the template would include instance-specific attributes, such as imagelist and shape.

Nested Schema : items
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Back to Top

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : OrchestrationObject-response
Type: object
Show Source
Nested Schema : health
Type: object
Additional Properties Allowed
Show Source
Dictionary containing the current state of the object
Nested Schema : relationships
Type: array
List of relationships to other objects
Show Source
Nested Schema : template
Type: object
Additional Properties Allowed
Show Source
Template of this object object
Nested Schema : additionalProperties
Type: object
Nested Schema : items
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Back to Top

Examples

Updating Attributes of an Orchestration Object

cURL Command

The following example shows how to update the attributes of an orchestration object, /Compute-acme/jack.jones@example.com/myOrchestration/mySeclist, 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 "@updateResource.json"
        https://api-z999.compute.us0.oraclecloud.com/platform/v1/object/Compute-acme/jack.jones@example.com/myOrchestration/mySeclist
  • 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 the /Compute-acme/jack.jones@example.com/myOrchestration/mySeclist object which is present in the /Compute-acme/jack.jones@example.com/myOrchestration orchestration. The following fields are updated for this object: persistent is set to false, label, description, and outbound_cidr_policy is set to PERMIT.

{
  "type": "SecList",
  "orchestration": "/Compute-acme/jack.jones@example.com/myOrchestration",
  "name": "/Compute-acme/jack.jones@example.com/myOrchestration/seclist1",
  "label": "my-Security-list-1",
  "persistent": false,
  "template": {
   "name": "/Compute-acme/jack.jones@example.com/seclist1",
   "outbound_cidr_policy": "PERMIT", 
   "policy": "DENY"
   },
  "version": 1,
  "description": "an updated security list which is not persistent"
}

Example of Response Body

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

{
  "relationships": [
    
  ],
  "account": "/Compute-acme/default",
  "time_updated": "2017-11-07T13:03:20Z",
  "desired_state": "inherit",
  "description": "an updated security list which is not persistent",
  "persistent": false,
  "uri": "http://api-z999.compute.us0.oraclecloud.com/platform/v1/object/Compute-acme/jack.jones@example.com/myOrchestration/seclist1",
  "template": {
    "policy": "DENY",
    "name": "/Compute-acme/jack.jones@example.com/seclist1",
    "outbound_cidr_policy": "PERMIT"
  },
  "label": "my-Security-list-1",
  "time_audited": null,
  "version": 2,
  "health": {
    "status": "inactive"
  },
  "time_created": "2017-11-07T12:45:28Z",
  "orchestration": "/Compute-acme/jack.jones@example.com/myOrchestration",
  "user": "/Compute-acme/jack.jones@example.com",
  "type": "SecList",
  "name": "/Compute-acme/jack.jones@example.com/myOrchestration/seclist1"
}

Releasing an Orchestration Object

cURL Command

You can release an orchestration object which is in the inactive or active state. When you release an orchestration object, the orchestration object is deleted, but it doesn???t delete the underlying object in Compute Classic. The following example shows that how to release an orchestration object, /Compute-acme/jack.jones@example.com/myOrchestration/seclist1by 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"
     https://api-z999.compute.us0.oraclecloud.com/platform/v1/object/Compute-acme/jack.jones@example.com/jack.jones@example.com/myOrchestration/seclist1?desired_state=release
  • 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 release an orchestration object. The orchestration object, /Compute-acme/jack.jones@example.com/jack.jones@example.com/myOrchestration/seclist1 is deleted but it does not impact the underlying object, /Compute-acme/jack.jones@example.com/seclist.

{
  "relationships": [
    
  ],
  "account": "/Compute-cstestraw2/default",
  "time_updated": "2017-11-07T13:12:36Z",
  "desired_state": "release",
  "description": "an updated security list which is not persistent",
  "persistent": false,
  "uri": "http://10.252.131.38:7778/platform/v1/object/Compute-acme/jack.jones@example.com/myOrchestration/seclist1",
  "template": {
    "policy": "DENY",
    "name": "/Compute-acme/jack.jones@example.com/myOrchestration/seclist1",
    "outbound_cidr_policy": "PERMIT"
  },
  "label": "my-Security-list-1",
  "time_audited": null,
  "version": 3,
  "health": {
    "status": "inactive"
  },
  "time_created": "2017-11-07T12:45:28Z",
  "orchestration": "/Compute-acme/jack.jones@example.com/myOrchestration",
  "user": "/Compute-acme/jack.jones@example.com",
  "type": "SecList",
  "name": "/Compute-acme/jack.jones@example.com/myOrchestration/seclist1"
}

The orchestration object is deleted, but the underlying object is not deleted.

Back to Top