All Downloads are FREE. Search and download functionalities are using the official Maven repository.

essentialworkflows.sf_update_workflow.json Maven / Gradle / Ivy

The newest version!
{
  "name": "updateWorkflow",
  "allowedRoles": ["ADMIN", "UNMANNED"],
  "workflowVersion": 1,
  "functionDefinition": {
    "Comment": "A description of my state machine",
    "StartAt": "Validate Update Workflow",
    "States": {
      "Validate Update Workflow": {
        "Type": "Task",
        "Resource": "arn:aws:states:::states:startExecution.sync",
        "Parameters": {
          "StateMachineArn": "arn:aws:states:ap-southeast-2:705130463218:stateMachine:${var.environment}_validateUpdateWorkflow",
          "Input": {
            "NeedCallback ": true,
            "query.$": "$.query",
            "AWS_STEP_FUNCTIONS_STARTED_BY_EXECUTION_ID.$": "$$.Execution.Id"
          }
        },
        "Next": "Transform Workflow",
        "ResultPath": "$.input.validateUpdateWorkflow"
      },
      "Transform Workflow": {
        "Type": "Task",
        "ResultPath": "$.input.transformWorkflow",
        "Resource": "arn:aws:states:::apigateway:invoke",
        "Parameters": {
          "ApiEndpoint": "${var.structureEndpoint}",
          "Path": "/structure/transform-workflow-definition",
          "Method": "POST",
          "Headers": {
            "Content-Type": [
              "application/json"
            ]
          },
          "RequestBody": {
            "query.$": "$.query"
          },
          "AuthType": "IAM_ROLE"
        },
        "Next": "Update Workflow"
      },
      "Update Workflow": {
        "Type": "Task",
        "Resource": "arn:aws:states:::apigateway:invoke",
        "Parameters": {
          "ApiEndpoint": "${var.structureEndpoint}",
          "Path": "/structure/update",
          "Method": "POST",
          "Headers": {
            "Content-Type": [
              "application/json"
            ]
          },
          "RequestBody": {
            "username.$": "$.query.authorization.username",
            "type": "workflow",
            "id.$": "$.query.id",
            "version.$": "$.query.version",
            "query.$": "$.input.transformWorkflow.ResponseBody.query"
          },
          "AuthType": "IAM_ROLE"
        },
        "End": true
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy