{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-events-connection.json",
  "title": "AWSEventsConnectionProperties",
  "description": "Resource Type definition for AWS::Events::Connection.. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-events-connection.json",
    "sourceSha256": "f872b20a87024e0b58a867ef7f75434fa4e8dd81538b65df1e4d536424d026b1"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the connection."
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 512
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Description of the connection."
    },
    "AuthorizationType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "API_KEY",
            "BASIC",
            "OAUTH_CLIENT_CREDENTIALS"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "AuthParameters": {
      "$ref": "#/$defs/AuthParameters"
    }
  },
  "typeName": "AWS::Events::Connection",
  "primaryIdentifier": [
    "/properties/Name"
  ],
  "additionalProperties": false,
  "writeOnlyProperties": [
    "/properties/AuthParameters"
  ],
  "$defs": {
    "AuthParameters": {
      "type": "object",
      "minProperties": 1,
      "maxProperties": 2,
      "properties": {
        "ApiKeyAuthParameters": {
          "$ref": "#/$defs/ApiKeyAuthParameters"
        },
        "BasicAuthParameters": {
          "$ref": "#/$defs/BasicAuthParameters"
        },
        "OAuthParameters": {
          "$ref": "#/$defs/OAuthParameters"
        },
        "InvocationHttpParameters": {
          "$ref": "#/$defs/ConnectionHttpParameters"
        }
      },
      "oneOf": [
        {
          "required": [
            "BasicAuthParameters"
          ]
        },
        {
          "required": [
            "OAuthParameters"
          ]
        },
        {
          "required": [
            "ApiKeyAuthParameters"
          ]
        }
      ],
      "title": "AWSEventsConnectionAuthParametersDefinition",
      "additionalProperties": false
    },
    "BasicAuthParameters": {
      "type": "object",
      "properties": {
        "Username": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Password": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Username",
        "Password"
      ],
      "title": "AWSEventsConnectionBasicAuthParametersDefinition",
      "additionalProperties": false
    },
    "OAuthParameters": {
      "type": "object",
      "properties": {
        "ClientParameters": {
          "$ref": "#/$defs/ClientParameters"
        },
        "AuthorizationEndpoint": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "HttpMethod": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "GET",
                "POST",
                "PUT"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "OAuthHttpParameters": {
          "$ref": "#/$defs/ConnectionHttpParameters"
        }
      },
      "required": [
        "ClientParameters",
        "AuthorizationEndpoint",
        "HttpMethod"
      ],
      "title": "AWSEventsConnectionOAuthParametersDefinition",
      "additionalProperties": false
    },
    "ApiKeyAuthParameters": {
      "type": "object",
      "properties": {
        "ApiKeyName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ApiKeyValue": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "ApiKeyName",
        "ApiKeyValue"
      ],
      "title": "AWSEventsConnectionApiKeyAuthParametersDefinition",
      "additionalProperties": false
    },
    "ClientParameters": {
      "type": "object",
      "properties": {
        "ClientID": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ClientSecret": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "ClientID",
        "ClientSecret"
      ],
      "title": "AWSEventsConnectionClientParametersDefinition",
      "additionalProperties": false
    },
    "ConnectionHttpParameters": {
      "type": "object",
      "properties": {
        "HeaderParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Parameter"
          }
        },
        "QueryStringParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Parameter"
          }
        },
        "BodyParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Parameter"
          }
        }
      },
      "title": "AWSEventsConnectionConnectionHttpParametersDefinition",
      "additionalProperties": false
    },
    "Parameter": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "IsValueSecret": {
          "type": "boolean",
          "default": true
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSEventsConnectionParameterDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "AuthorizationType",
    "AuthParameters"
  ],
  "createOnlyProperties": [
    "/properties/Name"
  ],
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/SecretArn"
  ]
}
