mirror of https://github.com/dapr/docs.git
Merge branch 'v1.1' into v1.1_zh
This commit is contained in:
commit
8789c0d41e
|
@ -54,6 +54,7 @@ This component supports **output binding** with the following operations:
|
||||||
|
|
||||||
- `create` : [Create blob](#create-blob)
|
- `create` : [Create blob](#create-blob)
|
||||||
- `get` : [Get blob](#get-blob)
|
- `get` : [Get blob](#get-blob)
|
||||||
|
- `delete` : [Delete blob](#delete-blob)
|
||||||
|
|
||||||
### Create blob
|
### Create blob
|
||||||
|
|
||||||
|
@ -201,6 +202,82 @@ To perform a get blob operation, invoke the Azure Blob Storage binding with a `P
|
||||||
|
|
||||||
The response body contains the value stored in the blob object.
|
The response body contains the value stored in the blob object.
|
||||||
|
|
||||||
|
### Delete blob
|
||||||
|
|
||||||
|
To perform a delete blob operation, invoke the Azure Blob Storage binding with a `POST` method and the following JSON body:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"operation": "delete",
|
||||||
|
"metadata": {
|
||||||
|
"blobName": "myblob"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Examples
|
||||||
|
|
||||||
|
##### Delete blob
|
||||||
|
|
||||||
|
{{< tabs Windows Linux >}}
|
||||||
|
|
||||||
|
{{% codetab %}}
|
||||||
|
```bash
|
||||||
|
curl -d '{ \"operation\": \"delete\", \"metadata\": { \"blobName\": \"myblob\" }}' http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
|
||||||
|
```
|
||||||
|
{{% /codetab %}}
|
||||||
|
|
||||||
|
{{% codetab %}}
|
||||||
|
```bash
|
||||||
|
curl -d '{ "operation": "delete", "metadata": { "blobName": "myblob" }}' \
|
||||||
|
http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
|
||||||
|
```
|
||||||
|
{{% /codetab %}}
|
||||||
|
|
||||||
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
##### Delete blob snapshots only
|
||||||
|
|
||||||
|
{{< tabs Windows Linux >}}
|
||||||
|
|
||||||
|
{{% codetab %}}
|
||||||
|
```bash
|
||||||
|
curl -d '{ \"operation\": \"delete\", \"metadata\": { \"blobName\": \"myblob\", \"DeleteSnapshotOptions\": \"only\" }}' http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
|
||||||
|
```
|
||||||
|
{{% /codetab %}}
|
||||||
|
|
||||||
|
{{% codetab %}}
|
||||||
|
```bash
|
||||||
|
curl -d '{ "operation": "delete", "metadata": { "blobName": "myblob", "DeleteSnapshotOptions": "only" }}' \
|
||||||
|
http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
|
||||||
|
```
|
||||||
|
{{% /codetab %}}
|
||||||
|
|
||||||
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
##### Delete blob including snapshots
|
||||||
|
|
||||||
|
{{< tabs Windows Linux >}}
|
||||||
|
|
||||||
|
{{% codetab %}}
|
||||||
|
```bash
|
||||||
|
curl -d '{ \"operation\": \"delete\", \"metadata\": { \"blobName\": \"myblob\", \"DeleteSnapshotOptions\": \"include\" }}' http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
|
||||||
|
```
|
||||||
|
{{% /codetab %}}
|
||||||
|
|
||||||
|
{{% codetab %}}
|
||||||
|
```bash
|
||||||
|
curl -d '{ "operation": "delete", "metadata": { "blobName": "myblob", "DeleteSnapshotOptions": "include" }}' \
|
||||||
|
http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
|
||||||
|
```
|
||||||
|
{{% /codetab %}}
|
||||||
|
|
||||||
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
#### Response
|
||||||
|
|
||||||
|
An HTTP 204 (No Content) and empty body will be retuned if successful.
|
||||||
|
|
||||||
## Metadata information
|
## Metadata information
|
||||||
|
|
||||||
By default the Azure Blob Storage output binding auto generates a UUID as the blob filename and is not assigned any system or custom metadata to it. It is configurable in the metadata property of the message (all optional).
|
By default the Azure Blob Storage output binding auto generates a UUID as the blob filename and is not assigned any system or custom metadata to it. It is configurable in the metadata property of the message (all optional).
|
||||||
|
|
Loading…
Reference in New Issue