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
This article explains how to create an *endpoint* for Azure Digital Twin events using the [Azure portal](https://portal.azure.com) or the [Azure CLI](/cli/azure/dt/endpoint). You can also manage endpoints with the [DigitalTwinsEndpoint control plane APIs](/rest/api/digital-twins/controlplane/endpoints).
16
16
17
-
Routing [event notifications](concepts-event-notifications.md) from Azure Digital Twins to downstream services or connected compute resources is a two-step process: create endpoints, then create event routes that send data to those endpoints. This article covers the first step, setting up endpoints that can receive the events. Later, you can create [event routes](how-to-create-routes.md) that specify which events generated by Azure Digital Twins are delivered to which endpoints.
17
+
Routing [event notifications](concepts-event-notifications.md) from Azure Digital Twins to downstream services or connected compute resources is a two-step process: create endpoints, then create event routes that send data to those endpoints. This article covers the first step, setting up endpoints that can receive the events. Later, you can [create event routes](how-to-create-routes.md) that specify which events generated by Azure Digital Twins are delivered to which endpoints.
18
18
19
19
## Prerequisites
20
20
21
21
* An Azure account, which you can [set up for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22
-
* An Azure Digital Twins instance in your Azure subscription. If you don't have an instance, create one by following the steps in [Set up an instance and authentication](how-to-set-up-instance-portal.md). Have the following values from setup handy to use later in this article:
22
+
* An Azure Digital Twins instance in your Azure subscription. If you don't have an instance, create one by following the steps in [Set up an instance and authentication](how-to-set-up-instance-portal.md). Have the following values from setup available to use later in this article:
23
23
- Instance name
24
24
- Resource group
25
25
@@ -39,35 +39,35 @@ These services are the supported types of endpoints that you can create for your
To link an endpoint to Azure Digital Twins, the Event Grid topic, event hub, or Service Bus topic that you're using for the endpoint needs to exist already.
42
+
Before you link an endpoint to Azure Digital Twins, you need to create the Event Grid topic, event hub, or Service Bus topic that you're using for the endpoint.
44
43
45
44
Use the following chart to see what resources you should set up before creating your endpoint.
46
45
47
46
| Endpoint type | Required resources (linked to creation instructions) |
48
47
| --- | --- |
49
-
| Event Grid endpoint |[Event Grid topic](../event-grid/custom-event-quickstart-portal.md#create-a-custom-topic)<br/>*event schema must be Event Grid Schema or Cloud Event Schema v1.0 |
| Service Bus endpoint |[Service Bus namespace](../service-bus-messaging/service-bus-quickstart-topics-subscriptions-portal.md)<br/><br/>[Service Bus topic](../service-bus-messaging/service-bus-quickstart-topics-subscriptions-portal.md)<br/><br/> (Optional) [authorization rule](../service-bus-messaging/service-bus-authentication-and-authorization.md#shared-access-signature) for key-based authentication|
48
+
| Event Grid endpoint |[Event Grid topic](../event-grid/custom-event-quickstart-portal.md#create-a-custom-topic)<br/>(Event schema must be Event Grid Schema or Cloud Event Schema v1.0)|
| Service Bus endpoint |[Service Bus namespace](../service-bus-messaging/service-bus-quickstart-topics-subscriptions-portal.md)<br/><br/>[Service Bus topic](../service-bus-messaging/service-bus-quickstart-topics-subscriptions-portal.md)<br/><br/> (Optional) [Authorization rule](../service-bus-messaging/service-bus-authentication-and-authorization.md#shared-access-signature) for key-based authentication|
52
51
53
52
## Create the endpoint
54
53
55
-
After creating the endpoint resources, use them for an Azure Digital Twins endpoint.
54
+
After creating the endpoint resources, you can create the Azure Digital Twins endpoint. Use the following tabs to select your preferred experience.
56
55
57
56
# [Portal](#tab/portal)
58
57
59
58
To create a new endpoint, go to your instance's page in the [Azure portal](https://portal.azure.com). You can find the instance by entering its name into the portal search bar.
60
59
61
-
1. From the instance menu, select **Endpoints**. Then from the **Endpoints** page, select **+ Create an endpoint**. This action opens the **Create an endpoint** page.
60
+
1. From the instance menu, select **Connect outputs > Endpoints**. Then from the **Endpoints** page, select **+ Create an endpoint**. This action opens the **Create an endpoint** page.
62
61
63
62
:::image type="content" source="media/how-to-create-endpoints/create-endpoint-event-grid.png" alt-text="Screenshot of creating an endpoint of type Event Grid in the Azure portal." lightbox="media/how-to-create-endpoints/create-endpoint-event-grid.png":::
64
63
65
64
1. Enter a **Name** for your endpoint and choose the **Endpoint type**.
66
65
67
66
1. Complete the other details that are required for your endpoint type, including your subscription and the endpoint resources described [earlier](#create-required-resources).
68
-
1. For Event Hubs and Service Bus endpoints only, select an **Authentication type**. You can use key-based authentication with a precreated authorization rule, or a system-assigned or user-assigned managed identity. For more information about using the identity authentication options, see [Endpoint options: Identity-based authentication](#endpoint-options-identity-based-authentication).
67
+
1. For Event Hubs and Service Bus endpoints only, select an **Authentication type**. You can use key-based authentication with a precreated authorization rule, or a system-assigned or user-assigned managed identity. System-assigned identity is only available if you've enabled a system-assigned identity for the instance. For more information about using the identity authentication options, see [Endpoint options: Identity-based authentication](#endpoint-options-identity-based-authentication) later in this article..
69
68
70
69
:::image type="content" source="media/how-to-create-endpoints/create-endpoint-event-hub-authentication.png" alt-text="Screenshot of creating an endpoint of type Event Hubs in the Azure portal." lightbox="media/how-to-create-endpoints/create-endpoint-event-hub-authentication.png":::
70
+
71
71
1. Finish creating your endpoint by selecting **Save**.
72
72
73
73
After creating your endpoint, you can verify that it was successfully created by checking the notification icon in the top Azure portal bar:
@@ -100,7 +100,7 @@ To create a Service Bus topic endpoint (key-based authentication):
After you successfully run these commands, the Event Grid topic, event hub, or Service Bus topic is available as an endpoint in Azure Digital Twins. The endpoint is under the name you supplied with the `--endpoint-name` argument. Typically, you use that name as the target of an event route, which you can create in [Create routes and filters](how-to-create-routes.md).
103
+
After you run these commands, the Event Grid topic, event hub, or Service Bus topic is available as an endpoint in Azure Digital Twins. The endpoint has the name you supplied with the `--endpoint-name` argument. Typically, you use that name as the target of an event route, which you can create in [Create routes and filters](how-to-create-routes.md).
104
104
105
105
---
106
106
@@ -116,7 +116,7 @@ Use the following tabs for instructions that match your preferred experience.
116
116
117
117
# [Portal](#tab/portal)
118
118
119
-
First, make sure that you enabled a [managed identity](how-to-set-up-instance-portal.md#enabledisable-managed-identity-for-the-instance) for your Azure Digital Twins instance.
119
+
First, make sure that you [enable a managed identity](how-to-set-up-instance-portal.md#enabledisable-managed-identity-for-the-instance) for your Azure Digital Twins instance.
120
120
121
121
Also, make sure you have *Azure Digital Twins Data Owner* role on the instance. You can find instructions in [Set up user access permissions](how-to-set-up-instance-portal.md#set-up-user-access-permissions).
### Considerations for disabling managed identities
227
227
228
-
An identity is managed separately from the endpoints that use it. Because of this fact, it's important to consider how any change to the identity or its roles can affect the endpoints in your Azure Digital Twins instance. If you disable the identity or remove a necessary role for an endpoint, the endpoint becomes inaccessible, and the flow of events is disrupted.
228
+
An identity is managed separately from the endpoints that use it, so it's important to consider how any change to the identity or its roles can affect the endpoints in your Azure Digital Twins instance. If you disable the identity or remove a necessary role for an endpoint, the endpoint becomes inaccessible, and the flow of events is disrupted.
229
229
230
230
To continue using an endpoint that was set up with a managed identity that you disabled, delete the endpoint and [re-create it](#create-the-endpoint) with a different authentication type. It might take up to an hour for events to resume delivery to the endpoint after this change.
231
231
@@ -255,17 +255,14 @@ Next, create a SAS token for your storage account that the endpoint can use to a
255
255
# [Portal](#tab/portal)
256
256
257
257
1. Navigate to your storage account in the [Azure portal](https://portal.azure.com/#home) (you can find it by name with the portal search bar).
258
-
1. In the storage account page, choose the **Shared access signature** link in the left navigation bar to start setting up the SAS token.
258
+
1. In the storage account page, choose the **Security + networking > Shared access signature** link in the left navigation bar to start setting up the SAS token.
259
259
260
-
:::image type="content" source="media/how-to-create-endpoints/generate-sas-token-1.png" alt-text="Screenshot of the storage account page in the Azure portal." lightbox="media/how-to-create-endpoints/generate-sas-token-1.png":::
260
+
:::image type="content" source="media/how-to-create-endpoints/generate-token.png" alt-text="Screenshot of the storage account page in the Azure portal." lightbox="media/how-to-create-endpoints/generate-token.png":::
261
261
262
262
1. On the **Shared access signature page**, under **Allowed services** and **Allowed resource types**, select the settings you want. You need to select at least one box in each category. Under **Allowed permissions**, choose **Write**. You can also select other permissions.
263
263
1. Set the values you want for the remaining settings.
264
264
1. When you're finished, select **Generate SAS and connection string** to generate the SAS token.
265
-
266
-
:::image type="content" source="media/how-to-create-endpoints/generate-sas-token-2.png" alt-text="Screenshot of the storage account page in the Azure portal showing all the setting selection to generate a SAS token." lightbox="media/how-to-create-endpoints/generate-sas-token-2.png":::
267
-
268
-
1. Doing so generates several SAS and connection string values at the bottom of the same page, underneath the setting selections. Scroll down to view the values, and use the **Copy to clipboard** icon to copy the **SAS token** value. Save it to use later.
265
+
1. Completing this process generates several SAS and connection string values at the bottom of the same page, underneath the setting selections. Scroll down to view the values, and use the **Copy to clipboard** icon to copy the **SAS token** value. Save it to use later.
269
266
270
267
# [CLI](#tab/cli)
271
268
@@ -284,7 +281,7 @@ Next, create a SAS token for your storage account that the endpoint can use to a
284
281
The output of this command is the SAS token. Copy the SAS token value to use later.
285
282
286
283
> [!NOTE]
287
-
> This command includes "**b**lob", "**f**ile", "**q**ueue", and "**t**able" *services*; an "**o**bject" *resource type*; and allows "**w**rite" *permissions*.
284
+
> The example set of parameters in the previous command include "**b**lob", "**f**ile", "**q**ueue", and "**t**able" services (`--services bfqt`), an "**o**bject" resource type (`--resource-types o`), and "**w**rite" permissions (`--permissions w`).
288
285
>
289
286
> For more information about the `az storage account generate-sas` command and its parameters, see the [Azure CLI reference](/cli/azure/storage/account#az-storage-account-generate-sas).
290
287
@@ -351,4 +348,4 @@ Here's an example of a dead-letter message for a [twin create notification](conc
351
348
352
349
## Next steps
353
350
354
-
To send data from Azure Digital Twins to an endpoint, define an [event route](concepts-route-events.md). With these routes, you can set up event flow throughout the system and to downstream services. A single route can allow multiple notifications and event types to be selected. To create an event route to your endpoint, see [Create routes and filters](how-to-create-routes.md).
351
+
After you create an endpoint, define an [event route](concepts-route-events.md) to send data to the endpoint. Event routes allow you to set up event flow throughout the system and to downstream services. A single route can allow multiple notifications and event types. Create an event route to your endpoint with the instrutions in see [Create routes and filters](how-to-create-routes.md).
0 commit comments