Skip to content

Commit c0fe17e

Browse files
authored
fix capitalization per Acrolinx, adjust indentation
1 parent 613b048 commit c0fe17e

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

articles/event-grid/edge/react-blob-storage-events-locally.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ This section shows you how to deploy the Azure Blob Storage module, which would
109109
* **Image URI**: mcr.microsoft.com/azure-blob-storage:latest
110110
* **Container Create Options**:
111111

112-
```json
112+
```json
113113
{
114114
"Env":[
115115
"LOCAL_STORAGE_ACCOUNT_NAME=<your storage account name>",
@@ -125,13 +125,12 @@ This section shows you how to deploy the Azure Blob Storage module, which would
125125
}
126126
}
127127
}
128-
```
129-
> [!IMPORTANT]
130-
> - Blob Storage module can publish events using both HTTPS and HTTP.
131-
> - If you have enabled the client based authentication for EventGrid make sure you update the value of EVENTGRID_ENDPOINT to allow https like this: `EVENTGRID_ENDPOINT=https://<event grid module name>:4438`
132-
> - And add another environment variable `AllowUnknownCertificateAuthority=true` to the above Json. When talking to EventGrid over HTTPS, **AllowUnknownCertificateAuthority** allows the storage module to trust self-signed EventGrid server certificates.
133-
128+
```
134129

130+
> [!IMPORTANT]
131+
> - Blob Storage module can publish events using both HTTPS and HTTP.
132+
> - If you have enabled the client-based authentication for EventGrid, make sure you update the value of EVENTGRID_ENDPOINT to allow https, like this: `EVENTGRID_ENDPOINT=https://<event grid module name>:4438`.
133+
> - Also add another environment variable `AllowUnknownCertificateAuthority=true` to the above Json. When talking to EventGrid over HTTPS, **AllowUnknownCertificateAuthority** allows the storage module to trust self-signed EventGrid server certificates.
135134
136135
4. Update the JSON that you copied with the following information:
137136

