{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-globalaccelerator-endpointgroup.json",
  "title": "AWSGlobalAcceleratorEndpointGroupProperties",
  "description": "Resource Type definition for AWS::GlobalAccelerator::EndpointGroup. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-globalaccelerator>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-globalaccelerator-endpointgroup.json",
    "sourceSha256": "02724a3735b212a82cdf7b848d126d374242f33da475fafad8811523bbe3fc1d"
  },
  "type": "object",
  "properties": {
    "ListenerArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$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 listener"
    },
    "EndpointGroupRegion": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the AWS Region where the endpoint group is located"
    },
    "EndpointConfigurations": {
      "description": "The list of endpoint objects.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/EndpointConfiguration"
      }
    },
    "TrafficDialPercentage": {
      "description": "The percentage of traffic to sent to an AWS Region",
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "default": 100
    },
    "HealthCheckPort": {
      "description": "The port that AWS Global Accelerator uses to check the health of endpoints in this endpoint group.",
      "type": "integer",
      "minimum": -1,
      "maximum": 65535,
      "default": -1
    },
    "HealthCheckProtocol": {
      "oneOf": [
        {
          "type": "string",
          "default": "TCP",
          "enum": [
            "TCP",
            "HTTP",
            "HTTPS"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The protocol that AWS Global Accelerator uses to check the health of endpoints in this endpoint group."
    },
    "HealthCheckPath": {
      "oneOf": [
        {
          "description": "",
          "type": "string",
          "default": "/"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "HealthCheckIntervalSeconds": {
      "description": "The time in seconds between each health check for an endpoint. Must be a value of 10 or 30",
      "type": "integer",
      "default": 30
    },
    "ThresholdCount": {
      "description": "The number of consecutive health checks required to set the state of the endpoint to unhealthy.",
      "type": "integer",
      "default": 3
    },
    "PortOverrides": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PortOverride"
      }
    }
  },
  "typeName": "AWS::GlobalAccelerator::EndpointGroup",
  "$defs": {
    "EndpointConfiguration": {
      "description": "The configuration for a given endpoint",
      "type": "object",
      "properties": {
        "EndpointId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Id of the endpoint. For Network/Application Load Balancer this value is the ARN.  For EIP, this value is the allocation ID.  For EC2 instances, this is the EC2 instance ID"
        },
        "Weight": {
          "description": "The weight for the endpoint.",
          "type": "integer",
          "minimum": 0,
          "maximum": 255,
          "default": 100
        },
        "ClientIPPreservationEnabled": {
          "description": "true if client ip should be preserved",
          "type": "boolean",
          "default": true
        }
      },
      "required": [
        "EndpointId"
      ],
      "title": "AWSGlobalAcceleratorEndpointGroupEndpointConfigurationDefinition",
      "additionalProperties": false
    },
    "Port": {
      "description": "A network port number",
      "type": "integer",
      "minimum": 0,
      "maximum": 65535,
      "title": "AWSGlobalAcceleratorEndpointGroupPortDefinition"
    },
    "PortOverride": {
      "description": "listener to endpoint port mapping.",
      "type": "object",
      "properties": {
        "ListenerPort": {
          "$ref": "#/$defs/Port"
        },
        "EndpointPort": {
          "$ref": "#/$defs/Port"
        }
      },
      "required": [
        "ListenerPort",
        "EndpointPort"
      ],
      "title": "AWSGlobalAcceleratorEndpointGroupPortOverrideDefinition",
      "additionalProperties": false
    }
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-globalaccelerator",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/EndpointGroupArn"
  ],
  "required": [
    "ListenerArn",
    "EndpointGroupRegion"
  ],
  "createOnlyProperties": [
    "/properties/EndpointGroupRegion",
    "/properties/ListenerArn"
  ],
  "readOnlyProperties": [
    "/properties/EndpointGroupArn"
  ]
}
