Orchestration v2 Templates and Samples

The templates and samples provided here might not illustrate the use of all the attributes of each object. For a complete list of attributes and their description, see Attributes in Orchestrations v2. To get started with building an orchestration, see Building Your First Orchestration v2.

Note:

The orchestration templates provided here use placeholders for object names, labels, and other user-specific values. Replace these placeholders with values specific to your environment. For example, replace the identity domain acme with your identity domain and the user name joe or joe.jonathan@example.com with your user name.

Orchestration v2 Template

The following is a JSON template for the structure of an orchestration, with the top-level attributes highlighted.

{
  "name": "/Compute-identity_domain/user/orchestration_name",	
  "description": "OrchestrationDescription",
  "desired_state": "state",
  "tags": ["tag-1", "tag-2"],
  "objects": [
    {
      "type": "objectType",
      "description": "ObjectDescription",
      "label": "ObjectLabel",
      "persistent": true,
      "template": {
        attributes  
      }
    },
    {
      "type": "objectType",
      "description": "ObjectDescription",
      "label": "ObjectLabel",
      "persistent": true,
      "template": {
        attributes
      }
    },
    .
    . up to 100 objects
    .
  ]
}

Orchestration v2 Template for Objects

The objects attribute is a top-level attribute in an orchestration. Within this attribute, you can specify one or more objects.

"objects": [
  {
    "type": "ObjectType",
    "description": "ObjectDescriptionHere",
    "label": "ObjectLabel",
    "persistent": true,
    "template": {
                          }
  }
]

Orchestration v2 Sample for Acl

Use this type of object to create an access control list that can be applied to vNICsets in IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "My-access-control-list",
  "type": "Acl",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/Acl-for-vnicset1"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for Backup

Use this type of object to create a backup of a storage volume using a specified backup configuration. See Scheduling Backups of Storage Volumes and Restoring from Backups.

