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

essentialworkflows.sf_validate_create_workflow.json Maven / Gradle / Ivy

There is a newer version: 1.0.62
Show newest version
{
  "name": "validateCreateWorkflow",
  "functionDefinition": {
    "Comment": "Check the Users Roles",
    "StartAt": "Check User Role",
    "States": {
      "Check User Role": {
        "Type": "Task",
        "ResultPath": "$.input.checkAuthorization",
        "Resource": "arn:aws:states:::apigateway:invoke",
        "Parameters": {
          "ApiEndpoint": "${var.structureEndpoint}",
          "Path": "/structure/hasAnyRole",
          "Method": "POST",
          "Headers": {
            "Content-Type": [
              "application/json"
            ]
          },
          "RequestBody": {
            "requiredRoles": [
              "ADMIN",
              "UNMANNED"
            ],
            "userRoles.$": "$.query.authorization.roles"
          },
          "AuthType": "IAM_ROLE"
        },
        "Next": "Validate JSON"
      },
      "Validate JSON": {
        "Type": "Task",
        "ResultPath": "$.input.validateJson",
        "Resource": "arn:aws:states:::apigateway:invoke",
        "Parameters": {
          "ApiEndpoint": "${var.structureEndpoint}",
          "Method": "POST",
          "Path": "/structure/validate",
          "Headers": {
            "Content-Type": [
              "application/json"
            ]
          },
          "RequestBody": {
            "type": "workflow",
            "workflow": "validateCreateWorkflow",
            "query.$": "$.query",
            "schema": {
              "$schema": "http://json-schema.org/draft-04/schema#",
              "title": "validateCreateWorkflow",
              "description": "validateCreateWorkflow",
              "type": "object",
              "properties": {
                "name": {
                  "description": "workflow name",
                  "type": "string"
                },
                "functionSource": {
                  "description": "function English source",
                  "type": "string"
                },
                "functionDefinition": {
                  "description": "function state machine definition",
                  "type": "object"
                }
              },
              "required": [
                "name"
              ],
              "unique": []
            }
          },
          "AuthType": "IAM_ROLE"
        },
        "Next": "Check Acceptable Transformation"
      },
      "Check Acceptable Transformation": {
        "Type": "Task",
        "ResultPath": "$.input.checkAcceptableTransformation",
        "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"
        },
        "End": true
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy