阿里云对象存储服务绑定规范
要设置阿里云对象存储绑定,请创建一个类型为的组件。 See on how to create and apply a secretstore configuration. See this guide on referencing secrets to retrieve and use the secret with Dapr components.
Warning
以上示例将密钥明文存储, It is recommended to use a secret store for the secrets as described here.
create
:
要执行创建对象操作,请使用POST
方法和以下JSON调用绑定:
{
"operation": "create",
}
Note
默认情况下,会自动生成一个随机的UUID作为对象密钥。 参见下面所示的支持的元数据为对象设置密钥。
Example
curl -d '{ "operation": "create", "data": "Hello World" }' http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
保存到特定文件
curl -d '{ "operation": "create", "data": "Hello World", "metadata": { "key": "my-key" } }' http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
Note
Windows CMD需要转义"
字符。