You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Update the changes so it reflects to the Azure DNS service.
220
220
221
-
```azurepowershell-interactive
222
-
Set-AzDnsRecordSet -RecordSet $rs
223
-
```
221
+
```azurepowershell-interactive
222
+
Set-AzDnsRecordSet -RecordSet $rs
223
+
```
224
224
225
225
Using `Set-AzDnsRecordSet` *replaces* the existing record set in Azure DNS (and all records it contains) with the record set specified. [Etag checks](dns-zones-records.md#etags) are used to ensure concurrent changes aren't overwritten. You can use the optional `-Overwrite` switch to suppress these checks.
226
226
@@ -240,21 +240,21 @@ The process to remove a record from a record set is similar to the process to ad
2. Remove the record from the local record set object. The record that's being removed must be an exact match with an existing record across all parameters.
3. Commit the change back to the Azure DNS service. Use the optional `-Overwrite` switch to suppress [Etag checks](dns-zones-records.md#etags) for concurrent changes.
254
254
255
-
```azurepowershell-interactive
256
-
Set-AzDnsRecordSet -RecordSet $Rs
257
-
```
255
+
```azurepowershell-interactive
256
+
Set-AzDnsRecordSet -RecordSet $Rs
257
+
```
258
258
259
259
Using the above sequence to remove the last record from a record set doesn't delete the record set, rather it leaves an empty record set. To remove a record set entirely, see [Delete a record set](#delete-a-record-set).
Copy file name to clipboardExpand all lines: articles/event-grid/auth0-log-stream-blob-storage.md
+52-52Lines changed: 52 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.date: 10/12/2022
6
6
---
7
7
8
8
# Send Auth0 events to Azure Blob Storage
9
-
This article shows you how to send Auth0 events to Azure Blob Storage via Azure Event Grid by using Azure Functions.
9
+
This article shows you how to send Auth0 events to Azure Blob Storage via Azure Event Grid by using Azure Functions.
10
10
11
11
## Prerequisites
12
12
-[Create an Azure Event Grid stream on Auth0](https://marketplace.auth0.com/integrations/azure-log-streaming).
@@ -15,57 +15,57 @@ This article shows you how to send Auth0 events to Azure Blob Storage via Azure
15
15
16
16
## Create an Azure function
17
17
1. Create an Azure function by following instructions from the **Create a local project** section of [Quickstart: Create a JavaScript function in Azure using Visual Studio Code](../azure-functions/create-first-function-vs-code-node.md?pivots=nodejs-model-v3).
18
-
1. Select **Azure Event Grid trigger** for the function template instead of **HTTP trigger** as mentioned in the quickstart.
19
-
1. Continue to follow the steps, but use the following **index.js** and **function.json** files.
20
-
21
-
> [!IMPORTANT]
22
-
> Update the **package.json** to include `@azure/storage-blob` as a dependency.
23
-
24
-
**function.json**
25
-
```json
26
-
{
27
-
"bindings": [{
28
-
"type": "eventGridTrigger",
29
-
"name": "eventGridEvent",
30
-
"direction": "in"
31
-
32
-
},
33
-
{
34
-
"type": "blob",
35
-
"name": "outputBlob",
36
-
"path": "events/{rand-guid}.json",
37
-
"connection": "OUTPUT_STORAGE_ACCOUNT",
38
-
"direction": "out"
39
-
40
-
}
41
-
]
42
-
}
43
-
```
44
-
45
-
**index.js**
46
-
47
-
```javascript
48
-
// Event Grid always sends an array of data and may send more
49
-
// than one event in the array. The runtime invokes this function
50
-
// once for each array element, so we are always dealing with one.
1. Create an Azure function app using instructions from [Quick function app create](../azure-functions/functions-develop-vs-code.md?tabs=csharp#quick-function-app-create).
60
61
1. Deploy your function to the function app on Azure using instructions from [Deploy project files](../azure-functions/functions-develop-vs-code.md?tabs=csharp#republish-project-files).
61
62
62
-
63
63
## Configure Azure function to use your blob storage
64
64
1. Configure your Azure function to use your storage account.
65
65
1. Select **Configuration** under **Settings** on the left menu.
66
-
1. On the **Application settings** page, select **+ New connection string** on the command bar.
66
+
1. On the **Application settings** page, select **+ New connection string** on the command bar.
67
67
1. Set **Name** to **AzureWebJobsOUTPUT_STORAGE_ACCOUNT**.
68
-
1. Set **Value** to the connection string to the storage account that you copied to the clipboard in the previous step.
68
+
1. Set **Value** to the connection string to the storage account that you copied to the clipboard in the previous step.
69
69
1. Select **OK**.
70
70
71
71
## Create event subscription for partner topic using function
@@ -76,26 +76,26 @@ This article shows you how to send Auth0 events to Azure Blob Storage via Azure
76
76
1. On the **Create Event Subscription** page, follow these steps:
77
77
1. Enter a **name** for the event subscription.
78
78
1. For **Endpoint type**, select **Azure Function**.
79
-
79
+
80
80
:::image type="content" source="./media/auth0-log-stream-blob-storage/select-endpoint-type.png" alt-text="Screenshot showing the Create Event Subscription page with Azure Functions selected as the endpoint type.":::
81
-
1. Click **Select an endpoint** to specify details about the function.
81
+
1. Click **Select an endpoint** to specify details about the function.
82
82
1. On the **Select Azure Function** page, follow these steps.
83
83
1. Select the **Azure subscription** that contains the function.
84
84
1. Select the **resource group** that contains the function.
85
85
1. Select your **function app**.
86
86
1. Select your **Azure function**.
87
-
1. Then, select **Confirm Selection**.
88
-
1. Now, back on the **Create Event Subscription** page, select **Create** to create the event subscription.
87
+
1. Then, select **Confirm Selection**.
88
+
1. Now, back on the **Create Event Subscription** page, select **Create** to create the event subscription.
89
89
1. After the event subscription is created successfully, you see the event subscription in the bottom pane of the **Event Grid Partner Topic - Overview** page.
90
-
1. Select the link to your Azure function at the bottom of the page.
90
+
1. Select the link to your Azure function at the bottom of the page.
91
91
1. On the **Azure Function** page, select **Monitor** and confirm data is successfully being sent. You may need to trigger logs from Auth0.
92
92
93
93
## Verify that logs are stored in the storage account
94
94
95
95
1. Locate your storage account in the Azure portal.
96
96
1. Select **Containers** under **Data Storage** on the left menu.
97
-
1. Confirm that you see a container named **events**.
98
-
1. Select the container and verify that your Auth0 logs are being stored.
97
+
1. Confirm that you see a container named **events**.
98
+
1. Select the container and verify that your Auth0 logs are being stored.
99
99
100
100
> [!NOTE]
101
101
> You can use steps in the article to handle events from other event sources too. For a generic example of sending Event Grid events to Azure Blob Storage or Azure Monitor Application Insights, see [this example on GitHub](https://github.com/awkwardindustries/azure-monitor-handler).
0 commit comments