{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-events-endpoint.json",
  "title": "AWSEventsEndpointProperties",
  "description": "Resource Type definition for AWS::Events::Endpoint.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-events.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-events-endpoint.json",
    "sourceSha256": "99402a9ef8ed3a06873955709253a07bddcf2737c90b38a6eea36c09370feca1"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[\\.\\-_A-Za-z0-9]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "RoleArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "pattern": "^arn:aws[a-z-]*:iam::\\d{12}:role\\/[\\w+=,.@/-]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 512,
          "pattern": ".*"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "RoutingConfig": {
      "$ref": "#/$defs/RoutingConfig"
    },
    "ReplicationConfig": {
      "$ref": "#/$defs/ReplicationConfig"
    },
    "EventBuses": {
      "$ref": "#/$defs/EventBuses"
    }
  },
  "typeName": "AWS::Events::Endpoint",
  "primaryIdentifier": [
    "/properties/Name"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-events.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/Name"
  ],
  "tagging": {
    "taggable": false,
    "tagOnCreate": false,
    "tagUpdatable": false,
    "cloudFormationSystemTags": false
  },
  "$defs": {
    "HealthCheck": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1600,
          "pattern": "^arn:aws([a-z]|\\-)*:route53:::healthcheck/[\\-a-z0-9]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSEventsEndpointHealthCheckDefinition"
    },
    "Primary": {
      "type": "object",
      "title": "AWSEventsEndpointPrimaryDefinition",
      "properties": {
        "HealthCheck": {
          "$ref": "#/$defs/HealthCheck"
        }
      },
      "required": [
        "HealthCheck"
      ],
      "additionalProperties": false
    },
    "Route": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 9,
          "maxLength": 20,
          "pattern": "^[\\-a-z0-9]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSEventsEndpointRouteDefinition"
    },
    "Secondary": {
      "type": "object",
      "title": "AWSEventsEndpointSecondaryDefinition",
      "properties": {
        "Route": {
          "$ref": "#/$defs/Route"
        }
      },
      "required": [
        "Route"
      ],
      "additionalProperties": false
    },
    "FailoverConfig": {
      "type": "object",
      "title": "AWSEventsEndpointFailoverConfigDefinition",
      "properties": {
        "Primary": {
          "$ref": "#/$defs/Primary"
        },
        "Secondary": {
          "$ref": "#/$defs/Secondary"
        }
      },
      "required": [
        "Primary",
        "Secondary"
      ],
      "additionalProperties": false
    },
    "RoutingConfig": {
      "type": "object",
      "title": "AWSEventsEndpointRoutingConfigDefinition",
      "properties": {
        "FailoverConfig": {
          "$ref": "#/$defs/FailoverConfig"
        }
      },
      "required": [
        "FailoverConfig"
      ],
      "additionalProperties": false
    },
    "EventBusArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^arn:aws[a-z-]*:events:[a-z]{2}-[a-z-]+-\\d+:\\d{12}:event-bus/[\\w.-]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSEventsEndpointEventBusArnDefinition"
    },
    "EndpointEventBus": {
      "type": "object",
      "title": "AWSEventsEndpointEndpointEventBusDefinition",
      "properties": {
        "EventBusArn": {
          "$ref": "#/$defs/EventBusArn"
        }
      },
      "required": [
        "EventBusArn"
      ],
      "additionalProperties": false
    },
    "EventBuses": {
      "type": "array",
      "insertionOrder": false,
      "minItems": 2,
      "maxItems": 2,
      "items": {
        "$ref": "#/$defs/EndpointEventBus"
      },
      "title": "AWSEventsEndpointEventBusesDefinition"
    },
    "ReplicationState": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSEventsEndpointReplicationStateDefinition"
    },
    "ReplicationConfig": {
      "type": "object",
      "title": "AWSEventsEndpointReplicationConfigDefinition",
      "properties": {
        "State": {
          "$ref": "#/$defs/ReplicationState"
        }
      },
      "required": [
        "State"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "RoutingConfig",
    "EventBuses"
  ],
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/EndpointId",
    "/properties/EndpointUrl",
    "/properties/State",
    "/properties/StateReason"
  ]
}