"objects": 
[
 {
  "label": "Backup-from-backup-config-1",
  "type": "Backup",
  "template": 
  {
     "backupConfigurationName": "/Compute-acme/joe.jonathan@example.com/backupConfig-for-vol1",
     "name": "/Compute-acme/joe.jonathan@example.com/backup-1"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for BackupConfiguration

Use this type of object to create a backup configuration. This configuration is used to schedule backups for a specified storage volume. See Scheduling Backups of Storage Volumes and Restoring from Backups.

"objects": 
[
 {
  "label": "Backup-schedule-for-vol1",
  "type": "BackupConfiguration",
  "template": 
   {
    "volumeUri": "http://api-z999.compute.us0.oraclecloud.com/storage/volume/Compute-acme/joe.jonathan@example.com/vol1",
    "name": "/Compute-acme/joe.jonathan@example.com/backupConfig-for-vol1",
    "enabled": false,
    "backupRetentionCount": 2,
    "interval": {
         "Hourly":{"hourlyInterval": 1}
                }
     }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for Instance

Use this type of object to create instances.

"objects": 
[
 {
  "label": "MyInstance",
  "type": "Instance",
  "description": "My instance",
  "template": 
   {
     "shape": "oc3",
     "boot_order": [1],
     "label": "vm-1",
     "networking": {
       "eth0": {
         "seclists": ["/Compute-acme/joe.jonathan@example.com/wlsadmin_seclist"],
         "nat": "ipreservation:/Compute-acme/joe.jonathan@example.com/ipres1"
         },
       "eth1": {
         "ipnetwork" : "/Compute-acme/joe.jonathan@example.com/ipnet-1",
         "ip": "192.168.4.2",
         "vnic": "/Compute-acme/joe.jonathan@example.com/eth1-ipnet1"
         }     
      },
      "sshkeys": ["/Compute-acme/joe.jonathan@example.com/key1"],
      "storage_attachments": [
      {   
         "index": 1,
         "volume": "/Compute-acme/joe.jonathan@example.com/boot"
      }   
      ]
   }
 },  
  <Define other objects here.>
]

Orchestration v2 Sample for IpAddressAssociation

Use this type of object to create an IP association between an IP reservation and a vNIC in an IP network. See Configuring IP Networks.

"objects": 
[
 {
  "label": "IP-Association-for-vnic1-on-instance1",
  "type": "IpAddressAssociation",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/IP-association-vnic1",
    "ipAddressReservation": "/Compute-acme/joe.jonathan@example.com/IPres-for-instance1-vnic1",
	  "vnic": "/Compute-acme/joe.jonathan@example.com/instance1-vnic1"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for IpAddressPrefixSet

Use this type of object to create an IP address prefix set to use in IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "IPaddress-prefix-set-1",
  "type": "IpAddressPrefixSet",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/ext_ip_addresses",
    "ipAddressPrefixes": ["203.0.113.0/30", "192.51.100.1/24"]
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for IpAddressReservation

Use this type of object to reserve an IP address to use in IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "IP-Reservation-for-instance-1-on-IP-network-1",
  "type": "IpAddressReservation",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/IPres-for-instance1-vnic1",
    "ipAddressPool": "/oracle/public/public-ippool"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for IpNetwork

Use this type of object to create IP networks. See About IP Networks.

"objects":
[
 {
  "label": "ipnet1",
  "type": "IpNetwork",
  "description": "My IP network with IP network exchange",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/ipnet1",
    "ipAddressPrefix": "192.168.3.0/24",
    "ipNetworkExchange": "/Compute-acme/joe.jonathan@example.com/ipnetworkexchange1",
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for IpNetworkExchange

Use this type of object to create an IP network exchanges. IP network exchanges are used to connect IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "ipnetworkexchange",
  "type": "IpNetworkExchange",
  "description": "My IP network exchange",
  "template": 
	{
	  "name": "/Compute-acme/joe.jonathan@example.com/ipnetworkexchange1"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for IPReservation

Use this type of object to reserve permanent public IP addresses to use on the shared network. See About Public IP Addresses.

"objects": 
[
 {
  "label": "IP-Reservation",
  "type": "IPReservation",
  "description": "My IP address reservation",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/ipres1",
    "parentpool": "/oracle/public/ippool",
    "permanent": true
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for OSSContainer

Use this type of object to create a container in your associated Oracle Cloud Infrastructure Object Storage Classic account.

"objects": 
[
 {
  "label": "My-OSS-Container",
  "type": "OSSContainer",
  "template": 
  {
    "account": "/Compute-acme/cloud_storage",
    "container": "Container_1",
    "delete_remote": false
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for Restore

Use this type of object to restore a storage volume from a backup created using a backup configuration. See Scheduling Backups of Storage Volumes and Restoring from Backups.

"objects": 
[
 {
  "label": "Restored-vol-1",
  "type": "Restore",
  "template": 
   {
     "name": "/Compute-acme/joe.jonathan@example.com/restored-vol-1",
     "backupName": "/Compute-acme/joe.jonathan@example.com/backup-1",
     "volumeUri": "http://api-z999.compute.us0.oraclecloud.com/storage/volume/Compute-acme/joe.jonathan@example.com/restored-vol-1"
    }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for Route

Use this type of object to create routes to direct traffic across your IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "MyRoute",
  "type": "Route",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/route1",
    "nextHopVnicSet": "/Compute-acme/joe.jonathan@example.com/vnicset1",
    "ipAddressPrefix": "203.0.113.0/24",
    "adminDistance": "0"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for SecApplication

Use this type of object to define security applications for use in security rules in the shared network. See About Security Applications.

"objects": 
[
 {
  "label": "MySecApplication",
  "type": "SecApplication",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/wlsadmin_ssl",
    "dport": 7002,
    "protocol": "tcp"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for SecIPList

Use this type of object to define a set of IP addresses that you want to use as a source in a security rule in the shared network. See About Security IP Lists.

"objects": 
[
 {
  "label": "MySecurityIPList",
  "type": "SecIPList",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/admin_ips",
    "secipentries": ["203.0.113.0/30"]
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for SecList

Use this type of object to define security lists. See About Security Lists.

"objects": 
[
 {
  "label": "MySecurityList",
  "type": "SecList",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/sysadmin_seclist"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for SecRule

Use this type of object to define security rules that control access to your instances in the shared network. See About Security Rules.

"objects": 
[
 {
  "label": "MySecurityRules",
  "type": "SecRule",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/admin_ssh_to_sysadmin_rule",
    "application": "/oracle/public/ssh",
    "src_list": "seciplist:/Compute-acme/joe.jonathan@example.com/admin_ips",
    "dst_list": "seclist:/Compute-acme/joe.jonathan@example.com/sysadmin_seclist",
    "action": "PERMIT"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for SecurityProtocol

Use this type of object to create a security protocol that can be used in a security rule in IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "Security-protocol-for-IP-networks",
  "type": "SecurityProtocol",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/secprotocol_1",
    "description": "Security Protocol 1",
    "ipProtocol": "tcp",
    "srcPortSet": ["10", "55-100"],
    "dstPortSet": ["20", "155-1100"]
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for SecurityRule

Use this type of object to create a security rule that can be used to control traffic to vNICs in IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "IP-network-secrule-1",
  "type": "SecurityRule",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/ipnetSecrule1",
    "acl": "/Compute-acme/joe.jonathan@example.com/acl_1",
    "description": "Security Rule for ACL-1",
    "flowDirection": "egress",
    "secProtocols": ["/Compute-acme/joe.jonathan@example.com/secprotocol_1"],
    "srcIpAddressPrefixSets": ["/Compute-acme/joe.jonathan@example.com/ext_ip_address_list_1"]
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for SSHKey

Use this type of object to add an SSH public key to your account. See Enabling Secure Access to Instances Using SSH.

"objects": 
[
 {
  "label": "My-SSH-key",
  "type": "SSHKey",
  "template": 
   {
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDzU21CEj6JsqIMQAYwNbmZ5P2BVxA...",
    "name": "/Compute-acme/joe.jonathan@example.com/key1"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for StorageAttachment

Use this type of object to attach a storage volume to an instance after the instance has been created.

"objects":
[
 {
  "label": "Attach-vol1-to-instance1",
  "type": "StorageAttachment",
  "template": 
   {
     "index": 1,
     "storage_volume_name": "/Compute-acme/joe.jonathan@example.com/vol1",
     "instance_name": "/Compute-acme/joe.jonathan@example.com/instance1/a6462ba5-5933-41a1-b853-fcfcb421cb07/5fd18f4a-2ac2-4548-a0cf-57774c024742"
    }
  },
  <Define other objects here.>
]

Orchestration v2 Sample for StorageSnapshot

Use this type of object to create a snapshot of a storage volume. See Backing Up and Restoring Storage Volumes Using Snapshots.

"objects": 
[
 {
  "label": "My-Storage-Snapshot",
  "type": "StorageSnapshot",
  "template": 
   {
     "name": "/Compute-acme/joe.jonathan@example.com/vol1-snapshot
     "volume": "/Compute-acme/joe.jonathan@example.com/vol1",
     "property": "/oracle/public/storage/snapshot/default"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for StorageVolume

Use this type of object to create storage volumes that you want to attach to your instances. See About Storage Volumes.

"objects": 
[
 {
  "label": "MyStorageVolume",
  "type": "StorageVolume",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/boot",
    "bootable": true,
    "imagelist": "/oracle/public/oel_6.6_20GB_x11_RD",
    "properties": ["/oracle/public/storage/default"],
    "size": "22548578304"
   }
 },
  <Define other objects here.>
]

Orchestration v2 Sample for VirtualNicSet

Use this type of object to create vNICsets to use in IP networks. See Configuring IP Networks.

"objects": 
[
 {
  "label": "vNICset-1",
  "type": "VirtualNicSet",
  "template": 
  {
    "name": "/Compute-acme/joe.jonathan@example.com/vnicset1",
    "vnics": ["/Compute-acme/joe.jonathan@example.com/vnic1", 
              "/Compute-acme/joe.jonathan@example.com/vnic2"]
   }
 },
  <Define other objects here.>
]