Amazon EC2 Auto Scaling · Arazzo Workflow

Amazon EC2 Auto Scaling Roll Out Instance Refresh

Version 1.0.0

Start an instance refresh on a group and check its progress, branching on status.

1 workflow 1 source API 1 provider
View Spec View on GitHub Amazon Web ServicesAuto ScalingComputeEC2High AvailabilityScalingArazzoWorkflows

Provider

amazon-ec2-auto-scaling

Workflows

roll-out-instance-refresh
Start an instance refresh and inspect its status for an Auto Scaling group.
Starts a rolling instance refresh and describes it, branching on the reported status.
2 steps inputs: autoScalingGroupName, strategy outputs: instanceRefreshId, percentageComplete, refreshStatus
1
startInstanceRefresh
POST_StartInstanceRefresh
Start a rolling instance refresh on the group and capture the refresh ID.
2
describeInstanceRefresh
POST_DescribeInstanceRefreshes
Describe the started instance refresh and branch on whether it is still in progress or has reached a terminal status.

Source API Descriptions

Arazzo Workflow Specification

amazon-ec2-auto-scaling-roll-out-instance-refresh-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EC2 Auto Scaling Roll Out Instance Refresh
  summary: Start an instance refresh on a group and check its progress, branching on status.
  description: >-
    Rolls out a fleet update by starting an instance refresh and monitoring it.
    The workflow starts a rolling instance refresh (capturing the refresh ID),
    then describes that refresh for the group and branches on whether it is still
    in progress or has already reached a terminal status. Every step spells out
    the AWS query-protocol Action and Version inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: autoScalingApi
  url: ../openapi/amazon-ec2-auto-scaling-openapi.yaml
  type: openapi
workflows:
- workflowId: roll-out-instance-refresh
  summary: Start an instance refresh and inspect its status for an Auto Scaling group.
  description: >-
    Starts a rolling instance refresh and describes it, branching on the
    reported status.
  inputs:
    type: object
    required:
    - autoScalingGroupName
    properties:
      autoScalingGroupName:
        type: string
        description: The name of the Auto Scaling group to refresh.
      strategy:
        type: string
        description: The instance refresh strategy. The only valid value is Rolling.
  steps:
  - stepId: startInstanceRefresh
    description: >-
      Start a rolling instance refresh on the group and capture the refresh ID.
    operationId: POST_StartInstanceRefresh
    parameters:
    - name: Action
      in: query
      value: StartInstanceRefresh
    - name: Version
      in: query
      value: 2011-01-01
    requestBody:
      contentType: text/xml
      payload:
        AutoScalingGroupName: $inputs.autoScalingGroupName
        Strategy: $inputs.strategy
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      instanceRefreshId: $response.body#/InstanceRefreshId
  - stepId: describeInstanceRefresh
    description: >-
      Describe the started instance refresh and branch on whether it is still in
      progress or has reached a terminal status.
    operationId: POST_DescribeInstanceRefreshes
    parameters:
    - name: Action
      in: query
      value: DescribeInstanceRefreshes
    - name: Version
      in: query
      value: 2011-01-01
    requestBody:
      contentType: text/xml
      payload:
        AutoScalingGroupName: $inputs.autoScalingGroupName
        InstanceRefreshIds:
        - $steps.startInstanceRefresh.outputs.instanceRefreshId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      refreshStatus: $response.body#/InstanceRefreshes/0/Status
      percentageComplete: $response.body#/InstanceRefreshes/0/PercentageComplete
      instancesToUpdate: $response.body#/InstanceRefreshes/0/InstancesToUpdate
    onSuccess:
    - name: refreshInProgress
      type: end
      criteria:
      - context: $response.body
        condition: $.InstanceRefreshes[0].Status == 'InProgress'
        type: jsonpath
    - name: refreshSettled
      type: end
      criteria:
      - context: $response.body
        condition: $.InstanceRefreshes[0].Status != 'InProgress'
        type: jsonpath
  outputs:
    instanceRefreshId: $steps.startInstanceRefresh.outputs.instanceRefreshId
    refreshStatus: $steps.describeInstanceRefresh.outputs.refreshStatus
    percentageComplete: $steps.describeInstanceRefresh.outputs.percentageComplete