Azure Cosmos DB (Gremlin API) 绑定组件说明
关于 Azure Cosmos DB (Gremlin API) 绑定组件的详细文档
组件格式
要配置 Azure Cosmos DB (Gremlin API) 绑定,请创建一个类型为 bindings.azure.cosmosdb.gremlinapi
的组件。请参阅本指南了解如何创建和应用绑定配置。
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
spec:
type: bindings.azure.cosmosdb.gremlinapi
version: v1
metadata:
- name: url
value: "wss://******.gremlin.cosmos.azure.com:443/"
- name: masterKey
value: "*****"
- name: username
value: "*****"
警告
上述示例使用了明文形式的字符串作为密钥。建议使用密钥存储来存储密钥,如此处所述。规范元数据字段
字段 | 是否必需 | 支持的绑定类型 | 说明 | 示例 |
---|---|---|---|---|
url |
Y | 输出 | Gremlin API 的 Cosmos DB URL | "wss://******.gremlin.cosmos.azure.com:443/" |
masterKey |
Y | 输出 | Cosmos DB 账户的主密钥 | "masterKey" |
username |
Y | 输出 | Cosmos DB 数据库的用户名 | "/dbs/<database_name>/colls/<graph_name>" |
更多信息请参见快速入门:使用 Gremlin 的 Azure Cosmos 图数据库。
绑定支持
此组件支持以下操作的输出绑定:
query
请求示例负载
{
"data": {
"gremlin": "g.V().count()"
},
"operation": "query"
}
相关文档
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.