Update azure blob storage binding (#824)

* update azure blob storage binding

* update examples
This commit is contained in:
Yaron Schneider 2020-09-25 10:16:18 -07:00 committed by GitHub
parent f6b7f0b3f0
commit 479a1b7e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 61 additions and 3 deletions

View File

@ -28,9 +28,67 @@ spec:
## Output Binding Supported Operations
* create
* [create](#create-blob)
* [get](#get-blob)
## Additional information
## Create Blob
To perform a get blob operation, invoke the Azure Blob Storage binding with a `POST` method and the following JSON body:
```json
{
"operation": "create",
"data": {
"field1": "value1"
}
}
```
Example:
```bash
curl -d '{ "operation": "create", "data": { "field1": "value1" }}' \
http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
```
### Response
The response body will contain the following JSON:
```json
{
"blobURL": "https://<your account name>. blob.core.windows.net/<your container name>/<filename>"
}
```
## Get Blob
To perform a get blob operation, invoke the Azure Blob Storage binding with a `POST` method and the following JSON body:
```json
{
"operation": "get",
"metadata": {
"blobName": "myblob"
}
}
```
Example:
```bash
curl -d '{ "operation": "get", "metadata": { "blobName": "myblob" }}' \
http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
```
### Response
The response body will contain the value stored in the blob object.
## Metadata information
By default the Azure Blob Storage output binding will auto generate a UUID as blob filename and not assign any system or custom metadata to it. It is configurable in the Metadata property of the message (all optional).
@ -50,4 +108,4 @@ Applications publishing to an Azure Blob Storage output binding should send a me
},
"operation": "create"
}
```
```