{
  "description": "ServiceIntegrationEndpoint is the Schema for the serviceintegrationendpoints API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "ServiceIntegrationEndpointSpec defines the desired state of ServiceIntegrationEndpoint",
      "properties": {
        "authSecretRef": {
          "description": "Authentication reference to Aiven token in a secret",
          "properties": {
            "key": {
              "minLength": 1,
              "type": "string"
            },
            "name": {
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "key",
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "datadog": {
          "description": "Datadog configuration values",
          "properties": {
            "datadog_api_key": {
              "description": "Datadog API key",
              "maxLength": 256,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9]{1,256}$",
              "type": "string"
            },
            "datadog_tags": {
              "description": "Custom tags provided by user",
              "items": {
                "description": "Datadog tag defined by user",
                "properties": {
                  "comment": {
                    "description": "Optional tag explanation",
                    "maxLength": 1024,
                    "type": "string"
                  },
                  "tag": {
                    "description": "Tag format and usage are described here: https://docs.datadoghq.com/getting_started/tagging. Tags with prefix 'aiven-' are reserved for Aiven.",
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "tag"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "maxItems": 32,
              "type": "array"
            },
            "disable_consumer_stats": {
              "description": "Disable consumer group metrics",
              "type": "boolean"
            },
            "kafka_consumer_check_instances": {
              "description": "Number of separate instances to fetch kafka consumer statistics with",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            },
            "kafka_consumer_stats_timeout": {
              "description": "Number of seconds that datadog will wait to get consumer statistics from brokers",
              "maximum": 300,
              "minimum": 2,
              "type": "integer"
            },
            "max_partition_contexts": {
              "description": "Maximum number of partition contexts to send",
              "maximum": 200000,
              "minimum": 200,
              "type": "integer"
            },
            "site": {
              "description": "Datadog intake site. Defaults to datadoghq.com",
              "enum": [
                "datadoghq.com",
                "datadoghq.eu",
                "us3.datadoghq.com",
                "us5.datadoghq.com",
                "ddog-gov.com",
                "ap1.datadoghq.com"
              ],
              "type": "string"
            }
          },
          "required": [
            "datadog_api_key"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "endpointName": {
          "description": "Source endpoint for the integration (if any)",
          "maxLength": 36,
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "Value is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "endpointType": {
          "description": "Type of the service integration endpoint",
          "enum": [
            "autoscaler",
            "datadog",
            "external_aws_cloudwatch_logs",
            "external_aws_cloudwatch_metrics",
            "external_aws_s3",
            "external_clickhouse",
            "external_elasticsearch_logs",
            "external_google_cloud_bigquery",
            "external_google_cloud_logging",
            "external_kafka",
            "external_mysql",
            "external_opensearch_logs",
            "external_postgresql",
            "external_redis",
            "external_schema_registry",
            "external_sumologic_logs",
            "jolokia",
            "prometheus",
            "rsyslog"
          ],
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "Value is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "externalAWSCloudwatchLogs": {
          "description": "ExternalAwsCloudwatchLogs configuration values",
          "properties": {
            "access_key": {
              "description": "AWS access key. Required permissions are logs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEvents and logs:DescribeLogStreams",
              "maxLength": 4096,
              "type": "string"
            },
            "log_group_name": {
              "description": "AWS CloudWatch log group name",
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[\\.\\-_/#A-Za-z0-9]+$",
              "type": "string"
            },
            "region": {
              "description": "AWS region",
              "maxLength": 32,
              "type": "string"
            },
            "secret_key": {
              "description": "AWS secret key",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "access_key",
            "region",
            "secret_key"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalAWSCloudwatchMetrics": {
          "description": "ExternalAwsCloudwatchMetrics configuration values",
          "properties": {
            "access_key": {
              "description": "AWS access key. Required permissions are cloudwatch:PutMetricData",
              "maxLength": 4096,
              "type": "string"
            },
            "namespace": {
              "description": "AWS CloudWatch Metrics Namespace",
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "region": {
              "description": "AWS region",
              "maxLength": 32,
              "type": "string"
            },
            "secret_key": {
              "description": "AWS secret key",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "access_key",
            "namespace",
            "region",
            "secret_key"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalElasticsearchLogs": {
          "description": "ExternalElasticsearchLogs configuration values",
          "properties": {
            "ca": {
              "description": "PEM encoded CA certificate",
              "maxLength": 16384,
              "type": "string"
            },
            "index_days_max": {
              "description": "Maximum number of days of logs to keep",
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            },
            "index_prefix": {
              "description": "Elasticsearch index prefix",
              "maxLength": 1000,
              "minLength": 1,
              "pattern": "^[a-z0-9][a-z0-9-_.]+$",
              "type": "string"
            },
            "timeout": {
              "description": "Elasticsearch request timeout limit",
              "maximum": 120,
              "minimum": 10,
              "type": "number"
            },
            "url": {
              "description": "Elasticsearch connection URL",
              "maxLength": 2048,
              "minLength": 12,
              "type": "string"
            }
          },
          "required": [
            "index_prefix",
            "url"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalGoogleCloudBigquery": {
          "description": "ExternalGoogleCloudBigquery configuration values",
          "properties": {
            "project_id": {
              "description": "GCP project id.",
              "maxLength": 30,
              "minLength": 6,
              "type": "string"
            },
            "service_account_credentials": {
              "description": "This is a JSON object with the fields documented in https://cloud.google.com/iam/docs/creating-managing-service-account-keys .",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "project_id",
            "service_account_credentials"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalGoogleCloudLogging": {
          "description": "ExternalGoogleCloudLogging configuration values",
          "properties": {
            "log_id": {
              "description": "Google Cloud Logging log id",
              "maxLength": 512,
              "type": "string"
            },
            "project_id": {
              "description": "GCP project id.",
              "maxLength": 30,
              "minLength": 6,
              "type": "string"
            },
            "service_account_credentials": {
              "description": "This is a JSON object with the fields documented in https://cloud.google.com/iam/docs/creating-managing-service-account-keys .",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "log_id",
            "project_id",
            "service_account_credentials"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalKafka": {
          "description": "ExternalKafka configuration values",
          "properties": {
            "bootstrap_servers": {
              "description": "Bootstrap servers",
              "maxLength": 256,
              "minLength": 3,
              "type": "string"
            },
            "sasl_mechanism": {
              "description": "SASL mechanism used for connections to the Kafka server.",
              "enum": [
                "PLAIN",
                "SCRAM-SHA-256",
                "SCRAM-SHA-512"
              ],
              "type": "string"
            },
            "sasl_plain_password": {
              "description": "Password for SASL PLAIN mechanism in the Kafka server.",
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            "sasl_plain_username": {
              "description": "Username for SASL PLAIN mechanism in the Kafka server.",
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            "security_protocol": {
              "description": "Security protocol",
              "enum": [
                "PLAINTEXT",
                "SSL",
                "SASL_PLAINTEXT",
                "SASL_SSL"
              ],
              "type": "string"
            },
            "ssl_ca_cert": {
              "description": "PEM-encoded CA certificate",
              "maxLength": 16384,
              "type": "string"
            },
            "ssl_client_cert": {
              "description": "PEM-encoded client certificate",
              "maxLength": 16384,
              "type": "string"
            },
            "ssl_client_key": {
              "description": "PEM-encoded client key",
              "maxLength": 16384,
              "type": "string"
            },
            "ssl_endpoint_identification_algorithm": {
              "description": "The endpoint identification algorithm to validate server hostname using server certificate.",
              "enum": [
                "https"
              ],
              "type": "string"
            }
          },
          "required": [
            "bootstrap_servers",
            "security_protocol"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalOpensearchLogs": {
          "description": "ExternalOpensearchLogs configuration values",
          "properties": {
            "ca": {
              "description": "PEM encoded CA certificate",
              "maxLength": 16384,
              "type": "string"
            },
            "index_days_max": {
              "description": "Maximum number of days of logs to keep",
              "maximum": 10000,
              "minimum": 1,
              "type": "integer"
            },
            "index_prefix": {
              "description": "OpenSearch index prefix",
              "maxLength": 1000,
              "minLength": 1,
              "pattern": "^[a-z0-9][a-z0-9-_.]+$",
              "type": "string"
            },
            "timeout": {
              "description": "OpenSearch request timeout limit",
              "maximum": 120,
              "minimum": 10,
              "type": "number"
            },
            "url": {
              "description": "OpenSearch connection URL",
              "maxLength": 2048,
              "minLength": 12,
              "type": "string"
            }
          },
          "required": [
            "index_prefix",
            "url"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalPostgresql": {
          "description": "ExternalPostgresql configuration values",
          "properties": {
            "default_database": {
              "description": "Default database",
              "maxLength": 63,
              "pattern": "^[_A-Za-z0-9][-_A-Za-z0-9]{0,62}$",
              "type": "string"
            },
            "host": {
              "description": "Hostname or IP address of the server",
              "maxLength": 255,
              "type": "string"
            },
            "password": {
              "description": "Password",
              "maxLength": 256,
              "type": "string"
            },
            "port": {
              "description": "Port number of the server",
              "maximum": 65535,
              "minimum": 1,
              "type": "integer"
            },
            "ssl_client_certificate": {
              "description": "Client certificate",
              "maxLength": 16384,
              "type": "string"
            },
            "ssl_client_key": {
              "description": "Client key",
              "maxLength": 16384,
              "type": "string"
            },
            "ssl_mode": {
              "description": "SSL mode to use for the connection.  Please note that Aiven requires TLS for all connections to external PostgreSQL services.",
              "enum": [
                "require",
                "verify-ca",
                "verify-full"
              ],
              "type": "string"
            },
            "ssl_root_cert": {
              "description": "SSL Root Cert",
              "maxLength": 16384,
              "type": "string"
            },
            "username": {
              "description": "User name",
              "maxLength": 256,
              "type": "string"
            }
          },
          "required": [
            "host",
            "port",
            "username"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalSchemaRegistry": {
          "description": "ExternalSchemaRegistry configuration values",
          "properties": {
            "authentication": {
              "description": "Authentication method",
              "enum": [
                "none",
                "basic"
              ],
              "type": "string"
            },
            "basic_auth_password": {
              "description": "Basic authentication password",
              "maxLength": 256,
              "type": "string"
            },
            "basic_auth_username": {
              "description": "Basic authentication user name",
              "maxLength": 256,
              "type": "string"
            },
            "url": {
              "description": "Schema Registry URL",
              "maxLength": 2048,
              "type": "string"
            }
          },
          "required": [
            "authentication",
            "url"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "jolokia": {
          "description": "Jolokia configuration values",
          "properties": {
            "basic_auth_password": {
              "description": "Jolokia basic authentication password",
              "maxLength": 64,
              "minLength": 8,
              "type": "string"
            },
            "basic_auth_username": {
              "description": "Jolokia basic authentication username",
              "maxLength": 32,
              "minLength": 5,
              "pattern": "^[a-z0-9\\-@_]{5,32}$",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "project": {
          "description": "Identifies the project this resource belongs to",
          "maxLength": 63,
          "pattern": "^[a-zA-Z0-9_-]+$",
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "Value is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "prometheus": {
          "description": "Prometheus configuration values",
          "properties": {
            "basic_auth_password": {
              "description": "Prometheus basic authentication password",
              "maxLength": 64,
              "minLength": 8,
              "type": "string"
            },
            "basic_auth_username": {
              "description": "Prometheus basic authentication username",
              "maxLength": 32,
              "minLength": 5,
              "pattern": "^[a-z0-9\\-@_]{5,32}$",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "rsyslog": {
          "description": "Rsyslog configuration values",
          "properties": {
            "ca": {
              "description": "PEM encoded CA certificate",
              "maxLength": 16384,
              "type": "string"
            },
            "cert": {
              "description": "PEM encoded client certificate",
              "maxLength": 16384,
              "type": "string"
            },
            "format": {
              "description": "Message format",
              "enum": [
                "rfc5424",
                "rfc3164",
                "custom"
              ],
              "type": "string"
            },
            "key": {
              "description": "PEM encoded client key",
              "maxLength": 16384,
              "type": "string"
            },
            "logline": {
              "description": "Custom syslog message format",
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[ -~\\t]+$",
              "type": "string"
            },
            "max_message_size": {
              "description": "Rsyslog max message size",
              "maximum": 2147483647,
              "minimum": 2048,
              "type": "integer"
            },
            "port": {
              "description": "Rsyslog server port",
              "maximum": 65535,
              "minimum": 1,
              "type": "integer"
            },
            "sd": {
              "description": "Structured data block for log message",
              "maxLength": 1024,
              "type": "string"
            },
            "server": {
              "description": "Rsyslog server IP address or hostname",
              "maxLength": 255,
              "minLength": 4,
              "type": "string"
            },
            "tls": {
              "description": "Require TLS",
              "type": "boolean"
            }
          },
          "required": [
            "format",
            "port",
            "server",
            "tls"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "endpointType",
        "project"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ServiceIntegrationEndpointStatus defines the observed state of ServiceIntegrationEndpoint",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of an ServiceIntegrationEndpoint state",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions.  For example,\n\n\n\ttype FooStatus struct{\n\t    // Represents the observations of a foo's current state.\n\t    // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t    // +patchMergeKey=type\n\t    // +patchStrategy=merge\n\t    // +listType=map\n\t    // +listMapKey=type\n\t    Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t    // other fields\n\t}",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "id": {
          "description": "Service integration ID",
          "type": "string"
        }
      },
      "required": [
        "conditions",
        "id"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
