Update an Orchestration Object
/platform/v1/object/{name}
* 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
- application/oracle-compute-v3+json
-
name: string
The four-part name of the object (
/Compute-identity_domain/user/object
).
-
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.
object
-
account(optional):
string
/Compute-identity_domain/default
-
description(optional):
string
A text string describing the object.
-
desired_state(optional):
string
The desired state of this object
-
label:
string
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.
-
name(optional):
string
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. -
orchestration:
string
The three-part name (
/Compute-identity_domain/user/object
) of the orchestration to which the object belongs. -
persistent(optional):
boolean
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 tofalse
. 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(optional):
array 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:
object template
Additional Properties Allowed: additionalPropertiesThe 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 beStorageVolume
, and thetemplate
would includesize
andbootable
. If you want to create an instance, the type would beInstance
, and the template would include instance-specific attributes, such asimagelist
andshape
. -
type:
string
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.
-
version:
integer
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.
array
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.
-
Array of:
object items
Additional Properties Allowed: additionalProperties
object
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
.
object
object
Response
- application/oracle-compute-v3+json
200 Response
-
set-cookie: string
The cookie value is returned if the session is extended
object
-
account(optional):
string
/Compute-identity_domain/default
-
description(optional):
string
Description of this object
-
desired_state(optional):
string
The desired state of this object
-
health(optional):
object health
Additional Properties Allowed: additionalPropertiesDictionary containing the current state of the object
-
label(optional):
string
Human-readable identifier for this object
-
name(optional):
string
Name of this object, generated by the server
-
orchestration(optional):
string
The orchestration to which this object belongs
-
persistent(optional):
boolean
If the value is
true
, it indicates that the object is not deleted when the associated orchestration is suspended. If persistent is set tofalse
, the object is deleted when the associated orchestration is suspended. -
relationships(optional):
array relationships
List of relationships to other objects
-
template(optional):
object template
Additional Properties Allowed: additionalPropertiesTemplate of this object object
-
time_audited(optional):
string
Time the object was last audited
-
time_created(optional):
string
Object creation time
-
time_updated(optional):
string
Object modification time
-
type(optional):
string
Type of object this object represents
-
uri(optional):
string
Uniform Resource Identifier
-
user(optional):
string
User acting on this object
-
version(optional):
integer
Version of this object, generated by the server
object
array
-
Array of:
object items
Additional Properties Allowed: additionalProperties
object
object
object
object
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
andjack.jones@example.com
are example values. Replaceacme
with the identity domain ID of your Compute Classic account, andjack.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/seclist1
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" 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
andjack.jones@example.com
are example values. Replaceacme
with the identity domain ID of your Compute Classic account andjack.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.