{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-vpclattice-targetgroup.json",
  "title": "AWSVpcLatticeTargetGroupProperties",
  "description": "A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service.. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-vpclattice-targetgroup.json",
    "sourceSha256": "bda1d10d1ffa3e09c1c4c8bf46f56331d4c3b75895ee451c9dff26c0ca9c054b"
  },
  "type": "object",
  "properties": {
    "Config": {
      "$ref": "#/$defs/TargetGroupConfig"
    },
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 128,
          "minLength": 3,
          "pattern": "^(?!tg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Type": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "IP",
            "LAMBDA",
            "INSTANCE",
            "ALB"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Targets": {
      "type": "array",
      "insertionOrder": false,
      "minItems": 0,
      "maxItems": 100,
      "default": [],
      "items": {
        "$ref": "#/$defs/Target"
      }
    },
    "Tags": {
      "type": "array",
      "insertionOrder": false,
      "uniqueItems": true,
      "minItems": 0,
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::VpcLattice::TargetGroup",
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "$defs": {
    "HealthCheckConfig": {
      "type": "object",
      "title": "AWSVpcLatticeTargetGroupHealthCheckConfigDefinition",
      "properties": {
        "Enabled": {
          "type": "boolean"
        },
        "Protocol": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "HTTP",
                "HTTPS"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ProtocolVersion": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "HTTP1",
                "HTTP2"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Port": {
          "type": "integer",
          "maximum": 65535,
          "minimum": 1
        },
        "Path": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 2048,
              "minLength": 0,
              "pattern": "(^/[a-zA-Z0-9@:%_+.~#?&/=-]*$|(^$))"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "HealthCheckIntervalSeconds": {
          "type": "integer",
          "maximum": 300,
          "minimum": 5
        },
        "HealthCheckTimeoutSeconds": {
          "type": "integer",
          "maximum": 120,
          "minimum": 1
        },
        "HealthyThresholdCount": {
          "type": "integer",
          "maximum": 10,
          "minimum": 2
        },
        "UnhealthyThresholdCount": {
          "type": "integer",
          "maximum": 10,
          "minimum": 2
        },
        "Matcher": {
          "$ref": "#/$defs/Matcher"
        }
      },
      "additionalProperties": false
    },
    "Matcher": {
      "type": "object",
      "title": "AWSVpcLatticeTargetGroupMatcherDefinition",
      "properties": {
        "HttpCode": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 3,
              "maxLength": 2000,
              "pattern": "^[0-9-,]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "HttpCode"
      ],
      "additionalProperties": false
    },
    "TargetGroupConfig": {
      "type": "object",
      "title": "AWSVpcLatticeTargetGroupTargetGroupConfigDefinition",
      "properties": {
        "Port": {
          "type": "integer",
          "maximum": 65535,
          "minimum": 1
        },
        "Protocol": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "HTTP",
                "HTTPS"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ProtocolVersion": {
          "oneOf": [
            {
              "type": "string",
              "default": "HTTP1",
              "enum": [
                "HTTP1",
                "HTTP2",
                "GRPC"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "IpAddressType": {
          "oneOf": [
            {
              "type": "string",
              "default": "IPV4",
              "enum": [
                "IPV4",
                "IPV6"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "VpcIdentifier": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 2048,
              "minLength": 5,
              "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "HealthCheck": {
          "$ref": "#/$defs/HealthCheckConfig"
        }
      },
      "required": [
        "Port",
        "Protocol",
        "VpcIdentifier"
      ],
      "additionalProperties": false
    },
    "Target": {
      "type": "object",
      "title": "AWSVpcLatticeTargetGroupTargetDefinition",
      "properties": {
        "Id": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Port": {
          "type": "integer",
          "maximum": 65535,
          "minimum": 1
        }
      },
      "required": [
        "Id"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "title": "AWSVpcLatticeTargetGroupTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "additionalIdentifiers": [
    [
      "/properties/Id"
    ],
    [
      "/properties/Name"
    ]
  ],
  "required": [
    "Type"
  ],
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/CreatedAt",
    "/properties/Id",
    "/properties/LastUpdatedAt",
    "/properties/Status"
  ],
  "createOnlyProperties": [
    "/properties/Name",
    "/properties/Type",
    "/properties/Config/Port",
    "/properties/Config/IpAddressType",
    "/properties/Config/Protocol",
    "/properties/Config/ProtocolVersion",
    "/properties/Config/VpcIdentifier"
  ],
  "primaryIdentifier": [
    "/properties/Arn"
  ]
}
