--- swagger: "2.0" info: version: "2022-10-19T13:01:35Z" title: "${title}" schemes: - "https" paths: paths: /invoke: post: consumes: - "application/json" - "application/xml" produces: - "application/json" responses: "200": description: "200 response" x-amazon-apigateway-integration: credentials: "${api_gateway_step_functions_role_arn}" httpMethod: "ANY" uri: "arn:aws:apigateway:${aws_region}:states:action/StartExecution" responses: default: statusCode: "200" responseTemplates: application/json: "## See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n\ ## This template will pass through all parameters including path,\ \ querystring, header, stage variables, and context through to the\ \ integration endpoint via the body/payload\n#set($allParams = $input.params())\n\ {\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type\ \ in $allParams.keySet())\n #set($params = $allParams.get($type))\n\ \"$type\" : {\n #foreach($paramName in $params.keySet())\n \"\ $paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\ \n #if($foreach.hasNext),#end\n #end\n}\n #if($foreach.hasNext),#end\n\ #end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\ \"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n\ \ #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n \"\ account-id\" : \"$context.identity.accountId\",\n \"api-id\" :\ \ \"$context.apiId\",\n \"api-key\" : \"$context.identity.apiKey\"\ ,\n \"authorizer-principal-id\" : \"$context.authorizer.principalId\"\ ,\n \"caller\" : \"$context.identity.caller\",\n \"cognito-authentication-provider\"\ \ : \"$context.identity.cognitoAuthenticationProvider\",\n \"cognito-authentication-type\"\ \ : \"$context.identity.cognitoAuthenticationType\",\n \"cognito-identity-id\"\ \ : \"$context.identity.cognitoIdentityId\",\n \"cognito-identity-pool-id\"\ \ : \"$context.identity.cognitoIdentityPoolId\",\n \"http-method\"\ \ : \"$context.httpMethod\",\n \"stage\" : \"$context.stage\",\n\ \ \"source-ip\" : \"$context.identity.sourceIp\",\n \"user\"\ \ : \"$context.identity.user\",\n \"user-agent\" : \"$context.identity.userAgent\"\ ,\n \"user-arn\" : \"$context.identity.userArn\",\n \"request-id\"\ \ : \"$context.requestId\",\n \"resource-id\" : \"$context.resourceId\"\ ,\n \"resource-path\" : \"$context.resourcePath\"\n }\n}\n" requestTemplates: application/xml: "#set($body= $input.json('$'))\n#set($inputRoot='{ \"xmlPayload\"\ : ' + $body + ' }')\n#set($statesData=$util.escapeJavaScript($inputRoot))\n\ {\n \"input\": \"$statesData\",\n \"stateMachineArn\": \"${state_machine_arn}\"\ \ \n}" application/json: "#set($body= $input.json('$'))\n#set($inputRoot='{ \"\ xmlPayload\": ' + $body + ' }')\n#set($statesData=$util.escapeJavaScript($inputRoot))\n\ {\n \"input\": \"$statesData\",\n \"stateMachineArn\": \"${state_machine_arn}\"\ \ \n}" passthroughBehavior: "when_no_templates" type: "aws"