Oracle Cloud Infrastructure · Arazzo Workflow

Oracle Cloud Launch Instance With Attached Volume

Version 1.0.0

Launch a compute instance, poll until it is running, then attach a block volume.

1 workflow 1 source API 1 provider
View Spec View on GitHub Cloud ComputingEnterprise CloudInfrastructure as a ServiceOraclePlatform as a ServiceArazzoWorkflows

Provider

oracle-cloud

Workflows

launch-instance-with-volume
Launch a compute instance, wait for RUNNING, then attach a block volume.
Launches an instance, polls getInstance until the lifecycle state is RUNNING, and attaches the supplied volume to the new instance.
3 steps inputs: availabilityDomain, compartmentId, displayName, imageId, shape, subnetId, volumeId outputs: attachmentId, instanceId, lifecycleState
1
launchInstance
launchInstance
Launch a new compute instance in the requested compartment and availability domain.
2
pollInstance
getInstance
Retrieve the instance and confirm it has reached the RUNNING lifecycle state before attaching storage.
3
attachVolume
attachVolume
Attach the supplied block volume to the now-running instance using a paravirtualized attachment.

Source API Descriptions

Arazzo Workflow Specification

oracle-cloud-launch-instance-with-volume-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Oracle Cloud Launch Instance With Attached Volume
  summary: Launch a compute instance, poll until it is running, then attach a block volume.
  description: >-
    Provisions an Oracle Cloud Infrastructure compute instance end to end. The
    workflow launches a new instance in the requested compartment and
    availability domain, polls the instance until its lifecycle state reaches
    RUNNING, and then attaches an existing block storage volume to the running
    instance. Every step spells out its request inline so the provisioning flow
    can be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: computeApi
  url: ../openapi/oracle-cloud-compute-openapi.yaml
  type: openapi
workflows:
- workflowId: launch-instance-with-volume
  summary: Launch a compute instance, wait for RUNNING, then attach a block volume.
  description: >-
    Launches an instance, polls getInstance until the lifecycle state is
    RUNNING, and attaches the supplied volume to the new instance.
  inputs:
    type: object
    required:
    - compartmentId
    - availabilityDomain
    - shape
    - volumeId
    properties:
      compartmentId:
        type: string
        description: The OCID of the compartment to launch the instance into.
      availabilityDomain:
        type: string
        description: The availability domain (e.g. Uocm:US-ASHBURN-AD-1).
      shape:
        type: string
        description: The compute shape (e.g. VM.Standard.E4.Flex).
      displayName:
        type: string
        description: A user-friendly name for the instance.
      imageId:
        type: string
        description: The OCID of the image to boot from.
      subnetId:
        type: string
        description: The OCID of the subnet to place the primary VNIC in.
      volumeId:
        type: string
        description: The OCID of the block volume to attach once running.
  steps:
  - stepId: launchInstance
    description: >-
      Launch a new compute instance in the requested compartment and
      availability domain.
    operationId: launchInstance
    requestBody:
      contentType: application/json
      payload:
        compartmentId: $inputs.compartmentId
        availabilityDomain: $inputs.availabilityDomain
        shape: $inputs.shape
        displayName: $inputs.displayName
        imageId: $inputs.imageId
        subnetId: $inputs.subnetId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      instanceId: $response.body#/id
      launchState: $response.body#/lifecycleState
  - stepId: pollInstance
    description: >-
      Retrieve the instance and confirm it has reached the RUNNING lifecycle
      state before attaching storage.
    operationId: getInstance
    parameters:
    - name: instanceId
      in: path
      value: $steps.launchInstance.outputs.instanceId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.lifecycleState == "RUNNING"
      type: jsonpath
    outputs:
      lifecycleState: $response.body#/lifecycleState
  - stepId: attachVolume
    description: >-
      Attach the supplied block volume to the now-running instance using a
      paravirtualized attachment.
    operationId: attachVolume
    requestBody:
      contentType: application/json
      payload:
        instanceId: $steps.launchInstance.outputs.instanceId
        volumeId: $inputs.volumeId
        type: paravirtualized
        displayName: $inputs.displayName
        isReadOnly: false
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      attachmentId: $response.body#/id
      attachmentState: $response.body#/lifecycleState
  outputs:
    instanceId: $steps.launchInstance.outputs.instanceId
    lifecycleState: $steps.pollInstance.outputs.lifecycleState
    attachmentId: $steps.attachVolume.outputs.attachmentId