![](/img/trans.png)
[英]Unsupported partitioner with Amazon Keyspaces (for Apache Cassandra)
[英]Which username and password should I use for Amazon Keyspaces (managed Cassandra)?
由于身份验证错误,我无法使用 .NET Core 连接到 AWS Keyspaces:
AuthenticationException '提供的用户名 nick 和/或密码不正确')
我不确定应该给PlainTextAuthProvider
什么值。
我试过使用:
如何为 AWS Keyspaces 生成凭证?
我的代码,如果它是相关的:
open System
open Cassandra
[<EntryPoint>]
let main argv =
async {
let cluster =
Cluster.Builder()
.AddContactPoints("cassandra.eu-west-2.amazonaws.com")
.WithPort(9142)
.WithAuthProvider(PlainTextAuthProvider ("username", "password123"))
.WithSSL()
.Build()
use! session =
cluster.ConnectAsync ()
|> Async.AwaitTask
()
}
|> Async.RunSynchronously
0
该选项位于IAM 部分。
导航至:
这将显示一个弹出窗口,您可以在其中生成凭据。
此外,代码应指定一个 Keyspace:
open System
open Cassandra
[<EntryPoint>]
let main argv =
async {
let cluster =
Cluster.Builder()
.AddContactPoints("cassandra.eu-west-2.amazonaws.com")
.WithPort(9142)
.WithAuthProvider(PlainTextAuthProvider ("username", "password123"))
.WithSSL()
.Build()
use! session =
cluster.ConnectAsync "test_keyspace"
|> Async.AwaitTask
()
}
|> Async.RunSynchronously
0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.