Amazon EBS · Arazzo Workflow

Amazon EBS Detach and Delete Volume

Version 1.0.0

Detach an EBS volume from its instance, confirm it, then delete it.

1 workflow 1 source API 1 provider
View Spec View on GitHub Amazon Web ServicesBlock StorageEBSEC2SnapshotsStorageVolumesArazzoWorkflows

Provider

amazon-ebs

Workflows

detach-and-delete-volume
Detach an EBS volume and delete it once it is no longer attached.
Detaches the supplied volume, confirms its state via describe, and deletes the volume to reclaim storage.
3 steps inputs: force, instanceId, volumeId outputs: deletedVolumeId, finalVolumes
1
detachVolume
detachVolume
Detach the supplied volume from its instance.
2
confirmDetached
describeVolumes
Read the volume back to confirm it is detached before deleting it.
3
deleteVolume
deleteVolume
Delete the volume to reclaim its storage.

Source API Descriptions

Arazzo Workflow Specification

amazon-ebs-detach-and-delete-volume-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EBS Detach and Delete Volume
  summary: Detach an EBS volume from its instance, confirm it, then delete it.
  description: >-
    A teardown counterpart to the provisioning flows, adapted to the EC2-style
    EBS operations the spec actually supports. It detaches the supplied volume
    from its instance, reads the volume back to confirm it is no longer in use,
    and then deletes the volume. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: amazonEbsApi
  url: ../openapi/amazon-ebs-openapi.yml
  type: openapi
workflows:
- workflowId: detach-and-delete-volume
  summary: Detach an EBS volume and delete it once it is no longer attached.
  description: >-
    Detaches the supplied volume, confirms its state via describe, and deletes
    the volume to reclaim storage.
  inputs:
    type: object
    required:
    - volumeId
    properties:
      volumeId:
        type: string
        description: The ID of the volume to detach and delete.
      instanceId:
        type: string
        description: The ID of the instance the volume is attached to.
      force:
        type: boolean
        description: Forces detachment if a previous attempt did not occur cleanly.
  steps:
  - stepId: detachVolume
    description: >-
      Detach the supplied volume from its instance.
    operationId: detachVolume
    parameters:
    - name: Action
      in: query
      value: DetachVolume
    - name: Version
      in: query
      value: '2016-11-15'
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        VolumeId: $inputs.volumeId
        InstanceId: $inputs.instanceId
        Force: $inputs.force
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      statusCode: $statusCode
  - stepId: confirmDetached
    description: >-
      Read the volume back to confirm it is detached before deleting it.
    operationId: describeVolumes
    parameters:
    - name: Action
      in: query
      value: DescribeVolumes
    - name: Version
      in: query
      value: '2016-11-15'
    - name: VolumeId
      in: query
      value: $inputs.volumeId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      volumes: $response.body#/volumeSet
  - stepId: deleteVolume
    description: >-
      Delete the volume to reclaim its storage.
    operationId: deleteVolume
    parameters:
    - name: Action
      in: query
      value: DeleteVolume
    - name: Version
      in: query
      value: '2016-11-15'
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        VolumeId: $inputs.volumeId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      statusCode: $statusCode
  outputs:
    deletedVolumeId: $inputs.volumeId
    finalVolumes: $steps.confirmDetached.outputs.volumes