{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-lambda-url.json",
  "title": "AWSLambdaUrlProperties",
  "description": "Resource Type definition for AWS::Lambda::Url. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-lambda-url.json",
    "sourceSha256": "786d81b8f625001c5c571c0da6872883bfdaa9579c28f9cb8df6043c7c4d1d61"
  },
  "type": "object",
  "properties": {
    "TargetFunctionArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:)?(\\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:((?!\\d+)[0-9a-zA-Z-_]+))?$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the function associated with the Function URL."
    },
    "Qualifier": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "((?!^[0-9]+$)([a-zA-Z0-9-_]+))"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed."
    },
    "AuthType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "AWS_IAM",
            "NONE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL."
    },
    "InvokeMode": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "BUFFERED",
            "RESPONSE_STREAM"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The invocation mode for the function’s URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED."
    },
    "Cors": {
      "$ref": "#/$defs/Cors"
    }
  },
  "typeName": "AWS::Lambda::Url",
  "primaryIdentifier": [
    "/properties/FunctionArn"
  ],
  "$defs": {
    "AllowHeaders": {
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024
      },
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "insertionOrder": true,
      "title": "AWSLambdaUrlAllowHeadersDefinition"
    },
    "AllowMethods": {
      "items": {
        "type": "string",
        "enum": [
          "GET",
          "PUT",
          "HEAD",
          "POST",
          "PATCH",
          "DELETE",
          "*"
        ]
      },
      "type": "array",
      "minItems": 1,
      "maxItems": 6,
      "insertionOrder": true,
      "title": "AWSLambdaUrlAllowMethodsDefinition"
    },
    "AllowOrigins": {
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 253
      },
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "insertionOrder": true,
      "title": "AWSLambdaUrlAllowOriginsDefinition"
    },
    "ExposeHeaders": {
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024
      },
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "insertionOrder": true,
      "title": "AWSLambdaUrlExposeHeadersDefinition"
    },
    "Cors": {
      "title": "AWSLambdaUrlCorsDefinition",
      "properties": {
        "AllowCredentials": {
          "description": "Specifies whether credentials are included in the CORS request.",
          "type": "boolean"
        },
        "AllowHeaders": {
          "description": "Represents a collection of allowed headers.",
          "$ref": "#/$defs/AllowHeaders"
        },
        "AllowMethods": {
          "description": "Represents a collection of allowed HTTP methods.",
          "$ref": "#/$defs/AllowMethods"
        },
        "AllowOrigins": {
          "description": "Represents a collection of allowed origins.",
          "$ref": "#/$defs/AllowOrigins"
        },
        "ExposeHeaders": {
          "description": "Represents a collection of exposed headers.",
          "$ref": "#/$defs/ExposeHeaders"
        },
        "MaxAge": {
          "type": "integer",
          "minimum": 0,
          "maximum": 86400
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "tagging": {
    "taggable": false
  },
  "writeOnlyProperties": [
    "/properties/TargetFunctionArn",
    "/properties/Qualifier"
  ],
  "additionalProperties": false,
  "required": [
    "TargetFunctionArn",
    "AuthType"
  ],
  "createOnlyProperties": [
    "/properties/TargetFunctionArn",
    "/properties/Qualifier"
  ],
  "readOnlyProperties": [
    "/properties/FunctionUrl",
    "/properties/FunctionArn"
  ]
}
