{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/latest.json",
  "title": "ServerlessFrameworkConfiguration",
  "description": "Schema for serverless framework configuration files",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/reference.json",
    "sourceSha256": "12ee219bd08003f532cc8cb4d371032a1b0cd8ad5cc113e80c34c3f2deb11fa4",
    "fileMatch": [
      "serverless.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "app": {
      "type": "string"
    },
    "custom": {
      "$ref": "#/$defs/ServerlessCustom"
    },
    "frameworkVersion": {
      "type": "string"
    },
    "functions": {
      "$ref": "#/$defs/AwsFunctions"
    },
    "layers": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--layers.json#/AwsLayers"
    },
    "org": {
      "type": "string"
    },
    "package": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--common.json#/AwsPackage"
    },
    "plugins": {
      "oneOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "title": "LocalPlugin",
          "type": "object",
          "properties": {
            "localPath": {
              "description": "The path to the local .js file that contains the plugin",
              "type": "string"
            },
            "modules": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      ]
    },
    "provider": {
      "$ref": "#/$defs/AwsProvider"
    },
    "resources": {
      "oneOf": [
        {
          "$ref": "#/$defs/ServerlessFrameworkResources"
        },
        {
          "items": {
            "$ref": "#/$defs/ServerlessFrameworkResources"
          },
          "type": "array"
        }
      ]
    },
    "service": {
      "oneOf": [
        {
          "$ref": "#/$defs/ServerlessServiceConfiguration"
        },
        {
          "type": "string"
        }
      ]
    },
    "tenant": {
      "type": "string"
    },
    "stepFunctions": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--step_functions.json#/AwsStepFunctions"
    }
  },
  "fileMatch": [
    "serverless.yml",
    "serverless.yaml"
  ],
  "required": [
    "provider",
    "service"
  ],
  "$defs": {
    "Transform": {
      "type": "object",
      "oneOf": [
        {
          "$comment": "You can use the AWS::Include transform anywhere within the AWS CloudFormation template except in the template parameters section or the template version field. For example, you can use AWS::Include in the mappings section.",
          "properties": {
            "Name": {
              "type": "string",
              "enum": [
                "AWS::Include"
              ]
            },
            "Parameters": {
              "type": "object",
              "properties": {
                "Location": {
                  "$comment": "The location is an Amazon S3 URI, with a specific file name in an S3 bucket. For example, s3://MyBucketName/MyFile.yaml.",
                  "type": "string",
                  "format": "uri"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false,
          "type": "object"
        },
        {
          "$comment": "Use a transform to simplify template authoring for serverless applications. ",
          "type": "string",
          "enum": [
            "AWS::CodeDeployBlueGreen",
            "AWS::CodeStar",
            "AWS::SecretsManager-2020-07-23",
            "AWS::Serverless-2016-10-31"
          ]
        }
      ]
    },
    "AwsAlexaSmartHome": {
      "properties": {
        "appId": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "AwsApiGateway": {
      "properties": {
        "apiKeySourceType": {
          "type": "string",
          "enum": [
            "HEADER",
            "AUTHORIZER"
          ]
        },
        "binaryMediaTypes": {
          "description": "Optional binary media types the API might return",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "description": {
          "type": "string"
        },
        "minimumCompressionSize": {
          "type": "number",
          "minimum": 0,
          "maximum": 10485760
        },
        "restApiId": {
          "type": "string"
        },
        "restApiResources": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "restApiRootResourceId": {
          "type": "string"
        },
        "websocketApiId": {
          "type": "string"
        },
        "disableDefaultEndpoint": {
          "description": "Disable the default 'execute-api' HTTP endpoint (default: false)",
          "type": "boolean"
        },
        "apiKeys": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "customerId": {
                    "type": "string"
                  },
                  "enabled": {
                    "description": "Can be used to disable the API key without removing it (default: true)",
                    "type": "boolean"
                  }
                }
              }
            ]
          }
        },
        "metrics": {
          "type": "boolean"
        },
        "shouldStartNameWithService": {
          "description": "Use `${service}-${stage}` naming for API Gateway. Will be `true` by default in v3.",
          "type": "boolean"
        },
        "usagePlan": {
          "type": "object",
          "properties": {
            "quota": {
              "type": "object",
              "properties": {
                "limit": {
                  "type": "number"
                },
                "offset": {
                  "type": "number"
                },
                "period": {
                  "type": "string"
                }
              }
            },
            "throttle": {
              "type": "object",
              "properties": {
                "burstLimit": {
                  "type": "number"
                },
                "rateLimit": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "type": "object"
    },
    "AwsFunction": {
      "properties": {
        "awsKmsKeyArn": {
          "type": "string"
        },
        "condition": {
          "type": "string"
        },
        "dependsOn": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "description": {
          "type": "string"
        },
        "destinations": {
          "$ref": "#/$defs/AwsDestinations"
        },
        "environment": {
          "$ref": "#/$defs/AwsEnvironment"
        },
        "events": {
          "items": {
            "$ref": "#/$defs/AwsEvent"
          },
          "type": "array"
        },
        "handler": {
          "type": "string"
        },
        "layers": {
          "description": "Collection of Lambda layers to make it available for this lambda. Can use Cloudformation here as well. Usage on:- <https://www.serverless.com/framework/docs/providers/aws/guide/layers#using-your-layers>",
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnRef"
              },
              {
                "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnGetAtt"
              },
              {
                "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnJoin"
              },
              {
                "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnTransform"
              },
              {
                "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnFindInMap"
              }
            ]
          },
          "type": "array"
        },
        "memorySize": {
          "type": [
            "string",
            "number"
          ]
        },
        "name": {
          "type": "string"
        },
        "onError": {
          "type": "string"
        },
        "package": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--common.json#/AwsPackage"
        },
        "provisionedConcurrency": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnIf"
            }
          ]
        },
        "reservedConcurrency": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnIf"
            }
          ]
        },
        "role": {
          "type": "string"
        },
        "runtime": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--lambda.json#/AwsRuntime"
        },
        "tags": {
          "$ref": "#/$defs/AwsTags"
        },
        "timeout": {
          "type": [
            "string",
            "number"
          ]
        },
        "tracing": {
          "type": "string"
        },
        "vpc": {
          "$ref": "#/$defs/AwsVpc"
        },
        "image": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "uri": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "workingDirectory": {
                  "type": "string"
                },
                "command": {
                  "description": "Sometimes it appears that command from the dockerfile is not read and we have to overwrite it manually to make it work. One of my clients faced this recently",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "entryPoint": {
                  "description": "Sometimes it appears that { from the dockerfile is not read and we have to overwrite it manually to make it work",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          ]
        },
        "snapStart": {
          "type": "boolean",
          "description": "<https://www.serverless.com/framework/docs/providers/aws/guide/functions#snapstart>"
        },
        "logDataProtectionPolicy": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cloudwatch.json#/LogDataProtectionPolicy"
        },
        "runtimeManagement": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--lambda.json#/AwsLambdaRuntimeManagement"
        }
      },
      "type": "object"
    },
    "AwsCloudFront": {
      "properties": {
        "eventType": {
          "type": "string"
        },
        "includeBody": {
          "type": "boolean"
        },
        "origin": {
          "$ref": "#/$defs/AwsOrigin"
        },
        "pathPattern": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsCloudwatchLog": {
      "properties": {
        "filter": {
          "type": "string"
        },
        "logGroup": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsCognitoUserPool": {
      "properties": {
        "existing": {
          "type": "boolean"
        },
        "pool": {
          "type": "string"
        },
        "trigger": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ServerlessCustom": {
      "properties": {
        "pythonRequirements": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--python_requirements.json#/PythonRequirements"
        },
        "wsgi": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--python_wsgi.json#/PythonWsgi"
        },
        "prune": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--prune.json#/Prune"
        },
        "esbuild": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--esbuild.json#/Esbuild"
        },
        "splitStacks": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--split_stacks.json#/SplitStacks"
        },
        "webpack": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--webpack.json#/WebpackConfiguration"
        },
        "ssmPublish": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--ssm_publish.json#/SsmPublishConfiguration"
        }
      },
      "type": "object",
      "additionalProperties": true
    },
    "AwsDeploymentBucket": {
      "description": "Configure the S3 bucket used by Serverless Framework to deploy code packages to Lambda",
      "properties": {
        "blockPublicAccess": {
          "description": "Prevents public access via ACLs or bucket policies (default: false). Note: the deployment bucket is not public by default. These are additional ACLs.",
          "type": "boolean"
        },
        "maxPreviousDeploymentArtifacts": {
          "description": "On deployment, serverless prunes artifacts older than this limit (default: 5)",
          "type": [
            "string",
            "number"
          ]
        },
        "name": {
          "description": "Name of an existing bucket to use (default: created by serverless)",
          "type": "string"
        },
        "serverSideEncryption": {
          "type": "string"
        },
        "sseCustomerAlgorithim": {
          "type": "string"
        },
        "sseCustomerKey": {
          "type": "string"
        },
        "sseCustomerKeyMD5": {
          "type": "string"
        },
        "sseKMSKeyId": {
          "type": "string"
        },
        "tags": {
          "$ref": "#/$defs/AwsTags"
        },
        "skipPolicySetup": {
          "description": "Skip the creation of a default bucket policy when the deployment bucket is created (default: false)",
          "type": "boolean"
        },
        "versioning": {
          "description": "Enable bucket versioning (default: false)",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "AwsDestinations": {
      "properties": {
        "onFailure": {
          "type": "string"
        },
        "onSuccess": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsDetail": {
      "type": "object",
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      }
    },
    "AwsEnvironment": {
      "type": "object",
      "additionalProperties": {}
    },
    "AwsEvent": {
      "properties": {
        "activemq": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--events.json#/AwsActiveMq"
        },
        "alb": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--events.json#/AwsAlbEvent"
        },
        "alexaSkill": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--events.json#/AwsAlexaSkill"
        },
        "alexaSmartHome": {
          "$ref": "#/$defs/AwsAlexaSmartHome"
        },
        "cloudFront": {
          "$ref": "#/$defs/AwsCloudFront"
        },
        "cloudwatchEvent": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--events.json#/AwsCloudwatchEvent"
        },
        "cloudwatchLog": {
          "$ref": "#/$defs/AwsCloudwatchLog"
        },
        "cognitoUserPool": {
          "$ref": "#/$defs/AwsCognitoUserPool"
        },
        "eventBridge": {
          "$ref": "#/$defs/AwsEventBridge"
        },
        "http": {
          "$ref": "#/$defs/AwsHttp"
        },
        "httpApi": {
          "$ref": "#/$defs/AwsHttpApiEvent"
        },
        "iot": {
          "$ref": "#/$defs/AwsIot"
        },
        "s3": {
          "$ref": "#/$defs/AwsS3"
        },
        "schedule": {
          "anyOf": [
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--events.json#/AwsScheduleEvent"
            },
            {
              "type": "string"
            }
          ]
        },
        "sns": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--events.json#/AwsSns"
        },
        "sqs": {
          "anyOf": [
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--events.json#/AwsSqs"
            },
            {
              "type": "string"
            }
          ]
        },
        "stream": {
          "$ref": "#/$defs/AwsStream"
        },
        "websocket": {
          "$ref": "#/$defs/AwsWebsocket"
        }
      },
      "type": "object"
    },
    "AwsEventBridge": {
      "title": "AwsEventBridge",
      "description": "Aws Lambda function Eventbridge event source",
      "properties": {
        "eventBus": {
          "type": "string",
          "minLength": 1
        },
        "schedule": {
          "type": "string",
          "pattern": "^(?:cron|rate)\\(.+\\)$"
        },
        "name": {
          "type": "string",
          "pattern": "[a-zA-Z0-9-_.]+",
          "minLength": 1,
          "maxLength": 64
        },
        "enabled": {
          "type": "boolean",
          "default": true
        },
        "pattern": {
          "anyOf": [
            {
              "$ref": "#/$defs/AwsPatternExisting"
            },
            {
              "$ref": "#/$defs/AwsPatternInput"
            }
          ]
        },
        "input": {
          "type": "object"
        },
        "inputPath": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "inputTransformer": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--common.json#/AwsInputTransformer"
        },
        "retryPolicy": {
          "type": "object",
          "properties": {
            "maximumEventAge": {
              "type": "number",
              "minimum": 60,
              "maximum": 86400
            },
            "maximumRetryAttempts": {
              "type": "number",
              "minimum": 0,
              "maximum": 185
            }
          }
        }
      },
      "type": "object",
      "anyOf": [
        {
          "required": [
            "pattern"
          ]
        },
        {
          "required": [
            "schedule"
          ]
        }
      ]
    },
    "AwsFunctions": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AwsFunction"
          }
        },
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ServerlessFilePath"
          }
        }
      ]
    },
    "AwsHttp": {
      "oneOf": [
        {
          "properties": {
            "async": {
              "type": "boolean"
            },
            "authorizer": {
              "$ref": "#/$defs/AwsHttpAuthorizer"
            },
            "cors": {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--api.gateway.v1.json#/AwsHttpCors"
            },
            "method": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "private": {
              "type": "boolean"
            },
            "request": {
              "$ref": "#/$defs/AwsHttpRequestValidation"
            }
          },
          "type": "object"
        },
        {
          "type": "string",
          "enum": [
            "ANY /",
            "GET /",
            "POST /",
            "PUT /",
            "PATCH /",
            "OPTIONS /",
            "HEAD /",
            "DELETE /",
            "ANY /{proxy+}",
            "GET /{proxy+}",
            "POST /{proxy+}",
            "PUT /{proxy+}",
            "PATCH /{proxy+}",
            "OPTIONS /{proxy+}",
            "HEAD /{proxy+}",
            "DELETE /{proxy+}"
          ]
        }
      ]
    },
    "AwsHttpApiEvent": {
      "oneOf": [
        {
          "properties": {
            "authorizer": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AwsNamedHttpApiEventAuthorizer"
                },
                {
                  "$ref": "#/$defs/AwsIdRefHttpApiEventAuthorizer"
                }
              ]
            },
            "method": {
              "type": "string"
            },
            "path": {
              "type": "string"
            }
          },
          "type": "object"
        },
        {
          "type": "string",
          "minLength": 1
        }
      ]
    },
    "AwsHttpApiLogs": {
      "properties": {
        "format": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsHttpAuthorizer": {
      "anyOf": [
        {
          "title": "AwsHttpIamAuthorizerShort",
          "description": "AWS_IAM based authorizer, <https://www.serverless.com/framework/docs/providers/aws/events/apigateway#http-endpoints-with-aws_iam-authorizers>",
          "type": "string",
          "enum": [
            "aws_iam"
          ]
        },
        {
          "title": "AwsHttpIamAuthorizer",
          "description": "AWS_IAM based authorizer, <https://www.serverless.com/framework/docs/providers/aws/events/apigateway#http-endpoints-with-aws_iam-authorizers>",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "aws_iam"
              ]
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "title": "AwsHttpCognitoAuthorizer",
          "properties": {
            "arn": {
              "type": "string",
              "description": "The arn of the cognito user pool"
            },
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "claims": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "type": {
              "type": "string",
              "enum": [
                "COGNITO_USER_POOLS"
              ]
            },
            "identitySource": {
              "type": "string",
              "default": "method.request.header.Authorization",
              "description": "The identity source for which authorization is requested. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name"
            },
            "identityValidationExpression": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "resultTtlInSeconds": {
              "type": "number",
              "minimum": 0,
              "maximum": 3600
            }
          },
          "required": [
            "type",
            "arn"
          ],
          "additionalProperties": false,
          "type": "object"
        },
        {
          "title": "AwsHttpLambdaAuthorizer",
          "type": "object",
          "properties": {
            "arn": {
              "type": "string"
            },
            "identitySource": {
              "type": "string",
              "default": "method.request.header.Authorization",
              "description": "The identity source for which authorization is requested. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is `method.request.header.Auth, method.request.querystring.Name`"
            },
            "identityValidationExpression": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "resultTtlInSeconds": {
              "type": "number",
              "minimum": 0,
              "maximum": 3600
            },
            "type": {
              "type": "string",
              "enum": [
                "request",
                "token",
                "REQUEST",
                "TOKEN"
              ],
              "default": "token"
            }
          },
          "oneOf": [
            {
              "required": [
                "arn"
              ]
            },
            {
              "required": [
                "name"
              ]
            }
          ],
          "additionalProperties": false
        },
        {
          "title": "AwsHttpExistingAuthorizer",
          "description": "Use an existing Api Gateway Authorizer created outside or in the same stack",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "CUSTOM"
              ]
            },
            "authorizerId": {
              "type": "string",
              "description": "The Id of the existing authorizer"
            }
          },
          "required": [
            "type",
            "authorizerId"
          ],
          "additionalProperties": false
        }
      ]
    },
    "AwsHttpRequestParametersValidation": {
      "properties": {
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "paths": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "querystrings": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        }
      },
      "type": "object"
    },
    "AwsHttpRequestValidation": {
      "properties": {
        "parameters": {
          "$ref": "#/$defs/AwsHttpRequestParametersValidation"
        },
        "schema": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "type": "object"
    },
    "AwsIdRefHttpApiEventAuthorizer": {
      "properties": {
        "id": {
          "type": "string"
        },
        "scopes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AwsIot": {
      "properties": {
        "description": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "sql": {
          "type": "string"
        },
        "sqlVersion": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsLogs": {
      "properties": {
        "frameworkLambda": {
          "type": "boolean"
        },
        "httpApi": {
          "anyOf": [
            {
              "$ref": "#/$defs/AwsHttpApiLogs"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "restApi": {
          "$ref": "#/$defs/AwsRestApiLogs"
        },
        "websocket": {
          "$ref": "#/$defs/AwsWebsocketLogs"
        }
      },
      "type": "object"
    },
    "AwsNamedHttpApiEventAuthorizer": {
      "properties": {
        "name": {
          "type": "string"
        },
        "scopes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AwsOrigin": {
      "properties": {
        "CustomOriginConfig": {
          "properties": {
            "OriginProtocolPolicy": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "DomainName": {
          "type": "string"
        },
        "OriginPath": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsPatternExisting": {
      "properties": {
        "source": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AwsPatternInput": {
      "properties": {
        "detail": {
          "$ref": "#/$defs/AwsDetail"
        },
        "detail-type": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "source": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AwsProvider": {
      "title": "AwsProvider",
      "description": "Configuration for Serverless AWS ",
      "type": "object",
      "properties": {
        "alb": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--alb.json#/AwsAlb"
        },
        "ecr": {
          "type": "object",
          "properties": {
            "scanOnPush": {
              "description": "Enabling this will make AWS scan image for CVE(Common Vulnerabilities and Exposures)",
              "type": "boolean"
            },
            "images": {
              "type": "object",
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "uri": {
                        "description": "URI of an existing Docker image in ECR",
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "path": {
                        "description": "Path to the Docker context that will be used when building that image locally (default: '.')",
                        "type": "string"
                      },
                      "file": {
                        "type": "string",
                        "description": "Dockerfile that will be used when building the image locally (default: 'Dockerfile')"
                      },
                      "buildArgs": {
                        "type": "object"
                      },
                      "cacheFrom": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "apiGateway": {
          "$ref": "#/$defs/AwsApiGateway"
        },
        "apiKeys": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "apiName": {
          "description": "Change this to use a custom name for the API Gateway API",
          "type": "string"
        },
        "cfnRole": {
          "type": "string"
        },
        "deploymentBucket": {
          "$ref": "#/$defs/AwsDeploymentBucket"
        },
        "deploymentPrefix": {
          "type": "string"
        },
        "endpointType": {
          "enum": [
            "EDGE",
            "PRIVATE",
            "REGIONAL"
          ],
          "type": "string"
        },
        "environment": {
          "$ref": "#/$defs/AwsEnvironment"
        },
        "httpApi": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--api.gateway.v2.json#/AwsHttpApi"
        },
        "iam": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--iam.json#/AwsIamConfiguration"
        },
        "iamManagedPolicies": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "iamRoleStatements": {
          "items": {
            "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--iam.json#/AwsIamRoleStatement"
          },
          "type": "array"
        },
        "logRetentionInDays": {
          "type": [
            "string",
            "number"
          ]
        },
        "logs": {
          "$ref": "#/$defs/AwsLogs"
        },
        "memorySize": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "description": "Note: API Gateway has a maximum timeout of 30 seconds",
              "type": "number",
              "minimum": 128,
              "maximum": 10240
            }
          ],
          "type": [
            "string",
            "number"
          ]
        },
        "name": {
          "enum": [
            "aws"
          ],
          "type": "string"
        },
        "notificationArns": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "profile": {
          "type": "string"
        },
        "region": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--common.json#/AwsRegion"
        },
        "reservedConcurrency": {
          "type": [
            "string",
            "number"
          ]
        },
        "resourcePolicy": {
          "items": {
            "$ref": "#/$defs/AwsResourcePolicy"
          },
          "type": "array"
        },
        "role": {
          "type": "string"
        },
        "rolePermissionsBoundary": {
          "type": "string"
        },
        "rollbackConfiguration": {
          "$ref": "#/$defs/AwsRollbackConfiguration"
        },
        "runtime": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--lambda.json#/AwsRuntime"
        },
        "stackName": {
          "type": "string"
        },
        "stackParameters": {
          "items": {
            "$ref": "#/$defs/AwsStackParameters"
          },
          "type": "array"
        },
        "stackPolicy": {
          "items": {
            "$ref": "#/$defs/AwsResourcePolicy"
          },
          "type": "array"
        },
        "stackTags": {
          "$ref": "#/$defs/AwsTags"
        },
        "stage": {
          "type": "string"
        },
        "tags": {
          "$ref": "#/$defs/AwsTags"
        },
        "timeout": {
          "type": [
            "string",
            "number"
          ]
        },
        "tracing": {
          "$ref": "#/$defs/AwsTracing"
        },
        "usagePlan": {
          "$ref": "#/$defs/AwsUsagePlan"
        },
        "versionFunctions": {
          "description": "Use function versioning (enabled by default)",
          "type": "boolean"
        },
        "architecture": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--common.json#/AwsSupportedArchitecture"
        },
        "vpc": {
          "$ref": "#/$defs/AwsVpc"
        },
        "websocketsApiName": {
          "type": "string"
        },
        "websocketsApiRouteSelectionExpression": {
          "type": "string"
        },
        "websocketsDescription": {
          "type": "string"
        },
        "deploymentMethod": {
          "description": "Method used for CloudFormation deployments: 'changesets' or 'direct' (default: changesets). See <https://www.serverless.com/framework/docs/providers/aws/guide/deploying#deployment-method>",
          "type": "string",
          "enum": [
            "direct",
            "changesets"
          ]
        },
        "disableRollback": {
          "type": "boolean",
          "description": "Disable automatic rollback by CloudFormation on failure. To be used for non-production environments."
        },
        "logDataProtectionPolicy": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cloudwatch.json#/LogDataProtectionPolicy"
        },
        "runtimeManagement": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--lambda.json#/AwsLambdaRuntimeManagement"
        }
      },
      "required": [
        "name"
      ]
    },
    "AwsQuota": {
      "properties": {
        "limit": {
          "type": [
            "string",
            "number"
          ]
        },
        "offset": {
          "type": [
            "string",
            "number"
          ]
        },
        "period": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsResourcePolicy": {
      "properties": {
        "Action": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "object",
              "additionalProperties": {}
            },
            {
              "type": "string"
            }
          ]
        },
        "Condition": {
          "type": "object",
          "additionalProperties": {}
        },
        "Effect": {
          "enum": [
            "Allow",
            "Deny"
          ],
          "type": "string"
        },
        "Principal": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "object",
              "additionalProperties": {}
            },
            {
              "type": "string"
            }
          ]
        },
        "Resource": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "object",
              "additionalProperties": {}
            },
            {
              "type": "string"
            }
          ]
        }
      },
      "type": "object"
    },
    "ServerlessFrameworkResources": {
      "oneOf": [
        {
          "title": "ServerlessFrameworkResourceConfiguration",
          "description": "Serverless Framework Additional Resources Configuration",
          "properties": {
            "Outputs": {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--outputs.json#/AwsOutputs"
            },
            "Resources": {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--resources.schema.json#/properties/Resources"
            },
            "Mappings": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html>",
              "type": "object",
              "additionalProperties": false,
              "patternProperties": {
                "^[a-zA-Z0-9._-]{1,255}$": {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--mappings.json#/properties/Mappings"
                }
              }
            },
            "Conditions": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html>",
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--conditions.json#/properties/Conditions"
            },
            "Parameters": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html>",
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--parameters.json#/properties/Parameters"
            },
            "Hooks": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html>",
              "type": "object"
            },
            "Rules": {
              "description": "<https://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html>",
              "type": "object"
            },
            "AWSTemplateFormatVersion": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/format-version-structure.html>",
              "type": "string",
              "enum": [
                "2010-09-09"
              ]
            },
            "Description": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-description-structure.html>",
              "type": "string",
              "maxLength": 1024
            },
            "Metadata": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html>",
              "type": "object"
            },
            "Transform": {
              "description": "<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html>",
              "$ref": "#/$defs/Transform"
            }
          },
          "type": "object"
        },
        {
          "$ref": "#/$defs/ServerlessFilePath"
        }
      ]
    },
    "ServerlessFilePath": {
      "type": "string",
      "minLength": 1,
      "pattern": "\\$\\{file\\(.+\\.(yml|yaml)\\)(:[A-Za-z]+)?(\\s*,\\s*(\"[^,]*\"|'[^,]*'|[A-Za-z:._-]+)\\s*)?\\}"
    },
    "AwsRestApiLogs": {
      "title": "AwsRestApiLogs",
      "properties": {
        "accessLogging": {
          "type": "boolean"
        },
        "executionLogging": {
          "type": "boolean"
        },
        "format": {
          "type": "string"
        },
        "fullExecutionData": {
          "type": "boolean"
        },
        "level": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "roleManagedExternally": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "AwsRollbackConfiguration": {
      "properties": {
        "MonitoringTimeInMinutes": {
          "type": [
            "string",
            "number"
          ]
        },
        "RollbackTriggers": {
          "items": {
            "$ref": "#/$defs/AwsRollbackTrigger"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AwsRollbackTrigger": {
      "properties": {
        "Arn": {
          "type": "string"
        },
        "Type": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsS3": {
      "oneOf": [
        {
          "properties": {
            "bucket": {
              "type": "string"
            },
            "event": {
              "type": "string"
            },
            "existing": {
              "type": "boolean"
            },
            "rules": {
              "items": {
                "$ref": "#/$defs/AwsS3Rule"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        {
          "type": "string",
          "description": "This will create a new bucket and trigger the lambda when an object is added or modified inside the bucket. More details :- <https://www.serverless.com/framework/docs/providers/aws/events/s3#simple-event-definition>",
          "minLength": 3,
          "maxLength": 63,
          "pattern": "(?!(^((2(5[0-5]|[0-4][0-9])|[01]?[0-9]{1,2})\\.){3}(2(5[0-5]|[0-4][0-9])|[01]?[0-9]{1,2})$|^xn--|-s3alias$))^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$"
        }
      ]
    },
    "AwsS3Rule": {
      "properties": {
        "prefix": {
          "type": "string"
        },
        "suffix": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ServerlessServiceConfiguration": {
      "description": "**@deprecated and doesn't work in serverless framework v3**",
      "title": "ServerlessServiceConfiguration",
      "properties": {
        "awsKmsKeyArn": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsStackParameters": {
      "properties": {
        "ParameterKey": {
          "type": "string"
        },
        "ParameterValue": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsStream": {
      "properties": {
        "arn": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_Function"
        },
        "batchSize": {
          "type": [
            "string",
            "number"
          ]
        },
        "enabled": {
          "type": "boolean"
        },
        "startingPosition": {
          "type": [
            "string",
            "number"
          ]
        }
      },
      "type": "object"
    },
    "AwsTags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "AwsThrottle": {
      "properties": {
        "burstLimit": {
          "type": [
            "string",
            "number"
          ]
        },
        "rateLimit": {
          "type": [
            "string",
            "number"
          ]
        }
      },
      "type": "object"
    },
    "AwsTracing": {
      "properties": {
        "apiGateway": {
          "type": "boolean"
        },
        "lambda": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "AwsUsagePlan": {
      "properties": {
        "quota": {
          "$ref": "#/$defs/AwsQuota"
        },
        "throttle": {
          "$ref": "#/$defs/AwsThrottle"
        }
      },
      "type": "object"
    },
    "AwsVpc": {
      "properties": {
        "securityGroupIds": {
          "items": {
            "anyOf": [
              {
                "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_Function"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        },
        "subnetIds": {
          "items": {
            "anyOf": [
              {
                "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_Function"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        }
      },
      "type": "object",
      "required": [
        "securityGroupIds",
        "subnetIds"
      ]
    },
    "AwsWebsocket": {
      "properties": {
        "authorizer": {
          "$ref": "#/$defs/AwsWebsocketAuthorizer"
        },
        "route": {
          "type": "string"
        },
        "routeResponseSelectionExpression": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsWebsocketAuthorizer": {
      "properties": {
        "arn": {
          "type": "string"
        },
        "identitySource": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsWebsocketLogs": {
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "INFO",
            "ERROR"
          ]
        },
        "format": {
          "type": "string",
          "description": "Log format to use for access logs. Ref:- <https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-logging.html>"
        },
        "accessLogging": {
          "type": "boolean",
          "description": "Enables HTTP access logs (default: true)"
        },
        "executionLogging": {
          "type": "boolean",
          "description": "Enable execution logging (default: true)"
        },
        "fullExecutionData": {
          "type": "boolean",
          "description": "Log full requests/responses for execution logging (default: true)"
        }
      },
      "type": "object"
    }
  }
}
