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
Copy file name to clipboardExpand all lines: articles/storage/blobs/archive-rehydrate-handle-event.md
+6-44Lines changed: 6 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: normesta
6
6
7
7
ms.service: azure-blob-storage
8
8
ms.topic: how-to
9
-
ms.date: 02/28/2022
9
+
ms.date: 07/30/2024
10
10
ms.author: normesta
11
11
ms.reviewer: fryu
12
12
ms.devlang: csharp
@@ -27,7 +27,7 @@ For more information about rehydrating blobs from the archive tier, see [Overvie
27
27
28
28
This article shows you how to use [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) or later to develop an Azure Function with .NET. You can install Visual Studio Community for free. Make sure that you [configure Visual Studio for Azure Development with .NET](/dotnet/azure/configure-visual-studio).
29
29
30
-
To debug the Azure Function locally, you will need to use a tool that can send an HTTP request, such as Postman.
An [Azure subscription](../../guides/developer/azure-developer-guide.md#understanding-accounts-subscriptions-and-billing) is required. If you don't already have an account, [create a free one](https://azure.microsoft.com/free/dotnet/) before you begin.
33
33
@@ -167,58 +167,20 @@ To learn more about the information that is included when a Blob Storage event i
167
167
168
168
## Run the Azure Function locally in the debugger
169
169
170
-
To test your Azure Function code locally, you need to manually send an HTTP request that triggers the event. You can post the request using a tool such as Postman.
170
+
To test your Azure Function code locally, you need to manually send an HTTP request that triggers the event. You can post the request by using a tool such as those that are described in the prerequisite section of this article.
171
171
172
172
At the top of the class file for your Azure Function is a URL endpoint that you can use for testing in the local environment. Posting the request with this URL triggers the event in the local environment so that you can debug your code. The URL is in the following format:
The request that you send to this endpoint is a simulated request. It does not send or receive data from your Azure Storage account.
178
+
The request that you send to this endpoint is a simulated request. It does not send or receive data from your Azure Storage account.
179
179
180
-
Follow these steps to construct and send a request to this endpoint. This example shows how to send the request with Postman.
181
-
182
-
1. In Postman, create a new request.
183
-
1. Paste the URL shown above into the field for the request URL, substituting the name of your function for `{functionname}` and removing the curly braces. Make sure that the request verb is set to GET.
184
-
185
-
:::image type="content" source="media/archive-rehydrate-handle-event/trigger-azure-function-postman-url.png" alt-text="Screenshot showing how to specify local URL for event trigger in Postman ":::
186
-
187
-
1. Add the **Content-Type** header and set it to *application/json*.
188
-
1. Add the **aeg-event-type** header and set it to *Notification*.
189
-
190
-
:::image type="content" source="media/archive-rehydrate-handle-event/trigger-azure-function-postman-headers.png" alt-text="Screenshot showing header configuration for local request to trigger event":::
191
-
192
-
1. In Postman, specify the request body, with the body type set to *JSON* and the format to *raw*. The following example simulates a **Copy Blob** request. Replace placeholder values in angle brackets with your own values. Note that it is not necessary to change date/time or identifier values, because this is a simulated request:
Send a request to this endpoint by using your HTTP request tool and its instructions. Make sure to substitute the `{functionname}` placeholder with the name of your function (for example `Get http://localhost:7071/runtime/webhooks/EventGrid?functionName=BlobRehydrateEventHandler`).
219
181
220
182
1. In Visual Studio, place any desired breakpoints in your code, and press **F5** to run the debugger.
221
-
1. In Postman, select the **Send** button to send the request to the endpoint.
183
+
1. In your HTTP request tool, send the request to the endpoint.
222
184
223
185
When you send the request, Event Grid calls your Azure Function, and you can debug it normally. For additional information and examples, see [Manually post the request](../../azure-functions/event-grid-how-tos.md#manually-post-the-request) in the Azure Functions documentation.
0 commit comments