Amazon EC2 Image Builder · Arazzo Workflow

Amazon EC2 Image Builder Inspect Latest Pipeline Image

Version 1.0.0

List the images a pipeline has produced and read the full detail of the most recent one.

1 workflow 1 source API 1 provider
View Spec View on GitHub Amazon Web ServicesAutomationContainer ImagesEC2Image BuildingVirtual Machine ImagesArazzoWorkflows

Provider

amazon-ec2-image-builder

Workflows

inspect-latest-pipeline-image
List a pipeline's images and read the detail of the first one returned.
Lists the images produced by a pipeline, then reads the first image from the summary list to return its full detail.
2 steps inputs: imagePipelineArn, maxResults outputs: latestImageArn, outputResources, status
1
listPipelineImages
ListImagePipelineImages
Return the list of images created by the specified pipeline so the most recent one can be selected.
2
getImage
GetImage
Read the first image from the summary list to return its full detail.

Source API Descriptions

Arazzo Workflow Specification

amazon-ec2-image-builder-inspect-latest-pipeline-image-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EC2 Image Builder Inspect Latest Pipeline Image
  summary: List the images a pipeline has produced and read the full detail of the most recent one.
  description: >-
    Surfaces the newest image a pipeline has built and returns its complete
    record. The workflow lists the images created by a given pipeline, takes the
    ARN of the first image in the returned summary list, and reads that image to
    return its full state, recipe, and output resources. 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: imageBuilderApi
  url: ../openapi/amazon-ec2-image-builder-openapi.yaml
  type: openapi
workflows:
- workflowId: inspect-latest-pipeline-image
  summary: List a pipeline's images and read the detail of the first one returned.
  description: >-
    Lists the images produced by a pipeline, then reads the first image from the
    summary list to return its full detail.
  inputs:
    type: object
    required:
    - imagePipelineArn
    properties:
      imagePipelineArn:
        type: string
        description: The ARN of the image pipeline whose images you want to view.
      maxResults:
        type: integer
        description: The maximum number of images to return in the list request.
        default: 1
  steps:
  - stepId: listPipelineImages
    description: >-
      Return the list of images created by the specified pipeline so the most
      recent one can be selected.
    operationId: ListImagePipelineImages
    requestBody:
      contentType: application/json
      payload:
        imagePipelineArn: $inputs.imagePipelineArn
        maxResults: $inputs.maxResults
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      latestImageArn: $response.body#/imageSummaryList/0/arn
      latestImageStatus: $response.body#/imageSummaryList/0/state/status
  - stepId: getImage
    description: >-
      Read the first image from the summary list to return its full detail.
    operationId: GetImage
    parameters:
    - name: imageBuildVersionArn
      in: query
      value: $steps.listPipelineImages.outputs.latestImageArn
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      imageArn: $response.body#/image/arn
      imageName: $response.body#/image/name
      status: $response.body#/image/state/status
      outputResources: $response.body#/image/outputResources
  outputs:
    latestImageArn: $steps.listPipelineImages.outputs.latestImageArn
    status: $steps.getImage.outputs.status
    outputResources: $steps.getImage.outputs.outputResources