{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "definitions": {
    "AwsAlexaSmartHome": {
      "properties": {
        "appId": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "AwsApiGateway": {
      "properties": {
        "apiKeySourceType": {
          "enum": [
            "HEADER",
            "AUTHORIZER"
          ],
          "type": "string"
        },
        "apiKeys": {
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "properties": {
                  "customerId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "enabled": {
                    "description": "Can be used to disable the API key without removing it (default: true)",
                    "type": "boolean"
                  },
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        "binaryMediaTypes": {
          "description": "Optional binary media types the API might return",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "description": {
          "type": "string"
        },
        "disableDefaultEndpoint": {
          "description": "Disable the default 'execute-api' HTTP endpoint (default: false)",
          "type": "boolean"
        },
        "metrics": {
          "type": "boolean"
        },
        "minimumCompressionSize": {
          "maximum": 10485760,
          "minimum": 0,
          "type": "number"
        },
        "restApiId": {
          "type": "string"
        },
        "restApiResources": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "restApiRootResourceId": {
          "type": "string"
        },
        "shouldStartNameWithService": {
          "description": "Use `${service}-${stage}` naming for API Gateway. Will be `true` by default in v3.",
          "type": "boolean"
        },
        "usagePlan": {
          "properties": {
            "quota": {
              "properties": {
                "limit": {
                  "type": "number"
                },
                "offset": {
                  "type": "number"
                },
                "period": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "throttle": {
              "properties": {
                "burstLimit": {
                  "type": "number"
                },
                "rateLimit": {
                  "type": "number"
                }
              },
              "type": "object"
            }
          },
          "type": "object"
        },
        "websocketApiId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsCloudFront": {
      "properties": {
        "eventType": {
          "type": "string"
        },
        "includeBody": {
          "type": "boolean"
        },
        "origin": {
          "$ref": "#/definitions/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"
    },
    "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"
        },
        "skipPolicySetup": {
          "description": "Skip the creation of a default bucket policy when the deployment bucket is created (default: false)",
          "type": "boolean"
        },
        "sseCustomerAlgorithim": {
          "type": "string"
        },
        "sseCustomerKey": {
          "type": "string"
        },
        "sseCustomerKeyMD5": {
          "type": "string"
        },
        "sseKMSKeyId": {
          "type": "string"
        },
        "tags": {
          "$ref": "#/definitions/AwsTags"
        },
        "versioning": {
          "description": "Enable bucket versioning (default: false)",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "AwsDestinations": {
      "properties": {
        "onFailure": {
          "type": "string"
        },
        "onSuccess": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsDetail": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "type": "object"
    },
    "AwsEnvironment": {
      "additionalProperties": {},
      "type": "object"
    },
    "AwsEvent": {
      "properties": {
        "activemq": {
          "$ref": "components/events.json#/AwsActiveMq"
        },
        "alb": {
          "$ref": "components/events.json#/AwsAlbEvent"
        },
        "alexaSkill": {
          "$ref": "components/events.json#/AwsAlexaSkill"
        },
        "alexaSmartHome": {
          "$ref": "#/definitions/AwsAlexaSmartHome"
        },
        "cloudFront": {
          "$ref": "#/definitions/AwsCloudFront"
        },
        "cloudwatchEvent": {
          "$ref": "components/events.json#/AwsCloudwatchEvent"
        },
        "cloudwatchLog": {
          "$ref": "#/definitions/AwsCloudwatchLog"
        },
        "cognitoUserPool": {
          "$ref": "#/definitions/AwsCognitoUserPool"
        },
        "eventBridge": {
          "$ref": "#/definitions/AwsEventBridge"
        },
        "http": {
          "$ref": "#/definitions/AwsHttp"
        },
        "httpApi": {
          "$ref": "#/definitions/AwsHttpApiEvent"
        },
        "iot": {
          "$ref": "#/definitions/AwsIot"
        },
        "s3": {
          "$ref": "#/definitions/AwsS3"
        },
        "schedule": {
          "anyOf": [
            {
              "$ref": "components/events.json#/AwsScheduleEvent"
            },
            {
              "type": "string"
            }
          ]
        },
        "sns": {
          "$ref": "components/events.json#/AwsSns"
        },
        "sqs": {
          "anyOf": [
            {
              "$ref": "components/events.json#/AwsSqs"
            },
            {
              "type": "string"
            }
          ]
        },
        "stream": {
          "$ref": "#/definitions/AwsStream"
        },
        "websocket": {
          "$ref": "#/definitions/AwsWebsocket"
        }
      },
      "type": "object"
    },
    "AwsEventBridge": {
      "anyOf": [
        {
          "required": [
            "pattern"
          ]
        },
        {
          "required": [
            "schedule"
          ]
        }
      ],
      "description": "Aws Lambda function Eventbridge event source",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "eventBus": {
          "minLength": 1,
          "type": "string"
        },
        "input": {
          "type": "object"
        },
        "inputPath": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "inputTransformer": {
          "$ref": "components/common.json#/AwsInputTransformer"
        },
        "name": {
          "maxLength": 64,
          "minLength": 1,
          "pattern": "[a-zA-Z0-9-_.]+",
          "type": "string"
        },
        "pattern": {
          "anyOf": [
            {
              "$ref": "#/definitions/AwsPatternExisting"
            },
            {
              "$ref": "#/definitions/AwsPatternInput"
            }
          ]
        },
        "retryPolicy": {
          "properties": {
            "maximumEventAge": {
              "maximum": 86400,
              "minimum": 60,
              "type": "number"
            },
            "maximumRetryAttempts": {
              "maximum": 185,
              "minimum": 0,
              "type": "number"
            }
          },
          "type": "object"
        },
        "schedule": {
          "pattern": "^(?:cron|rate)\\(.+\\)$",
          "type": "string"
        }
      },
      "title": "AwsEventBridge",
      "type": "object"
    },
    "AwsFunction": {
      "properties": {
        "awsKmsKeyArn": {
          "type": "string"
        },
        "condition": {
          "type": "string"
        },
        "dependsOn": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "description": {
          "type": "string"
        },
        "destinations": {
          "$ref": "#/definitions/AwsDestinations"
        },
        "environment": {
          "$ref": "#/definitions/AwsEnvironment"
        },
        "events": {
          "items": {
            "$ref": "#/definitions/AwsEvent"
          },
          "type": "array"
        },
        "handler": {
          "type": "string"
        },
        "image": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "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",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "entryPoint": {
                  "description": "Sometimes it appears that { from the dockerfile is not read and we have to overwrite it manually to make it work",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "name": {
                  "type": "string"
                },
                "uri": {
                  "type": "string"
                },
                "workingDirectory": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          ]
        },
        "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": "components/cf.functions.json#/FnRef"
              },
              {
                "$ref": "components/cf.functions.json#/FnGetAtt"
              },
              {
                "$ref": "components/cf.functions.json#/FnJoin"
              },
              {
                "$ref": "components/cf.functions.json#/FnTransform"
              },
              {
                "$ref": "components/cf.functions.json#/FnFindInMap"
              }
            ]
          },
          "type": "array"
        },
        "logDataProtectionPolicy": {
          "$ref": "components/cloudwatch.json#/LogDataProtectionPolicy"
        },
        "memorySize": {
          "type": [
            "string",
            "number"
          ]
        },
        "name": {
          "type": "string"
        },
        "onError": {
          "type": "string"
        },
        "package": {
          "$ref": "components/common.json#/AwsPackage"
        },
        "provisionedConcurrency": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "$ref": "components/cf.functions.json#/Aws_CF_FunctionString"
            },
            {
              "$ref": "components/cf.functions.json#/FnIf"
            }
          ]
        },
        "reservedConcurrency": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "$ref": "components/cf.functions.json#/Aws_CF_FunctionString"
            },
            {
              "$ref": "components/cf.functions.json#/FnIf"
            }
          ]
        },
        "role": {
          "type": "string"
        },
        "runtime": {
          "$ref": "components/lambda.json#/AwsRuntime"
        },
        "runtimeManagement": {
          "$ref": "components/lambda.json#/AwsLambdaRuntimeManagement"
        },
        "snapStart": {
          "description": "https://www.serverless.com/framework/docs/providers/aws/guide/functions#snapstart",
          "type": "boolean"
        },
        "tags": {
          "$ref": "#/definitions/AwsTags"
        },
        "timeout": {
          "type": [
            "string",
            "number"
          ]
        },
        "tracing": {
          "type": "string"
        },
        "vpc": {
          "$ref": "#/definitions/AwsVpc"
        }
      },
      "type": "object"
    },
    "AwsFunctions": {
      "oneOf": [
        {
          "additionalProperties": {
            "$ref": "#/definitions/AwsFunction"
          },
          "type": "object"
        },
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "$ref": "#/definitions/ServerlessFilePath"
          },
          "type": "array"
        }
      ]
    },
    "AwsHttp": {
      "oneOf": [
        {
          "properties": {
            "async": {
              "type": "boolean"
            },
            "authorizer": {
              "$ref": "#/definitions/AwsHttpAuthorizer"
            },
            "cors": {
              "$ref": "components/api.gateway.v1.json#/AwsHttpCors"
            },
            "method": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "private": {
              "type": "boolean"
            },
            "request": {
              "$ref": "#/definitions/AwsHttpRequestValidation"
            }
          },
          "type": "object"
        },
        {
          "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+}"
          ],
          "type": "string"
        }
      ]
    },
    "AwsHttpApiEvent": {
      "oneOf": [
        {
          "properties": {
            "authorizer": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AwsNamedHttpApiEventAuthorizer"
                },
                {
                  "$ref": "#/definitions/AwsIdRefHttpApiEventAuthorizer"
                }
              ]
            },
            "method": {
              "type": "string"
            },
            "path": {
              "type": "string"
            }
          },
          "type": "object"
        },
        {
          "minLength": 1,
          "type": "string"
        }
      ]
    },
    "AwsHttpApiLogs": {
      "properties": {
        "format": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsHttpAuthorizer": {
      "anyOf": [
        {
          "description": "AWS_IAM based authorizer, https://www.serverless.com/framework/docs/providers/aws/events/apigateway#http-endpoints-with-aws_iam-authorizers",
          "enum": [
            "aws_iam"
          ],
          "title": "AwsHttpIamAuthorizerShort",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "AWS_IAM based authorizer, https://www.serverless.com/framework/docs/providers/aws/events/apigateway#http-endpoints-with-aws_iam-authorizers",
          "properties": {
            "type": {
              "enum": [
                "aws_iam"
              ],
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "title": "AwsHttpIamAuthorizer",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "arn": {
              "description": "The arn of the cognito user pool",
              "type": "string"
            },
            "claims": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "identitySource": {
              "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",
              "type": "string"
            },
            "identityValidationExpression": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "resultTtlInSeconds": {
              "maximum": 3600,
              "minimum": 0,
              "type": "number"
            },
            "scopes": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": {
              "enum": [
                "COGNITO_USER_POOLS"
              ],
              "type": "string"
            }
          },
          "required": [
            "type",
            "arn"
          ],
          "title": "AwsHttpCognitoAuthorizer"
        },
        {
          "additionalProperties": false,
          "oneOf": [
            {
              "required": [
                "arn"
              ]
            },
            {
              "required": [
                "name"
              ]
            }
          ],
          "properties": {
            "arn": {
              "type": "string"
            },
            "identitySource": {
              "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`",
              "type": "string"
            },
            "identityValidationExpression": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "resultTtlInSeconds": {
              "maximum": 3600,
              "minimum": 0,
              "type": "number"
            },
            "type": {
              "default": "token",
              "enum": [
                "request",
                "token",
                "REQUEST",
                "TOKEN"
              ],
              "type": "string"
            }
          },
          "title": "AwsHttpLambdaAuthorizer",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Use an existing Api Gateway Authorizer created outside or in the same stack",
          "properties": {
            "authorizerId": {
              "description": "The Id of the existing authorizer",
              "type": "string"
            },
            "type": {
              "enum": [
                "CUSTOM"
              ],
              "type": "string"
            }
          },
          "required": [
            "type",
            "authorizerId"
          ],
          "title": "AwsHttpExistingAuthorizer",
          "type": "object"
        }
      ]
    },
    "AwsHttpRequestParametersValidation": {
      "properties": {
        "headers": {
          "additionalProperties": {
            "type": "boolean"
          },
          "type": "object"
        },
        "paths": {
          "additionalProperties": {
            "type": "boolean"
          },
          "type": "object"
        },
        "querystrings": {
          "additionalProperties": {
            "type": "boolean"
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "AwsHttpRequestValidation": {
      "properties": {
        "parameters": {
          "$ref": "#/definitions/AwsHttpRequestParametersValidation"
        },
        "schema": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "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": "#/definitions/AwsHttpApiLogs"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "restApi": {
          "$ref": "#/definitions/AwsRestApiLogs"
        },
        "websocket": {
          "$ref": "#/definitions/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": "#/definitions/AwsDetail"
        },
        "detail-type": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "source": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "AwsProvider": {
      "description": "Configuration for Serverless AWS ",
      "properties": {
        "alb": {
          "$ref": "components/alb.json#/AwsAlb"
        },
        "apiGateway": {
          "$ref": "#/definitions/AwsApiGateway"
        },
        "apiKeys": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "apiName": {
          "description": "Change this to use a custom name for the API Gateway API",
          "type": "string"
        },
        "architecture": {
          "$ref": "components/common.json#/AwsSupportedArchitecture"
        },
        "cfnRole": {
          "type": "string"
        },
        "deploymentBucket": {
          "$ref": "#/definitions/AwsDeploymentBucket"
        },
        "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",
          "enum": [
            "direct",
            "changesets"
          ],
          "type": "string"
        },
        "deploymentPrefix": {
          "type": "string"
        },
        "disableRollback": {
          "description": "Disable automatic rollback by CloudFormation on failure. To be used for non-production environments.",
          "type": "boolean"
        },
        "ecr": {
          "properties": {
            "images": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "properties": {
                      "uri": {
                        "description": "URI of an existing Docker image in ECR",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "properties": {
                      "buildArgs": {
                        "type": "object"
                      },
                      "cacheFrom": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "file": {
                        "description": "Dockerfile that will be used when building the image locally (default: 'Dockerfile')",
                        "type": "string"
                      },
                      "path": {
                        "description": "Path to the Docker context that will be used when building that image locally (default: '.')",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                ]
              },
              "type": "object"
            },
            "scanOnPush": {
              "description": "Enabling this will make AWS scan image for CVE(Common Vulnerabilities and Exposures)",
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "endpointType": {
          "enum": [
            "EDGE",
            "PRIVATE",
            "REGIONAL"
          ],
          "type": "string"
        },
        "environment": {
          "$ref": "#/definitions/AwsEnvironment"
        },
        "httpApi": {
          "$ref": "components/api.gateway.v2.json#/AwsHttpApi"
        },
        "iam": {
          "$ref": "components/iam.json#/AwsIamConfiguration"
        },
        "iamManagedPolicies": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "iamRoleStatements": {
          "items": {
            "$ref": "components/iam.json#/AwsIamRoleStatement"
          },
          "type": "array"
        },
        "logDataProtectionPolicy": {
          "$ref": "components/cloudwatch.json#/LogDataProtectionPolicy"
        },
        "logRetentionInDays": {
          "type": [
            "string",
            "number"
          ]
        },
        "logs": {
          "$ref": "#/definitions/AwsLogs"
        },
        "memorySize": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "description": "Note: API Gateway has a maximum timeout of 30 seconds",
              "maximum": 10240,
              "minimum": 128,
              "type": "number"
            }
          ],
          "type": [
            "string",
            "number"
          ]
        },
        "name": {
          "enum": [
            "aws"
          ],
          "type": "string"
        },
        "notificationArns": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "profile": {
          "type": "string"
        },
        "region": {
          "$ref": "components/common.json#/AwsRegion"
        },
        "reservedConcurrency": {
          "type": [
            "string",
            "number"
          ]
        },
        "resourcePolicy": {
          "items": {
            "$ref": "#/definitions/AwsResourcePolicy"
          },
          "type": "array"
        },
        "role": {
          "type": "string"
        },
        "rolePermissionsBoundary": {
          "type": "string"
        },
        "rollbackConfiguration": {
          "$ref": "#/definitions/AwsRollbackConfiguration"
        },
        "runtime": {
          "$ref": "components/lambda.json#/AwsRuntime"
        },
        "runtimeManagement": {
          "$ref": "components/lambda.json#/AwsLambdaRuntimeManagement"
        },
        "stackName": {
          "type": "string"
        },
        "stackParameters": {
          "items": {
            "$ref": "#/definitions/AwsStackParameters"
          },
          "type": "array"
        },
        "stackPolicy": {
          "items": {
            "$ref": "#/definitions/AwsResourcePolicy"
          },
          "type": "array"
        },
        "stackTags": {
          "$ref": "#/definitions/AwsTags"
        },
        "stage": {
          "type": "string"
        },
        "tags": {
          "$ref": "#/definitions/AwsTags"
        },
        "timeout": {
          "type": [
            "string",
            "number"
          ]
        },
        "tracing": {
          "$ref": "#/definitions/AwsTracing"
        },
        "usagePlan": {
          "$ref": "#/definitions/AwsUsagePlan"
        },
        "versionFunctions": {
          "description": "Use function versioning (enabled by default)",
          "type": "boolean"
        },
        "vpc": {
          "$ref": "#/definitions/AwsVpc"
        },
        "websocketsApiName": {
          "type": "string"
        },
        "websocketsApiRouteSelectionExpression": {
          "type": "string"
        },
        "websocketsDescription": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "title": "AwsProvider",
      "type": "object"
    },
    "AwsQuota": {
      "properties": {
        "limit": {
          "type": [
            "string",
            "number"
          ]
        },
        "offset": {
          "type": [
            "string",
            "number"
          ]
        },
        "period": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsResourcePolicy": {
      "properties": {
        "Action": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "additionalProperties": {},
              "type": "object"
            },
            {
              "type": "string"
            }
          ]
        },
        "Condition": {
          "additionalProperties": {},
          "type": "object"
        },
        "Effect": {
          "enum": [
            "Allow",
            "Deny"
          ],
          "type": "string"
        },
        "Principal": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "additionalProperties": {},
              "type": "object"
            },
            {
              "type": "string"
            }
          ]
        },
        "Resource": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "additionalProperties": {},
              "type": "object"
            },
            {
              "type": "string"
            }
          ]
        }
      },
      "type": "object"
    },
    "AwsRestApiLogs": {
      "properties": {
        "accessLogging": {
          "type": "boolean"
        },
        "executionLogging": {
          "type": "boolean"
        },
        "format": {
          "type": "string"
        },
        "fullExecutionData": {
          "type": "boolean"
        },
        "level": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "roleManagedExternally": {
          "type": "boolean"
        }
      },
      "title": "AwsRestApiLogs",
      "type": "object"
    },
    "AwsRollbackConfiguration": {
      "properties": {
        "MonitoringTimeInMinutes": {
          "type": [
            "string",
            "number"
          ]
        },
        "RollbackTriggers": {
          "items": {
            "$ref": "#/definitions/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": "#/definitions/AwsS3Rule"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        {
          "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",
          "maxLength": 63,
          "minLength": 3,
          "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]$",
          "type": "string"
        }
      ]
    },
    "AwsS3Rule": {
      "properties": {
        "prefix": {
          "type": "string"
        },
        "suffix": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsStackParameters": {
      "properties": {
        "ParameterKey": {
          "type": "string"
        },
        "ParameterValue": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "AwsStream": {
      "properties": {
        "arn": {
          "$ref": "components/cf.functions.json#/Aws_CF_Function"
        },
        "batchSize": {
          "type": [
            "string",
            "number"
          ]
        },
        "enabled": {
          "type": "boolean"
        },
        "startingPosition": {
          "type": [
            "string",
            "number"
          ]
        }
      },
      "type": "object"
    },
    "AwsTags": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object"
    },
    "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": "#/definitions/AwsQuota"
        },
        "throttle": {
          "$ref": "#/definitions/AwsThrottle"
        }
      },
      "type": "object"
    },
    "AwsVpc": {
      "properties": {
        "securityGroupIds": {
          "items": {
            "anyOf": [
              {
                "$ref": "components/cf.functions.json#/Aws_CF_Function"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        },
        "subnetIds": {
          "items": {
            "anyOf": [
              {
                "$ref": "components/cf.functions.json#/Aws_CF_Function"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        }
      },
      "required": [
        "securityGroupIds",
        "subnetIds"
      ],
      "type": "object"
    },
    "AwsWebsocket": {
      "properties": {
        "authorizer": {
          "$ref": "#/definitions/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": {
        "accessLogging": {
          "description": "Enables HTTP access logs (default: true)",
          "type": "boolean"
        },
        "executionLogging": {
          "description": "Enable execution logging (default: true)",
          "type": "boolean"
        },
        "format": {
          "description": "Log format to use for access logs. Ref:- https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-logging.html",
          "type": "string"
        },
        "fullExecutionData": {
          "description": "Log full requests/responses for execution logging (default: true)",
          "type": "boolean"
        },
        "level": {
          "enum": [
            "INFO",
            "ERROR"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "ServerlessCustom": {
      "additionalProperties": true,
      "properties": {
        "esbuild": {
          "$ref": "plugin/esbuild.json#/Esbuild"
        },
        "prune": {
          "$ref": "plugin/prune.json#/Prune"
        },
        "pythonRequirements": {
          "$ref": "plugin/python_requirements.json#/PythonRequirements"
        },
        "splitStacks": {
          "$ref": "plugin/split_stacks.json#/SplitStacks"
        },
        "ssmPublish": {
          "$ref": "plugin/ssm_publish.json#/SsmPublishConfiguration"
        },
        "webpack": {
          "$ref": "plugin/webpack.json#/WebpackConfiguration"
        },
        "wsgi": {
          "$ref": "plugin/python_wsgi.json#/PythonWsgi"
        }
      },
      "type": "object"
    },
    "ServerlessFilePath": {
      "minLength": 1,
      "pattern": "\\$\\{file\\(.+\\.(yml|yaml)\\)(:[A-Za-z]+)?(\\s*,\\s*(\"[^,]*\"|'[^,]*'|[A-Za-z:._-]+)\\s*)?\\}",
      "type": "string"
    },
    "ServerlessFrameworkResources": {
      "oneOf": [
        {
          "description": "Serverless Framework Additional Resources Configuration",
          "properties": {
            "AWSTemplateFormatVersion": {
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/format-version-structure.html",
              "enum": [
                "2010-09-09"
              ],
              "type": "string"
            },
            "Conditions": {
              "$ref": "components/conditions.json#/properties/Conditions",
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html"
            },
            "Description": {
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-description-structure.html",
              "maxLength": 1024,
              "type": "string"
            },
            "Hooks": {
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html",
              "type": "object"
            },
            "Mappings": {
              "additionalProperties": false,
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html",
              "patternProperties": {
                "^[a-zA-Z0-9._-]{1,255}$": {
                  "$ref": "components/mappings.json#/properties/Mappings"
                }
              },
              "type": "object"
            },
            "Metadata": {
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html",
              "type": "object"
            },
            "Outputs": {
              "$ref": "components/outputs.json#/AwsOutputs"
            },
            "Parameters": {
              "$ref": "components/parameters.json#/properties/Parameters",
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html"
            },
            "Resources": {
              "$ref": "resources/resources.schema.json#/properties/Resources"
            },
            "Rules": {
              "description": "https://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html",
              "type": "object"
            },
            "Transform": {
              "$ref": "#/definitions/Transform",
              "description": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html"
            }
          },
          "title": "ServerlessFrameworkResourceConfiguration",
          "type": "object"
        },
        {
          "$ref": "#/definitions/ServerlessFilePath"
        }
      ]
    },
    "ServerlessServiceConfiguration": {
      "description": "**@deprecated and doesn't work in serverless framework v3**",
      "properties": {
        "awsKmsKeyArn": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "title": "ServerlessServiceConfiguration",
      "type": "object"
    },
    "Transform": {
      "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.",
          "additionalProperties": false,
          "properties": {
            "Name": {
              "enum": [
                "AWS::Include"
              ],
              "type": "string"
            },
            "Parameters": {
              "additionalProperties": false,
              "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.",
                  "format": "uri",
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        {
          "$comment": "Use a transform to simplify template authoring for serverless applications. ",
          "enum": [
            "AWS::CodeDeployBlueGreen",
            "AWS::CodeStar",
            "AWS::SecretsManager-2020-07-23",
            "AWS::Serverless-2016-10-31"
          ],
          "type": "string"
        }
      ],
      "type": "object"
    }
  },
  "description": "Schema for serverless framework configuration files",
  "fileMatch": [
    "serverless.yml",
    "serverless.yaml"
  ],
  "properties": {
    "app": {
      "type": "string"
    },
    "custom": {
      "$ref": "#/definitions/ServerlessCustom"
    },
    "frameworkVersion": {
      "type": "string"
    },
    "functions": {
      "$ref": "#/definitions/AwsFunctions"
    },
    "layers": {
      "$ref": "components/layers.json#/AwsLayers"
    },
    "org": {
      "type": "string"
    },
    "package": {
      "$ref": "components/common.json#/AwsPackage"
    },
    "plugins": {
      "oneOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "properties": {
            "localPath": {
              "description": "The path to the local .js file that contains the plugin",
              "type": "string"
            },
            "modules": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "title": "LocalPlugin",
          "type": "object"
        }
      ]
    },
    "provider": {
      "$ref": "#/definitions/AwsProvider"
    },
    "resources": {
      "oneOf": [
        {
          "$ref": "#/definitions/ServerlessFrameworkResources"
        },
        {
          "items": {
            "$ref": "#/definitions/ServerlessFrameworkResources"
          },
          "type": "array"
        }
      ]
    },
    "service": {
      "oneOf": [
        {
          "$ref": "#/definitions/ServerlessServiceConfiguration"
        },
        {
          "type": "string"
        }
      ]
    },
    "stepFunctions": {
      "$ref": "plugin/step_functions.json#/AwsStepFunctions"
    },
    "tenant": {
      "type": "string"
    }
  },
  "required": [
    "provider",
    "service"
  ],
  "title": "ServerlessFrameworkConfiguration",
  "type": "object"
}