Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/flink/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (
"googleai": {"api-key"},
"vertexai": {"service-key"},
"mongodb": {"username", "password"},
"elastic": {"api-key"},
"elastic": {"api-key", "username", "password"},
"pinecone": {"api-key"},
"couchbase": {"username", "password"},
"confluent_jdbc": {"username", "password"},
Expand All @@ -26,8 +26,8 @@ var (
"aws-secret-key": {"bedrock", "sagemaker"},
"aws-session-token": {"bedrock", "sagemaker"},
"service-key": {"vertexai"},
"username": {"mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"},
"password": {"mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"},
"username": {"mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"},
"password": {"mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"},
"token": {"a2a", "rest", "mcp_server"},
"token-endpoint": {"a2a", "rest", "mcp_server"},
"client-id": {"a2a", "rest", "mcp_server"},
Expand All @@ -46,7 +46,7 @@ var (
"googleai": {"api-key"},
"vertexai": {"service-key"},
"mongodb": {"username", "password"},
"elastic": {"api-key"},
"elastic": {},
"pinecone": {"api-key"},
"couchbase": {"username", "password"},
"confluent_jdbc": {"username", "password"},
Expand All @@ -57,6 +57,7 @@ var (

ConnectionOneOfRequiredSecretsMapping = map[string][][]string{
"a2a": {{"api-key"}, {"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}},
"elastic": {{"api-key"}, {"username", "password"}},
"rest": {{"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}},
"mcp_server": {{"api-key"}, {"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}},
}
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/output/flink/connection/create-help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Error: if any flags in the group [username password] are set they must all be set; missing [password]
Usage:
confluent flink connection create <name> [flags]

Examples:
Create Flink connection "my-connection" in AWS us-west-2 for OpenAPI with endpoint and API key.

$ confluent flink connection create my-connection --cloud aws --region us-west-2 --type openai --endpoint https://api.openai.com/v1/chat/completions --api-key 0000000000000000

Flags:
--cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp".
--region string REQUIRED: Cloud region for Flink (use "confluent flink region list" to see all).
--type string REQUIRED: Specify the connection type as "openai", "azureml", "azureopenai", "a2a", "bedrock", "sagemaker", "googleai", "vertexai", "mongodb", "elastic", "pinecone", "couchbase", "confluent_jdbc", "rest", or "mcp_server".
--endpoint string REQUIRED: Specify endpoint for the connection.
--api-key string Specify API key for the type: "openai", "azureml", "azureopenai", "googleai", "elastic", "pinecone", "a2a", or "mcp_server".
--aws-access-key string Specify access key for the type: "bedrock" or "sagemaker".
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
--client-secret string Specify OAuth2 client secret for the type: "a2a", "rest", or "mcp_server".
--scope string Specify OAuth2 scope for the type: "a2a", "rest", or "mcp_server".
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
--transport-type string Specify transport type for the type: "mcp_server". Default: SSE.
--environment string Environment ID.
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")

Global Flags:
-h, --help Show help for this command.
--unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets.
-v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Error: if any flags in the group [username password] are set they must all be set; missing [password]
Usage:
confluent flink connection create <name> [flags]

Examples:
Create Flink connection "my-connection" in AWS us-west-2 for OpenAPI with endpoint and API key.

$ confluent flink connection create my-connection --cloud aws --region us-west-2 --type openai --endpoint https://api.openai.com/v1/chat/completions --api-key 0000000000000000

Flags:
--cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp".
--region string REQUIRED: Cloud region for Flink (use "confluent flink region list" to see all).
--type string REQUIRED: Specify the connection type as "openai", "azureml", "azureopenai", "a2a", "bedrock", "sagemaker", "googleai", "vertexai", "mongodb", "elastic", "pinecone", "couchbase", "confluent_jdbc", "rest", or "mcp_server".
--endpoint string REQUIRED: Specify endpoint for the connection.
--api-key string Specify API key for the type: "openai", "azureml", "azureopenai", "googleai", "elastic", "pinecone", "a2a", or "mcp_server".
--aws-access-key string Specify access key for the type: "bedrock" or "sagemaker".
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
--client-secret string Specify OAuth2 client secret for the type: "a2a", "rest", or "mcp_server".
--scope string Specify OAuth2 scope for the type: "a2a", "rest", or "mcp_server".
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
--transport-type string Specify transport type for the type: "mcp_server". Default: SSE.
--environment string Environment ID.
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")

Global Flags:
-h, --help Show help for this command.
--unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets.
-v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Error: no secrets provided for type elastic, one of the required secrets "[api-key]" or "[username password]" must be provided
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/output/flink/connection/update-help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Flags:
--aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker".
--aws-session-token string Specify session token for the type: "bedrock" or "sagemaker".
--service-key string Specify service key for the type: "vertexai".
--username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server".
--token string Specify bearer token for the type: "a2a", "rest", or "mcp_server".
--token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server".
--client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server".
Expand Down
Loading