essentialworkflows.sf_validate_delete_structureDefinition.json Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-structure-client Show documentation
Show all versions of common-structure-client Show documentation
structure Client for Five Faces
{
"name": "validateDeleteStructureDefinition",
"functionDefinition": {
"Comment": "Validate Delete Structure Definition",
"StartAt": "Check User Role",
"States": {
"Check User Role": {
"Type": "Task",
"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"
},
"ResultPath": "$.input.checkAuthorization",
"Next": "Validate JSON"
},
"Validate JSON": {
"Type": "Task",
"Resource": "arn:aws:states:::apigateway:invoke",
"Parameters": {
"ApiEndpoint": "${var.structureEndpoint}",
"Method": "POST",
"Path": "/structure/validate",
"Headers": {
"Content-Type": [
"application/json"
]
},
"RequestBody": {
"workflow": "validateDeleteStructureDefinition",
"query.$": "$.query",
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "validateDeleteStructureDefinition",
"description": "validateDeleteStructureDefinition",
"type": "object",
"properties": {
"id": {
"description": "id",
"type": "string",
"minLength": 1
}
},
"required": [
"id"
]
}
},
"AuthType": "IAM_ROLE"
},
"End": true
}
}
}
}