{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-kafkaconnect-connector.json",
  "title": "AWSKafkaConnectConnectorProperties",
  "description": "Resource Type definition for AWS::KafkaConnect::Connector. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-kafkaconnect.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-kafkaconnect-connector.json",
    "sourceSha256": "57bcfba4dc1960457b46ae2fc9574672bc38914c4644742ff18f6c7fe39be397"
  },
  "type": "object",
  "properties": {
    "Capacity": {
      "$ref": "#/$defs/Capacity"
    },
    "ConnectorConfiguration": {
      "description": "The configuration for the connector.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        ".*": {
          "type": "string"
        }
      }
    },
    "ConnectorDescription": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1024
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A summary description of the connector."
    },
    "ConnectorName": {
      "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"
        }
      ],
      "description": "The name of the connector."
    },
    "KafkaCluster": {
      "$ref": "#/$defs/KafkaCluster"
    },
    "KafkaClusterClientAuthentication": {
      "$ref": "#/$defs/KafkaClusterClientAuthentication"
    },
    "KafkaClusterEncryptionInTransit": {
      "$ref": "#/$defs/KafkaClusterEncryptionInTransit"
    },
    "KafkaConnectVersion": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The version of Kafka Connect. It has to be compatible with both the Kafka cluster's version and the plugins."
    },
    "LogDelivery": {
      "$ref": "#/$defs/LogDelivery"
    },
    "Plugins": {
      "description": "List of plugins to use with the connector.",
      "type": "array",
      "uniqueItems": true,
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/Plugin"
      },
      "insertionOrder": false
    },
    "ServiceExecutionRoleArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "arn:(aws|aws-us-gov|aws-cn):iam:.*"
        },
        {
          "$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 IAM role used by the connector to access Amazon S3 objects and other external resources."
    },
    "WorkerConfiguration": {
      "$ref": "#/$defs/WorkerConfiguration"
    }
  },
  "typeName": "AWS::KafkaConnect::Connector",
  "createOnlyProperties": [
    "/properties/ConnectorConfiguration",
    "/properties/ConnectorDescription",
    "/properties/ConnectorName",
    "/properties/KafkaCluster",
    "/properties/KafkaClusterClientAuthentication",
    "/properties/KafkaClusterEncryptionInTransit",
    "/properties/KafkaConnectVersion",
    "/properties/LogDelivery",
    "/properties/Plugins",
    "/properties/ServiceExecutionRoleArn",
    "/properties/WorkerConfiguration"
  ],
  "$defs": {
    "ApacheKafkaCluster": {
      "description": "Details of how to connect to an Apache Kafka cluster.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorApacheKafkaClusterDefinition",
      "properties": {
        "BootstrapServers": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The bootstrap servers string of the Apache Kafka cluster."
        },
        "Vpc": {
          "$ref": "#/$defs/Vpc"
        }
      },
      "required": [
        "BootstrapServers",
        "Vpc"
      ],
      "additionalProperties": false
    },
    "AutoScaling": {
      "description": "Details about auto scaling of a connector. ",
      "type": "object",
      "title": "AWSKafkaConnectConnectorAutoScalingDefinition",
      "properties": {
        "MaxWorkerCount": {
          "description": "The maximum number of workers for a connector.",
          "type": "integer"
        },
        "MinWorkerCount": {
          "description": "The minimum number of workers for a connector.",
          "type": "integer"
        },
        "ScaleInPolicy": {
          "$ref": "#/$defs/ScaleInPolicy"
        },
        "ScaleOutPolicy": {
          "$ref": "#/$defs/ScaleOutPolicy"
        },
        "McuCount": {
          "description": "Specifies how many MSK Connect Units (MCU) as the minimum scaling unit.",
          "type": "integer",
          "enum": [
            1,
            2,
            4,
            8
          ]
        }
      },
      "required": [
        "MaxWorkerCount",
        "MinWorkerCount",
        "ScaleInPolicy",
        "ScaleOutPolicy",
        "McuCount"
      ],
      "additionalProperties": false
    },
    "Capacity": {
      "description": "Information about the capacity allocated to the connector.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorCapacityDefinition",
      "properties": {
        "AutoScaling": {
          "$ref": "#/$defs/AutoScaling"
        },
        "ProvisionedCapacity": {
          "$ref": "#/$defs/ProvisionedCapacity"
        }
      },
      "oneOf": [
        {
          "required": [
            "AutoScaling"
          ]
        },
        {
          "required": [
            "ProvisionedCapacity"
          ]
        }
      ],
      "additionalProperties": false
    },
    "CloudWatchLogsLogDelivery": {
      "description": "Details about delivering logs to Amazon CloudWatch Logs.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorCloudWatchLogsLogDeliveryDefinition",
      "properties": {
        "Enabled": {
          "description": "Specifies whether the logs get sent to the specified CloudWatch Logs destination.",
          "type": "boolean"
        },
        "LogGroup": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The CloudWatch log group that is the destination for log delivery."
        }
      },
      "required": [
        "Enabled"
      ],
      "additionalProperties": false
    },
    "CustomPlugin": {
      "description": "Details about a custom plugin.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorCustomPluginDefinition",
      "properties": {
        "CustomPluginArn": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "arn:(aws|aws-us-gov|aws-cn):kafkaconnect:.*"
            },
            {
              "$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 custom plugin to use."
        },
        "Revision": {
          "description": "The revision of the custom plugin to use.",
          "type": "integer",
          "format": "int64",
          "minimum": 1
        }
      },
      "required": [
        "CustomPluginArn",
        "Revision"
      ],
      "additionalProperties": false
    },
    "FirehoseLogDelivery": {
      "description": "Details about delivering logs to Amazon Kinesis Data Firehose.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorFirehoseLogDeliveryDefinition",
      "properties": {
        "DeliveryStream": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Kinesis Data Firehose delivery stream that is the destination for log delivery."
        },
        "Enabled": {
          "description": "Specifies whether the logs get sent to the specified Kinesis Data Firehose delivery stream.",
          "type": "boolean"
        }
      },
      "required": [
        "Enabled"
      ],
      "additionalProperties": false
    },
    "KafkaCluster": {
      "description": "Details of how to connect to the Kafka cluster.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorKafkaClusterDefinition",
      "properties": {
        "ApacheKafkaCluster": {
          "$ref": "#/$defs/ApacheKafkaCluster"
        }
      },
      "required": [
        "ApacheKafkaCluster"
      ],
      "additionalProperties": false
    },
    "KafkaClusterClientAuthentication": {
      "description": "Details of the client authentication used by the Kafka cluster.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorKafkaClusterClientAuthenticationDefinition",
      "properties": {
        "AuthenticationType": {
          "$ref": "#/$defs/KafkaClusterClientAuthenticationType"
        }
      },
      "required": [
        "AuthenticationType"
      ],
      "additionalProperties": false
    },
    "KafkaClusterClientAuthenticationType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "NONE",
            "IAM"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The type of client authentication used to connect to the Kafka cluster. Value NONE means that no client authentication is used.",
      "title": "AWSKafkaConnectConnectorKafkaClusterClientAuthenticationTypeDefinition"
    },
    "KafkaClusterEncryptionInTransit": {
      "description": "Details of encryption in transit to the Kafka cluster.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorKafkaClusterEncryptionInTransitDefinition",
      "properties": {
        "EncryptionType": {
          "$ref": "#/$defs/KafkaClusterEncryptionInTransitType"
        }
      },
      "required": [
        "EncryptionType"
      ],
      "additionalProperties": false
    },
    "KafkaClusterEncryptionInTransitType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "PLAINTEXT",
            "TLS"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The type of encryption in transit to the Kafka cluster.",
      "title": "AWSKafkaConnectConnectorKafkaClusterEncryptionInTransitTypeDefinition"
    },
    "LogDelivery": {
      "description": "Details of what logs are delivered and where they are delivered.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorLogDeliveryDefinition",
      "properties": {
        "WorkerLogDelivery": {
          "$ref": "#/$defs/WorkerLogDelivery"
        }
      },
      "required": [
        "WorkerLogDelivery"
      ],
      "additionalProperties": false
    },
    "Plugin": {
      "description": "Details about a Kafka Connect plugin which will be used with the connector.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorPluginDefinition",
      "properties": {
        "CustomPlugin": {
          "$ref": "#/$defs/CustomPlugin"
        }
      },
      "required": [
        "CustomPlugin"
      ],
      "additionalProperties": false
    },
    "ProvisionedCapacity": {
      "description": "Details about a fixed capacity allocated to a connector.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorProvisionedCapacityDefinition",
      "properties": {
        "McuCount": {
          "description": "Specifies how many MSK Connect Units (MCU) are allocated to the connector.",
          "type": "integer",
          "enum": [
            1,
            2,
            4,
            8
          ]
        },
        "WorkerCount": {
          "description": "Number of workers for a connector.",
          "type": "integer"
        }
      },
      "required": [
        "WorkerCount"
      ],
      "additionalProperties": false
    },
    "S3LogDelivery": {
      "description": "Details about delivering logs to Amazon S3.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorS3LogDeliveryDefinition",
      "properties": {
        "Bucket": {
          "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 S3 bucket that is the destination for log delivery."
        },
        "Enabled": {
          "description": "Specifies whether the logs get sent to the specified Amazon S3 destination.",
          "type": "boolean"
        },
        "Prefix": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The S3 prefix that is the destination for log delivery."
        }
      },
      "required": [
        "Enabled"
      ],
      "additionalProperties": false
    },
    "ScaleInPolicy": {
      "description": "Information about the scale in policy of the connector.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorScaleInPolicyDefinition",
      "properties": {
        "CpuUtilizationPercentage": {
          "description": "Specifies the CPU utilization percentage threshold at which connector scale in should trigger.",
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "required": [
        "CpuUtilizationPercentage"
      ],
      "additionalProperties": false
    },
    "ScaleOutPolicy": {
      "description": "Information about the scale out policy of the connector.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorScaleOutPolicyDefinition",
      "properties": {
        "CpuUtilizationPercentage": {
          "description": "Specifies the CPU utilization percentage threshold at which connector scale out should trigger.",
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "required": [
        "CpuUtilizationPercentage"
      ],
      "additionalProperties": false
    },
    "Vpc": {
      "description": "Information about a VPC used with the connector.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorVpcDefinition",
      "properties": {
        "SecurityGroups": {
          "description": "The AWS security groups to associate with the elastic network interfaces in order to specify what the connector has access to.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string"
          },
          "insertionOrder": false
        },
        "Subnets": {
          "description": "The list of subnets to connect to in the virtual private cloud (VPC). AWS creates elastic network interfaces inside these subnets.",
          "type": "array",
          "uniqueItems": true,
          "minItems": 1,
          "items": {
            "type": "string"
          },
          "insertionOrder": false
        }
      },
      "required": [
        "SecurityGroups",
        "Subnets"
      ],
      "additionalProperties": false
    },
    "WorkerConfiguration": {
      "description": "Specifies the worker configuration to use with the connector.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorWorkerConfigurationDefinition",
      "properties": {
        "Revision": {
          "description": "The revision of the worker configuration to use.",
          "type": "integer",
          "minimum": 1,
          "format": "int64"
        },
        "WorkerConfigurationArn": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "arn:(aws|aws-us-gov|aws-cn):kafkaconnect:.*"
            },
            {
              "$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 worker configuration to use."
        }
      },
      "required": [
        "Revision",
        "WorkerConfigurationArn"
      ],
      "additionalProperties": false
    },
    "WorkerLogDelivery": {
      "description": "Specifies where worker logs are delivered.",
      "type": "object",
      "title": "AWSKafkaConnectConnectorWorkerLogDeliveryDefinition",
      "properties": {
        "CloudWatchLogs": {
          "$ref": "#/$defs/CloudWatchLogsLogDelivery"
        },
        "Firehose": {
          "$ref": "#/$defs/FirehoseLogDelivery"
        },
        "S3": {
          "$ref": "#/$defs/S3LogDelivery"
        }
      },
      "additionalProperties": false
    }
  },
  "taggable": false,
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-kafkaconnect.git",
  "readOnlyProperties": [
    "/properties/ConnectorArn"
  ],
  "additionalProperties": false,
  "required": [
    "Capacity",
    "ConnectorConfiguration",
    "ConnectorName",
    "KafkaConnectVersion",
    "KafkaCluster",
    "KafkaClusterClientAuthentication",
    "KafkaClusterEncryptionInTransit",
    "Plugins",
    "ServiceExecutionRoleArn"
  ],
  "primaryIdentifier": [
    "/properties/ConnectorArn"
  ]
}