@@ -197,7 +196,7 @@ Keep the default routes, and select **Next** to continue to the review section
197196
2. Subscribers can register for events published to a topic. To receive any event, you'll need to create an Event Grid subscription for **MicrosoftStorage** topic.
198197
1. Create blobsubscription.json with the following content. For details about the payload, see our [API documentation](api.md)
199198
200-
```json
199+
```json
201200
{
202201
"properties": {
203202
"destination": {
@@ -208,31 +207,30 @@ Keep the default routes, and select **Next** to continue to the review section
208207
}
209208
}
210209
}
211-
```
210+
```
212211
213-
>[!NOTE]
214-
> The **endpointType** property specifies that the subscriber is a **Webhook**. The **endpointUrl** specifies the URL at which the subscriber is listening for events. This URL corresponds to the Azure Function sample you deployed earlier.
212+
>[!NOTE]
213+
> The **endpointType** property specifies that the subscriber is a **Webhook**. The **endpointUrl** specifies the URL at which the subscriber is listening for events. This URL corresponds to the Azure Function sample you deployed earlier.
215214
216215
2. Run the following command to create a subscription for the topic. Confirm that you see the HTTP status code is `200 OK`.
217216
218-
```sh
219-
curl -k -H "Content-Type: application/json" -X PUT -g -d @blobsubscription.json https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview
220-
```
221-
222-
> [!IMPORTANT]
223-
> - For the HTTPS flow, if the client authentication is enabled via SAS key, then the SAS key specified earlier should be added as a header. Hence the curl request will be: `curl -k -H "Content-Type: application/json" -H "aeg-sas-key: <your SAS key>" -X PUT -g -d @blobsubscription.json https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
224-
> - For the HTTPS flow, if the client authentication is enabled via certificate, the curl request will be:`curl -k -H "Content-Type: application/json" --cert <certificate file> --key <certificate private key file> -X PUT -g -d @blobsubscription.json https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
217+
```sh
218+
curl -k -H "Content-Type: application/json" -X PUT -g -d @blobsubscription.json https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview
219+
```
225220
221+
> [!IMPORTANT]
222+
> - For the HTTPS flow, if the client authentication is enabled via SAS key, then the SAS key specified earlier should be added as a header. Hence the curl request will be: `curl -k -H "Content-Type: application/json" -H "aeg-sas-key: <your SAS key>" -X PUT -g -d @blobsubscription.json https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
223+
> - For the HTTPS flow, if the client authentication is enabled via certificate, the curl request will be:`curl -k -H "Content-Type: application/json" --cert <certificate file> --key <certificate private key file> -X PUT -g -d @blobsubscription.json https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
226224
227225
3. Run the following command to verify subscription was created successfully. HTTP Status Code of 200 OK should be returned.
228226
229-
```sh
230-
curl -k -H "Content-Type: application/json" -X GET -g https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview
231-
```
227+
```sh
228+
curl -k -H "Content-Type: application/json" -X GET -g https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview
229+
```
232230
233-
Sample output:
231+
Sample output:
234232
235-
```json
233+
```json
236234
{
237235
"id": "/iotHubs/eg-iot-edge-hub/devices/eg-edge-device/modules/eventgridmodule/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5",
238236
"type": "Microsoft.EventGrid/eventSubscriptions",
@@ -247,13 +245,13 @@ Keep the default routes, and select **Next** to continue to the review section
247245
}
248246
}
249247
}
250-
```
248+
```
251249
252-
> [!IMPORTANT]
253-
> - For the HTTPS flow, if the client authentication is enabled via SAS key, then the SAS key specified earlier should be added as a header. Hence the curl request will be: `curl -k -H "Content-Type: application/json" -H "aeg-sas-key: <your SAS key>" -X GET -g https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
254-
> - For the HTTPS flow, if the client authentication is enabled via certificate, the curl request will be: `curl -k -H "Content-Type: application/json" --cert <certificate file> --key <certificate private key file> -X GET -g https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
250+
> [!IMPORTANT]
251+
> - For the HTTPS flow, if the client authentication is enabled via SAS key, then the SAS key specified earlier should be added as a header. Hence the curl request will be: `curl -k -H "Content-Type: application/json" -H "aeg-sas-key: <your SAS key>" -X GET -g https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
252+
> - For the HTTPS flow, if the client authentication is enabled via certificate, the curl request will be: `curl -k -H "Content-Type: application/json" --cert <certificate file> --key <certificate private key file> -X GET -g https://<your-edge-device-public-ip-here>:4438/topics/MicrosoftStorage/eventSubscriptions/sampleSubscription5?api-version=2019-01-01-preview`
255253
256-
2. Download [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/) and [connect it to your local storage](../../iot-edge/how-to-store-data-blob.md#connect-to-your-local-storage-with-azure-storage-explorer)
254+
3. Download [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/) and [connect it to your local storage](../../iot-edge/how-to-store-data-blob.md#connect-to-your-local-storage-with-azure-storage-explorer)
257255
258256
## Verify event delivery
259257
@@ -339,8 +337,8 @@ The data object has the following properties:
339337
| Property | Type | Description |
340338
| -------- | ---- | ----------- |
341339
| api | string | The operation that triggered the event. It can be one of the following values: <ul><li>BlobCreated - allowed values are: `PutBlob` and `PutBlockList`</li><li>BlobDeleted - allowed values are `DeleteBlob`, `DeleteAfterUpload` and `AutoDelete`. <p>The `DeleteAfterUpload` event is generated when blob is automatically deleted because deleteAfterUpload desired property is set to true. </p><p>`AutoDelete` event is generated when blob is automatically deleted because deleteAfterMinutes desired property value expired.</p></li></ul>|
342-
| clientRequestId | string | a client-provided request id for the storage API operation. This id can be used to correlate to Azure Storage diagnostic logs using the "client-request-id" field in the logs, and can be provided in client requests using the "x-ms-client-request-id" header. For details, see [Log Format](/rest/api/storageservices/storage-analytics-log-format). |
343-
| requestId | string | Service-generated request id for the storage API operation. Can be used to correlate to Azure Storage diagnostic logs using the "request-id-header" field in the logs and is returned from initiating API call in the 'x-ms-request-id' header. See [Log Format](https://docs.microsoft.com/rest/api/storageservices/storage-analytics-log-format). |
340+
| clientRequestId | string | a client-provided request ID for the storage API operation. This ID can be used to correlate to Azure Storage diagnostic logs using the "client-request-id" field in the logs, and can be provided in client requests using the "x-ms-client-request-id" header. For details, see [Log Format](/rest/api/storageservices/storage-analytics-log-format). |
341+
| requestId | string | Service-generated request ID for the storage API operation. Can be used to correlate to Azure Storage diagnostic logs using the "request-id-header" field in the logs and is returned from initiating API call in the 'x-ms-request-id' header. See [Log Format](https://docs.microsoft.com/rest/api/storageservices/storage-analytics-log-format). |
344342
| eTag | string | The value that you can use to perform operations conditionally. |
345343
| contentType | string | The content type specified for the blob. |
346344
| contentLength | integer | The size of the blob in bytes. |
@@ -358,4 +356,4 @@ See the following articles from the Blob Storage documentation:
358356
In this tutorial, you published events by creating or deleting blobs in an Azure Blob Storage. See the other tutorials to learn how to forward events to cloud (Azure Event Hub or Azure IoT Hub):
359357
360358
- [Forward events to Azure Event Grid](forward-events-event-grid-cloud.md)
361-
- [Forward events to Azure IoT Hub](forward-events-iothub.md)
359+
- [Forward events to Azure IoT Hub](forward-events-iothub.md)

0 commit comments

Comments
 (0)